Skip to content
Snippets Groups Projects
  1. Nov 26, 2020
    • Mark OLESEN's avatar
      ENH: add hook for bear frontend to create json output (#1936) · a50047bb
      Mark OLESEN authored
      Example usage,
      
         wmake -with-bear src/OpenFOAM
         src/Allwmake -with-bear -s -j
      
      - bin/tools/vscode-settings
      
        Emit some json content suitable for setting up Visual Studio Code
        for use with OpenFOAM.
      
        For example,
            bin/tools/vscode-settings > .vscode/settings.json
      
      Ideas from Volker Weissman
      a50047bb
  2. Nov 25, 2020
    • Mark OLESEN's avatar
      ENH: installation helpers · 9fe09ad2
      Mark OLESEN authored
      ----
      install-dirs: a general directory installer
      
        Copy installs non-binary (platform) directories.
        Eg,
      
            install-dirs -prefix=... -devel
            install-dirs -prefix=... -default -no-app
      
      ----
      install-platform: a platform (binary) installer
      
        This is primarily driven by the need to install into system mpi
        directories. The problem noted in issue #1893 is caused by the
        rpm-mpi-hooks (fedora and redhat-8).
      
        For the additional mpi library qualifier (openmpi-x86_64) to be
        added to the requirements, the mpi-specific libraries (eg,
        libPstream.so) need to be installed in the mpi system directory
        (eg, /usr/lib64/openmpi).
      
        However, then need symlinks from the system locations back to our
        local directories to ensure that the libraries are correctly found
        via our LD_LIBRARY_PATH and we don't get dummy libraries.
      
      ----
      update-mpi-links: a post-install update hook
      
        Expected paths are registered as persistent information into the
        hook during packaging. Triggering the hook after installation
        completes the creation of the symlinks.
      
      Normal usage,
      ```
      prefix="/tmp/local-install/openfoam"
      
      bin/tools/install-dirs -prefix="$prefix" -common
      bin/tools/install-platform -prefix="$prefix"
      ```
      Installs
       - /tmp/local-install/openfoam/META-INFO
       - /tmp/local-install/openfoam/bin
       - /tmp/local-install/openfoam/etc
       - /tmp/local-install/openfoam/platforms/linux64GccDPInt32Opt/bin
       - /tmp/local-install/openfoam/platforms/linux64GccDPInt32Opt/lib
      
      Can also place architecture-dependent bits elsewhere,
      ```
      prefix="/tmp/local-install/openfoam"
      multi_arch="$(dpkg-architecture -qDEB_TARGET_MULTIARCH)"
      
      bin/tools/install-dirs -prefix="$prefix" -common
      bin/tools/install-platform -exec-prefix="$prefix/$multi_arch"
      ```
      Installs
       - /tmp/local-install/openfoam/META-INFO
       - /tmp/local-install/openfoam/bin
       - /tmp/local-install/openfoam/etc
       - /tmp/local-install/openfoam/x86_64-linux-gnu/bin
       - /tmp/local-install/openfoam/x86_64-linux-gnu/lib
      
      Can use it to flatten out platforms entirely,
      ```
      prefix="/tmp/local-install/openfoam"
      bin/tools/install-dirs -prefix="$prefix" -common
      bin/tools/install-platform -exec-prefix="$prefix"
      ```
      Installs
       - /tmp/local-install/openfoam/META-INFO
       - /tmp/local-install/openfoam/bin
       - /tmp/local-install/openfoam/etc
       - /tmp/local-install/openfoam/lib
      9fe09ad2
  3. Nov 11, 2020
    • Mark OLESEN's avatar
      CONFIG: rationalize mpi config tuning (#1910) · c91fc6f4
      Mark OLESEN authored
      - prefix FOAM_MPI and library directories with 'sys-' for system
        versions for uniform identication.
      
        WM_MPLIB      | libdir (FOAM_MPI)  | old naming |
        SYSTEMMPI     | sys-mpi            | mpi        |
        SYSTEMOPENMPI | sys-openmpi        | openmpi-system |
      
      - prefix preferences with 'prefs.' to make them more easily
        identifiable, and update bin/tools/create-mpi-config accordingly
      
            Old name: config.{csh,sh}/openmpi
            New name: config.{csh,sh}/prefs.openmpi
      
      - additional mpi preferences now available:
          * prefs.intelmpi
          * prefs.mpich
          ...
      
      CONFIG: added hook for EASYBUILDMPI (eb-mpi), somewhat like USERMPI
      
      - EasyBuild uses mpicc when compiling, so no explicit wmake rules are
        used
      
      ENH: support different major versions for system openmpi
      
      - for example, with
      
           WM_MPLIB=SYSTEMOPENMPI2
      
        defines FOAM_MPI=sys-openmpi2 and thus creates lib/sys-openmpi2
      
      ENH: centralize handling of mpi as 'mpi-rules'
      
          Before:
              sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
              sinclude $(DEFAULT_RULES)/mplib$(WM_MPLIB)
      
              ifeq (,$(FOAM_MPI_LIBBIN))
                  FOAM_MPI_LIBBIN := $(FOAM_LIBBIN)/$(FOAM_MPI)
              endif
      
          After:
              include $(GENERAL_RULES)/mpi-rules
      
      - also allows variants such as SYSTEMOPENMPI2 to be handled separately
      c91fc6f4
  4. Nov 04, 2020
    • Mark OLESEN's avatar
      ENH: handle wmake -debug option via FOAM_EXTRA_CXX_FLAGS · 1d544540
      Mark OLESEN authored
      - ensures that subsequent Allwmake scripts know about it.
      
      ENH: add bin/tools/query-detect wrapper for wmake have_* scripts
      
      CONFIG: use project/ThirdParty without additional sanity checks
      
      - no need to test for Allwmake or platforms/ if ThirdParty is located
        within the project directory itself.
      
      COMP: add simple mpi test to 00-dummy
      
      - for testing library linkage, etc.
      1d544540
  5. Oct 28, 2020
    • Mark OLESEN's avatar
      ENH: generate local orientation vectors for blockMesh VTK output (#1903) · f959c8eb
      Mark OLESEN authored
      - can help when designing/debugging blockMesh layouts
      
      - propagate low-level cellModel methods face() and edge() to cellShape
      
      STYLE: relocate blockMesh OBJ output to application only
      
      - remove blockTopology files in cleanCase function
      
      - improve code consistency in top-level blockMesh, PDRblockMesh
        generation.
      f959c8eb
  6. Oct 20, 2020
  7. Oct 07, 2020
  8. Sep 09, 2020
  9. Sep 03, 2020
  10. Aug 11, 2020
    • Mark OLESEN's avatar
      ENH: add bin/tools/createMingwRuntime helper · 18c68e6b
      Mark OLESEN authored
        Script to copy/create mingw run-time installation from the Linux
        cross-compilation. Packs everything into a tar or a zip file.
      
        To accommodate Windows, all .dll files are also placed in the
        platforms bin/ directory where they are easily found via the PATH.
      
        Futhermore, ThirdParty dll files (including those from mingw itself)
        are also placed in the same directory.
      
      ---
      Steps
        - bundles common files and directories (bin, etc, META-INFO, ...)
      
        - copies .exe files from FOAM_APPBIN and .dll files from FOAM_LIBBIN
          to the new target platforms/win64MingwDPInt32Opt/bin.
      
        - copies mingw sys-root .dll files to the new target
          platforms/win64MingwDPInt32Opt/bin
      
        - copies other ThirdParty dll files (scotch, fftw, etc) to
          platforms/win64MingwDPInt32Opt/bin
      
        - copies tutorials (can be deactivated)
      
      ---
      Note
          Can only be called when the linux64Mingw environment is active.
      18c68e6b
    • Mark OLESEN's avatar
      ENH: improvements for FOAM_CONFIG_ETC · a6e86caa
      Mark OLESEN authored
      - handle relative directory names for FOAM_CONFIG_ETC
      a6e86caa
  11. Jun 23, 2020
    • Mark OLESEN's avatar
      CONFIG: support openfoam -init=FILE · cbcc8754
      Mark OLESEN authored
      - useful for supporting a variety of different predefined
        configuration files. Bypasses the regular etc/bashrc entirely.
      
      - minor refactoring in foamCreateModuleInclude
      cbcc8754
  12. Jun 19, 2020
  13. Jun 08, 2020
  14. Jun 03, 2020
  15. May 29, 2020
  16. May 28, 2020
  17. May 12, 2020
    • Mark OLESEN's avatar
      ENH: add 'subcommand' handling to wmake (#1693) · 9e3d0685
      Mark OLESEN authored
      - initial split of wmake-related commands into "plumbing" and
        "porcelain" akin to how git handles things.
      
      - wmakeBuildInfo (very low-level), now relocated to the wmake/scripts
        and accessible for the user as "wmake -build-info".
      
        This satisfies a long-standing desire to access build information
        in a fashion similar to the api/patch information.
      
      CONFIG: avoid git information when building with a debian/ directory
      
      - when a 'debian/' directory exists, there is a high probability that
        the '.git/' directory is from debian and not from OpenFOAM (ie,
        useless here). This corresponds to an implicit '-no-git', which has
        no effect when building from pristine sources.
      
      ENH: wmakeCheckPwd becomes scripts/wmake-check-dir
      
      - accessible for the user as "wmake -check-dir" and with 1 or 2
        directory names. A wmakeCheckPwd symlink left for compatibility.
      9e3d0685
  18. May 11, 2020
  19. May 06, 2020
    • Mark OLESEN's avatar
      ENH: add paraFoam -plugin-path=DIR option · 0ec0facf
      Mark OLESEN authored
      - convenient way to use alternative plugin installations
      
      - provide separate -help-build information and reduce the noisy output
        when a reader module cannot be located.
      0ec0facf
  20. May 05, 2020
    • Mark OLESEN's avatar
      ENH: improve cmake/ParaView config handling · aafe674f
      Mark OLESEN authored
      - improve handling of changes in ParaView/VTK or cmake parameters (#1693)
      
        * adjust internals to support recording of an unlimited number of
          configuration parameters and use file `cmp` instead of trying
          to check strings ourselves.
      
      ENH: new wmake/scripts/wmake.cmake-args handler
      
      - additional handling of -prefix=... as CMAKE_INSTALL_PREFIX export.
      
      - in some contexts, can use instead of AllwmakeParseArguments
      aafe674f
  21. Apr 21, 2020
  22. Apr 15, 2020
  23. Apr 08, 2020
  24. Apr 06, 2020
  25. Mar 25, 2020
  26. Mar 17, 2020
  27. Mar 16, 2020
    • Mark OLESEN's avatar
      CONFIG: improve prefix matching for system libraries (#1607) · fe17c8ad
      Mark OLESEN authored
      - missed detection of system libraries when installed with multiarch
        paths like /usr/lib/x86_64-linux-gnu
      
      CONFIG: improve handling of group/user config files (#928)
      
      - changed bashrc handling of FOAM_CONFIG_NOUSER to use
        FOAM_CONFIG_MODE instead. Propagate into foamEtcFile to make this
        a stickier control.
      
        This change allows better control, but also enables cluster
        installations to define their own value within the OpenFOAM prefs.sh
        file to prevent users accidentally mis-configuring things if
        necessary.
      
      - remove undocumented handling of an (a)ll mode in foamEtcFile to
        avoid potential pitfalls.
      
      - add support for FOAM_CONFIG_ETC handling.
        This allows injection of an extra search layer when finding
        project etc files
      
      ENH: improvements to foamConfigurePaths (#928)
      
      - handle FOAM_CONFIG_ETC implicitly, or explicitly with the new
        -etc option.
      
      STYLE: more explicit wording in foamConfigurePaths usage (#1602)
      
      - document that an absolute path (eg, -scotch-path) overrides/ignores
        the equivalent ThirdParty setting (eg, -scotch)
      
      - longer options -system-compiler and -third-compiler for -system
        and -third, respectively. Clearer as to their purpose.
      
      - adjust the location sanity check to look for META-INFO directory.
      fe17c8ad
    • Mark OLESEN's avatar
      ENH: openfoam shell session - improved and relocated · ba3a31af
      Mark OLESEN authored
      - '-c' option (as per shell), '-Dkey[=value]' option to provide
        preferences via the command-line. For example,
      
            etc/openfoam -DWM_COMPILER=Clang -int64  ./Allwmake -j -s -l
      
        These can also be combined with other options. Eg,
      
            etc/openfoam -DWM_COMPILER=Clang \
                -c 'wmake -show-path-cxx -show-cxxflags'
      
      - relocated from bin/tools/ => etc/ for easier access
      
      - bin/tools/openfoam.in : for autoconfig-style installation
      
      - Auto-detect if the shell script was executed with openfoam and
        interpret accordingly.
      
        Simple example,
      
            --------------
            #!/usr/bin/openfoam
            cd "${0%/*}" || exit   # Run -*-sh-*- from this dir
      
            blockMesh
            simpleFoam
            --------------
      
         Note it is NOT currently possible to provide any other parameters
         this way. Eg,
      
            `#!/usr/bin/openfoam -sp` (NOT)
      
         This will either fail to run, or result in infinite recursion.
      ba3a31af
    • Mark OLESEN's avatar
      ENH: support packing of modules-only tar files (#907) · c35e7a7b
      Mark OLESEN authored
      - make tar-file generation more flexible
      c35e7a7b
  28. Feb 24, 2020
    • Mark OLESEN's avatar
      CONFIG: improve prefix matching for system libraries (#1607) · 5ba2cbc5
      Mark OLESEN authored
      - missed detection of system libraries when installed with multiarch
        paths like /usr/lib/x86_64-linux-gnu
      
      CONFIG: improve handling of group/user config files (#928)
      
      - changed bashrc handling of FOAM_CONFIG_NOUSER to use
        FOAM_CONFIG_MODE instead. Propagate into foamEtcFile to make this
        a stickier control.
      
        This change allows better control, but also enables cluster
        installations to define their own value within the OpenFOAM prefs.sh
        file to prevent users accidentally mis-configuring things if
        necessary.
      
      - remove undocumented handling of an (a)ll mode in foamEtcFile to
        avoid potential pitfalls.
      
      - add support for FOAM_CONFIG_ETC handling.
        This allows injection of an extra search layer when finding
        project etc files
      
      ENH: improvements to foamConfigurePaths (#928)
      
      - handle FOAM_CONFIG_ETC implicitly, or explicitly with the new
        -etc option.
      
      STYLE: more explicit wording in foamConfigurePaths usage (#1602)
      
      - document that an absolute path (eg, -scotch-path) overrides/ignores
        the equivalent ThirdParty setting (eg, -scotch)
      
      - longer options -system-compiler and -third-compiler for -system
        and -third, respectively. Clearer as to their purpose.
      
      - adjust the location sanity check to look for META-INFO directory.
      5ba2cbc5
  29. Feb 12, 2020
    • Mark OLESEN's avatar
    • Mark OLESEN's avatar
      ENH: openfoam shell session - improved and relocated · f90de021
      Mark OLESEN authored
      - '-c' option (as per shell), '-Dkey[=value]' option to provide
        preferences via the command-line. For example,
      
            etc/openfoam -DWM_COMPILER=Clang -int64  ./Allwmake -j -s -l
      
        These can also be combined with other options. Eg,
      
            etc/openfoam -DWM_COMPILER=Clang \
                -c 'wmake -show-path-cxx -show-cxxflags'
      
      - relocated from bin/tools/ => etc/ for easier access
      
      - bin/tools/openfoam.in : for autoconfig-style installation
      
      - Auto-detect if the shell script was executed with openfoam and
        interpret accordingly.
      
        Simple example,
      
            --------------
            #!/usr/bin/openfoam
            cd "${0%/*}" || exit   # Run -*-sh-*- from this dir
      
            blockMesh
            simpleFoam
            --------------
      
         Note it is NOT currently possible to provide any other parameters
         this way. Eg,
      
            `#!/usr/bin/openfoam -sp` (NOT)
      
         This will either fail to run, or result in infinite recursion.
      f90de021
    • Mark OLESEN's avatar
      STYLE: limit foamEtcFile -show-api to querying the META-INFO/api-info · d483123c
      Mark OLESEN authored
      - simplifies code, covers most cases.
        Can use wmake -show-api or wmakeBuildInfo to query the make rules.
      
      STYLE: Allwmake script adjustments
      
      - use bin/foamEtcFile instead of relying on PATH.
        The make environment may not have the OpenFOAM bin/ in it.
      
      - simpler shell syntax
      d483123c
  30. Feb 07, 2020
  31. Feb 06, 2020
    • Mark OLESEN's avatar
      CONFIG: provide separate default settings for clang/gcc (fixes #1566) · 92a148e9
      Mark OLESEN authored
      - the foamConfigurePaths script is quite simplistic and aggressive in
        what it changes. This was particularly evident when using it to
        change gcc/clang versions.
      
        Restructured the corresponding compiler settings to define default
        versions (eg, "default_gcc_version") that limits the scope of
        changes performed by foamConfigurePaths and makes it easier to
        understand if changing manually.
      92a148e9
  32. Feb 03, 2020
    • Mark OLESEN's avatar
      CONFIG: provide separate default settings for clang/gcc (fixes #1566) · 81015889
      Mark OLESEN authored
      - the foamConfigurePaths script is quite simplistic and aggressive in
        what it changes. This was particularly evident when using it to
        change gcc/clang versions.
      
        Restructured the corresponding compiler settings to define default
        versions (eg, "default_gcc_version") that limits the scope of
        changes performed by foamConfigurePaths and makes it easier to
        understand if changing manually.
      81015889
  33. Jan 22, 2020