Commit Graph

788 Commits

Author SHA1 Message Date
mattijs
2ba2814c50 ENH: mpirunDebug: preserve ". Fixes #2459 2022-05-06 18:09:54 +01:00
Mark Olesen
83243cf01e COMP: non-group-local communicator for MS-MPI (mingw)
- partial revert for 13740de427 (#2158)

  MS-MPI does not currently have a MPI_Comm_create_group(),
  so keep using MPI_Comm_create() there.

  Only affects multi-world simulations.

CONFIG: retain dummy version of libPstream.dll

- retain as libPstream.dll-dummy so that it is available for
  manual replacement of the regular libPstream.dll (#2290)

  Keep extra copy of libPstream.dll as libPstream.dll-msmpi
  (for example) for manual replacement.
2021-12-16 14:44:28 +01:00
Mark Olesen
b25e1486de CONFIG: adjust paraview libs, intelmpi handling
- fix overly aggressive match in the API value

- allow `INTELMPI*` generic value, this can be used to specify something
  like INTELMPI_custom and populate the corresponding wmake rule
  manually

STYLE: mention FOAM_BUILDROOT in wmake -help-full output

STYLE: adjust openfoam shell session welcome information

- adjust internal variable names to reduce collision potential

- improve handling of openfoam -etc=...
2021-12-07 15:22:32 +01:00
Mark Olesen
f078643f8c ENH: add blockFaces.vtp output for blockMesh -write-vtk 2021-11-25 20:02:09 +01:00
Mark Olesen
bcf8a48c68 CONFIG: add build information into shell session
- more closely reflect what the binaries report
- report the installation path
- change PS1 case/separator to roughly correspond to package names

STYLE: adjust README to mention upcoming v2112
2021-11-25 17:36:37 +01:00
Mark Olesen
742a2c8a49 BUG: foamPackRelease detects wrong build information
- was taking from the current head instead from specified commit-ish

ENH: add -debian=NUM convenience option to foamPackRelease

STYLE: relocate compile begin/end messages

COMP: suppress more clang warnings (needed for boost)
2021-11-04 19:56:01 +01:00
Mark Olesen
fddf8a8832 ENH: add -help-full option for foamEtcFile 2021-11-02 21:14:41 +01:00
Mark Olesen
435be2e5ec CONFIG: improve flexibility of MPI specification
- it is now possible to include the selected mpi version in the
  top-level bashrc or prefs.sh file. For example,

      WM_MPLIB=OPENMPI-4.1.1  or  WM_MPLIB=openmpi-4.1.1

  after evaluation of the config.sh/mpi, this will define

      WM_MPLIB=OPENMPI-4.1.1  and  FOAM_MPI=openmpi-4.1.1

  During the wmake, the mpi-rules will first load the MPI 'family'
  rules (OPENMPI in this example) before trying to load
  version-specific rules if they exist.

  NOTE: the regular user-defined prefs system is unaffected by this
  change. This means it is still possible to use a file such as
  'prefs.openmpi' to define the preferred version instead or as well.
  However, it does mean inconsistent naming can be specified.
  For example, specify WM_MPLIB=OPENMPI-4.1.1 at the top-level but
  actually have FOAM_MPI=openmpi-4.0.6 in the prefs.openmpi file.
  This will make the value of WM_MPLIB misleading.

CONFIG: foamConfigurePaths support for sys-openmpi major version

CONFIG: cleanup any shadow env variables
2021-10-29 17:04:51 +02:00
Mark Olesen
c2697f466d CONFIG: update c++ standard, some compiler rules (partially addresses #2209)
- migrate to c++14 for most compilers *except* gcc.
  There are still many systems in use with gcc-4.8.5, which does not
  support c++14.

- initial rules for nvidia compilers (pgi is will soon be defunct).
  Not fully tested...

CONFIG: provide fallback value for the user directory name

- in containers may have an unset USER env variable.
  Default to 'user' to prevent ugly looking directory names.
2021-10-21 15:31:05 +02:00
Mark Olesen
4a0646451d CONFIG: accept '-lib' for foamCleanPath
- simplfies differences for OSX
2021-10-18 14:58:17 +02:00
mattijs
674a9a878f ENH: foamGetDict: sneak in topoSetSourcesDict. See #2232 2021-10-07 10:56:13 +01:00
Kutalmis Bercin
770df14bf6 ENH: foamMonitor: modernise and refactor for POSIX compliance (#2202)
ENH: add xrange option
2021-10-04 15:24:47 +01:00
Mark Olesen
fcd7423fa8 CONFIG: add date and paths information for tutorial Allrun script
STYLE: replace short-circuit Allrun script with Alltest
2021-09-22 17:42:21 +02:00
Mark Olesen
e2be2289a1 ENH: finer granularity for CleanFunctions
- separate handling of auxiliary files vs time directories

- restore0Dir: avoid removing 0/ if 0.orig/ does not exist
2021-07-28 10:02:27 +02:00
Mark Olesen
e2148b587e CONFIG: inline _foamEval within <etc/config.sh/setup>
- previously a function (unlike the csh version) but since bashrc and
  setup have been split -> replace with inline definition

STYLE: formatting/wording for openfoam starters

TUT: simplify controlDict modification, add default substitution

ENH: accept '/' for end-of-options terminator (etc/openfoam)

- makes the application or service more apparent.
  * eg.  /usr/bin/openfoam / blockMesh
  * vs.  /usr/bin/openfoam -- blockMesh

  Accept lone '-' as the end-of-options terminator, as per bash

- Adjust handling of openfoam '-c' option to flag that a command-string
  will appear, but continue with option parsing.
  Consistent with bash definition.
2021-06-18 17:14:22 +02:00
Mark Olesen
7d2a9fad1a ENH: add auto-detect 0/ to foamCleanTutorials
- in the 'auto' mode (now the default), it will use cleanCase and also
  remove the 0/ directory if a 0.orig/ directory also exists.

  This corresponds to a frequent idiom and can be used quite safely
  for most cases.

ENH: add -serial / -parallel preference for foamRunTutorials
2021-06-18 17:14:22 +02:00
Mark Olesen
853010309d ENH: replace tutorials/AutoTest with bin/foamTestTutorial
- additional -serial/-parallel option:
  prefer Allrun-serial or Allrun-parallel if available

- optional -output=DIR to preserve output

ENH: report missing tutorials/ directory in RunFunctions
2021-06-10 08:38:20 +02:00
Mark Olesen
c7bde70ecb ENH: robustness, consistency for wmake -show-api, -version
- add to wmakeFunctions to ensure it works even without 'make' being
  installed. Exit immediately after -show-api for consistency with
  -version.

foamEtcFile:
  - drop warnings for some old (pre-v1812) defunct options
    and simply flag as unknown options.
  - handle -version, --version as equivalent to -show-api
2021-06-10 08:34:43 +02:00
Mark Olesen
5076e6a745 CONFIG: adjust cleanup for faMeshDefinition constant/ or system/ locations 2021-05-27 21:04:55 +02:00
Mark Olesen
48c05e5441 ENH: mpirunDebug improvements
- provide '-clean' option for removing old files

- handle out of order '-decomposeParDict' as per RunFunctions

- implicit no-prompt '-yes' with the shortcuts (eg, -log, -xterm)
  and set -local if not already defined

- accept <return> to select defaults
2021-05-27 15:40:55 +02:00
Mark Olesen
03b0ca6f2e CONFIG: trap missing make command in canCompile (#2077) 2021-05-06 21:43:10 +02:00
Mark Olesen
af80006f97 Merge remote-tracking branch 'origin/master' into develop 2021-02-17 09:39:18 +01:00
Mark Olesen
8c460d8ec9 CONFIG: generate flat debian version name 2021-02-16 14:30:36 +01:00
Mark Olesen
0ee7a23504 CONFIG: ensure PV_PLUGIN_PATH is also in the library path 2021-02-15 13:09:58 +01:00
Mark Olesen
8f4b080542 ENH: preserve ThirdParty locations in env modules 2021-02-10 12:43:07 +01:00
Mark Olesen
64c6f350ae ENH: simplify packaging of debian orig tarfile, support zstd compression 2021-01-26 09:42:26 +01:00
Mark Olesen
a50047bbcc ENH: add hook for bear frontend to create json output (#1936)
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
2020-11-26 12:54:46 +01:00
Mark Olesen
9fe09ad21d ENH: installation helpers
----
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
2020-11-25 21:31:22 +01:00
Mark Olesen
c91fc6f41c CONFIG: rationalize mpi config tuning (#1910)
- 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
2020-11-11 18:36:01 +01:00
Mark Olesen
1d544540d9 ENH: handle wmake -debug option via FOAM_EXTRA_CXX_FLAGS
- 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.
2020-11-04 15:17:28 +01:00
Mark Olesen
f959c8eb36 ENH: generate local orientation vectors for blockMesh VTK output (#1903)
- 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.
2020-10-28 16:04:12 +01:00
Mark Olesen
e11c072bc4 CONFIG: incorrect BC code templates (fixes #1885)
- autoPtr to Function requires clone() method, not optional copy/move
  argument.

- fix bad character range for 'sed'
2020-10-20 14:23:40 +02:00
mattijs
ea0de58bbf ENH: add ffmpeg support to foamCreateVideo
- additional -tool= option to guide the discovery process
2020-10-07 20:48:04 +02:00
Mark Olesen
1e95af4d57 STYLE: use more generic terms allow/deny for selections 2020-09-09 13:54:34 +02:00
Mark Olesen
916dcc85a5 ENH: bin/tools/git-find-non-ascii: find non-ASCII chars in source code 2020-09-03 12:04:04 +02:00
Mark Olesen
18c68e6b74 ENH: add bin/tools/createMingwRuntime helper
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.
2020-08-11 16:39:43 +02:00
Mark Olesen
a6e86caa62 ENH: improvements for FOAM_CONFIG_ETC
- handle relative directory names for FOAM_CONFIG_ETC
2020-08-11 13:16:03 +02:00
Mark Olesen
cbcc87549e CONFIG: support openfoam -init=FILE
- useful for supporting a variety of different predefined
  configuration files. Bypasses the regular etc/bashrc entirely.

- minor refactoring in foamCreateModuleInclude
2020-06-23 15:35:52 +02:00
Mark Olesen
6194548871 ENH: split off modules/list-modules script
STYLE: string quoting when echoing paths in wmake have_* scripts

STYLE: more consistency in foamRunTutorials, foamCleanTutorials options
2020-06-19 12:43:33 +02:00
Mark Olesen
51db3c85a7 ENH: add canCompile test to RunFunctions
- allow conditional skipping of tutorials (for example) if wmake or
  the expected compiler is not available
2020-06-09 00:55:58 +02:00
Mark Olesen
cf09b67b28 ENH: support shell syntax for foamCreateModuleInclude (#1717)
- can pre-generate shell environment for later sourcing as an
  alternative to sourcing etc/bashrc itself
2020-06-03 18:23:58 +02:00
Mark Olesen
bee23c79bd ENH: adjust foamSystemCheck, foamInstallationTest
- add clang test, don't complaint about dash, zsh

- don't bother with checking gzip and tar
2020-05-29 15:46:01 +02:00
Mark Olesen
0e480f3d7e ENH: allow bin/tools/foamConfigurePaths from anywhere
- previously could only run from the project directory

- strip surrounding double quotes on input of path names
  since they are added automatically when editing.
2020-05-28 12:03:08 +02:00
Mark Olesen
da989f3680 STYLE: remove older deprecation scripts (older than 3-4 versions)
- interDyMFoam, multiphaseInterDyMFoam, pimpleDyMFoam, rhoPimpleDyMFoam
- surfaceMeshTriangulate
2020-05-28 12:03:06 +02:00
Mark Olesen
9e3d06853e ENH: add 'subcommand' handling to wmake (#1693)
- 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.
2020-05-12 10:05:24 +02:00
Mark Olesen
488b03980e ENH: support different config names in foamConfigurePaths 2020-05-11 20:37:19 +02:00
Mark Olesen
0ec0facff6 ENH: add paraFoam -plugin-path=DIR option
- convenient way to use alternative plugin installations

- provide separate -help-build information and reduce the noisy output
  when a reader module cannot be located.
2020-05-06 16:44:05 +02:00
Mark Olesen
b4bf26ea4f Merge remote-tracking branch 'origin/master' into develop 2020-05-06 10:13:56 +02:00
Mark Olesen
aafe674f5f ENH: improve cmake/ParaView config handling
- 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
2020-05-05 18:06:09 +02:00
Mark Olesen
9cfa5fe454 Merge remote-tracking branch 'origin/master' into develop 2020-04-21 15:07:35 +02:00