Commit Graph

705 Commits

Author SHA1 Message Date
Mark Olesen
07c69fdf0d COMP: add static libgcc, libstdc++ linking for mingw (fixes #2680)
- this solves some 'dangling' dependency problems that plagued earlier
  versions (when MS-MPI was not also installed).
2023-01-24 18:21:05 +01:00
Mark Olesen
03ab6c1a9d COMP: remove commented Make/options item (#2668)
COMP: update include for CGAL-5.5 (#2665)

  old:  Robust_circumcenter_filtered_traits_3
  new:  Robust_weighted_circumcenter_filtered_traits_3

COMP: adjust CGAL rule for OSX (#2664)

- since CGAL is now header-only, the previous OSX-specific rules have
  become redundant
2023-01-23 09:39:30 +01:00
Mark Olesen
87cff55f9e CONFIG: improve handling of debian multi-arch
- no guarantee that dpkg-architecture command is actually available,
  so revert to a reasonable guess from 'uname -m' and 'uname -s'
2022-12-19 11:13:53 +01:00
Mark Olesen
6ad25ef293 CONFIG: set API level to 2212 (pre-release state)
- README updated to v2212
2022-12-13 19:49:36 +01:00
Mark Olesen
d5e82f072e CONFIG: handle string splitting [zsh] (#2640) 2022-12-08 14:04:13 +01:00
Mark Olesen
bdb437ab10 STYLE: also mention -help-full on usage errors 2022-11-26 01:13:53 +01:00
Mark Olesen
1b11e4b3ac CONFIG: restrict wmakeLnInclude to header/template files
- source-code (.c, .cpp etc) only adds to clutter in the lnInclude
  directory
2022-11-19 12:41:55 +01:00
Mark Olesen
3b0af86448 STYLE: add notes where files are added into global/globals.C
ENH: use dictionary findDict() directly for debugSwitches

- the isDict() method is just a wrapper around the pointer anyhow
2022-11-17 15:26:51 +01:00
Mark Olesen
d009cb8bc1 CONFIG: set API level to 2208 to distinguish from previous release 2022-11-17 15:19:44 +01:00
Mark Olesen
90c4ee7e12 ENH: support wmakeLnInclude of C++ template files (.tcc, .tpp, .txx)
- can be used to avoid confusion with source files

ENH: improve handling of '--' option termination (wmake scripts)
2022-11-16 13:11:40 +01:00
Mark Olesen
9f7cfa9419 ENH: support libz disabling via WM_COMPILE_CONTROL (as ~libz)
- eg, for partially incomplete systems (without libz devel header)

ENH: clearer binding of dummy Pstream in OpenFOAM/Make/options

- link of dummy stub Pstream now contingent on linking libOpenFOAM as
  well. This makes the purpose slightly clearer

ENH: cleaner option naming/handling in wmake script

- allow special purpose -no-openfoam option.
  Eg, compiling test programs without OpenFOAM and Pstream libraries
  but using the rest of the wmake system.

ENH: add +openmp support into WM_COMPILE_CONTROL (#2633)

- this adds compile/link flags for openmp.
  For single-use, can also use 'wmake -openmp'.

  If both +openmp and ~openmp are specified in WM_COMPILE_CONTROL
  the ~openmp will have priority.

  This is actually done indirectly since ~openmp will set empty
  COMP_OPENMP, LINK_OPENMP internal variables, which the +openmp then
  adds to the c++FLAGS and linkexe targets (ie, won't actually add
  anything).

ENH: add +ccache or ccache=... support into WM_COMPILE_CONTROL (#2633)

- with the first version (+ccache), simply use ccache from the path
  without any extra options.

- with the second version (ccache=...), can be more specific about
  what is called.

  Using "+ccache" is identical to "ccache=ccache", but the later could
  be used in other ways. For example,

     ccache=/strange/install/path/ccache
     ccache=</path/my-tooling --option>

  Have the choice of unquoted, single or double quoted or '< >' quoted

STYLE: relocate FOAM_EXTRA_LDFLAGS in general makefile

- removes clutter for different linkers (eg, gold, mold, ldd)
  making it easier to extend for other linkers.

STYLE: protect makefile checks with 'strip' function
2022-11-15 14:00:18 +01:00
Mark Olesen
e15b103003 COMP: remove wmake rules for ARM7 (discontinued) arch 2022-11-15 14:00:18 +01:00
Mark Olesen
c2af76337e COMP: remove wmake rules for discontinued IA64 (itanium) arch 2022-11-15 14:00:18 +01:00
Mark Olesen
edc12c9ad9 COMP: remove fast-math and unsafe-math-optimizations for Fujitsu (#2564)
- was found to cause issues (snappyHexMesh specifically)
  on Fugaku. Reported by @azami
2022-11-15 14:00:18 +01:00
Mark Olesen
24ffc5236d COMP: simplify openmp handling (#2617)
- remove old, unneeded -DUSE_OMP define.
- wmake -no-openmp option to add '~openmp' to WM_COMPILE_CONTROL

ENH: add bash completion handling for wmake
2022-10-26 18:04:56 +02:00
Mark Olesen
c841aaed83 ENH: use atomic move in wmkdepend
- avoids truncated files if dependency generation is interrupted
2022-09-09 11:55:33 +02:00
Mark Olesen
793f4e3a37 CONFIG: add support for WM_COMPILE_OPTION='Dbg'
- uses '-g -DFULLDEBUG' (like Debug), but with -O3 (like Opt).

  This adds in debug symbols and FULLDEBUG code segments (good for
  code development) but retains -O3 optimizations and code paths and
  avoids the much slower -O0 associated with 'Debug'.

- add in central wmake/General/common/{c,c++}XXX tuning,
  which helps reduce the number of nearly identical files

ENH: add support for wmake -debug-Og
2022-09-09 11:55:33 +02:00
Mark Olesen
4730c381ef COMP: avoid cpp replacement of linux,unix,... in Make/options (fixes #2548)
- the cpp command is used to process Make/{files,options}, but builtin
  defines such as `linux` will cause problems (macro replacement) if
  these is present in the Make/{files,options}.

  Solve by undefining -Ulinux, -Uunix macros, which will leave directory
  names such as "/usr/lib/x86_64-linux-gnu/..." intact.

  Directories with _linux, __linux__ content (for example), could
  still pose future issues.
2022-08-19 15:01:43 +02:00
Mark Olesen
365b391bd2 CONFIG: set API level to 2206 (now in pre-release state)
- relevant docs updated to v2206
2022-06-21 15:32:11 +02:00
Mark Olesen
2c77514417 CONFIG: support wmake -debug-O0, -debug-O1 etc.
- rearranged order of flags so that FOAM_EXTRA_CXXFLAGS is added
  after the WARN/OPT/DBUG flags

CONFIG: drop wmake rules for PGI compiler (defunct)
2022-06-02 22:37:00 +02:00
Mark Olesen
796145ee4c CONFIG: set API level to 2204
- redistributePar, expression sources, objectRegistry::sorted(),
  wallFunctions, solid motion updates, etc
2022-05-31 17:19:49 +02:00
Mark Olesen
37e1da82ff CONFIG: add ARM64 nvidia rules
CONFIG: revise Pstream/OpenFOAM linkage (nvidia)

- double-pass linkage seems to be unnecessary
2022-05-31 17:19:49 +02:00
Mark Olesen
9c727abb84 COMP: increment lemon sources, fix stray comment char (wmkdepend)
COMP: compile utilites before solvers

- there are no inter-dependencies,
  so favour getting utilities working first
2022-05-11 09:53:58 +02:00
Bernhard Gschaider
762c095f4e COMP: WM_SCHEDULER breaks compilation (fixes #2439)
- only wrap compiler calls (not things like flex/bison)
- avoid single quoted '&&' (causes syntax errors)

STYLE: report WM_COMPILE_CONTROL value in top-level Allwmake
2022-05-10 21:15:39 +02:00
Mark Olesen
a27af5e369 ENH: add optional control to use clang lld linker (#2449)
Eg,
    export WM_COMPILER=Clang130
    export WM_COMPILE_CONTROL="version=13.0 +lld"

- also support the mold linker (+mold) for clang

STYLE: report as 'link' stage instead of 'ld' in short messages
2022-04-29 11:44:28 +02:00
Mark Olesen
a22784ef52 CONFIG: set API level to 2202
- Pstream changes, coordSetWriters etc.
2022-03-13 22:38:26 +01:00
Mark Olesen
1a4975a021 CONFIG: set API level to 2112 (now in pre-release state) 2021-12-15 19:15:07 +01:00
Mark Olesen
2f07de03ff COMP: add -pthread for AMD compiler rule
- https://github.com/spack/spack/pull/27949

COMP: respect FOAM_BUILDROOT for wmake -queue

STYLE: fix stray paraview setting
2021-12-15 19:13:27 +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
8624d65c5a ENH: support alternative build-root location (#2286)
- specify any of these

    ./Allwmake -build-root=...
    wmake -build-root=...
    FOAM_BUILDROOT=... wmake

  these specify an alternative root where build artifacts are to land.
  Currently only used as an alternative for the 'build/' hierarchy
  since the 'platforms/' target normally includes inputs as well.

  Possible use:
  ```
  (
      export WM_MPLIB="%{foam_mplib}"
      export FOAM_MPI="%{foam_mpi}"
      export MPI_ARCH_PATH="%{mpi_prefix}"

      export FOAM_BUILDROOT=/tmp/mpibuild
      export FOAM_MPI_LIBBIN="$FOAM_BUILDROOT/platforms/$WM_OPTIONS/lib/$FOAM_MPI"

      src/Pstream/Allwmake-mpi
   )
   ```
2021-12-03 17:10:22 +01:00
Mark Olesen
8ed6a61106 CONFIG: set API level to 2109
- Function1, sampledSets, expressions, runTime selection tables
2021-12-03 15:32:37 +01:00
Mark Olesen
79e110aeb0 ENH: update lemon version, wmake wrappers 2021-11-09 21:17:51 +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
2698cab01c ENH: extend use of WM_COMPILER_CONTROL to manage compiler versions
- for compilers such as gcc and clang, may have several different
  variants installed on the computer. Use WM_COMPILER_CONTROL to
  specify the preferred variant.

  Eg,
      WM_COMPILER=Gcc
      WM_COMPILER_CONTROL="version=8"

      will compile with "gcc-8" and "g++-8"

  Good practice would be to tag output directory names with the
  version too. Eg

      WM_COMPILER=Clang110
      WM_COMPILER_CONTROL="version=11.0"

STYLE: modify message for change of gcc -> clang (darwin)
2021-11-02 17:30:06 +01:00
Mark Olesen
08e66a64e1 CONFIG: increment API level to 2108
- reflects updates for List, globalIndex handling etc
2021-10-29 19:41:27 +02: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
bf1ed94e53 ENH: use PrecisionAdaptor to support scotch with label widening
- allows reuse of an int64_t scotch library with label-size 32
  and/or label-size 64.

COMP: prefer scotch/metis/kahip libraries with label-size qualifiers

- as noted in #2200, mpirun may insert mpi libraries higher in the
  library loader which can cause masking of our ThirdParty libraries
  of the same name. With scotch (for example), the operating system
  may have an int32 version installed but we have an int64 version
  compiled under ThirdParty. Runing in serial is fine, but in parallel
  we resolve to the (incorrect) system version due to the adjustments
  in mpirun.

- adjust the ThirdParty make scripts to also create corresponding
  links (eg, 'ln -s libscotch.so libscotch-int64.so') and prefer
  linkage with these qualified libraries.

    Eg,  -L$(SCOTCH_LIB_DIR) -lscotch$(SCOTCH_LIBNAME_SUFFIX)

  this prevent accidental runtime linkage with the system versions.

STYLE: simplify scotch interface code by using local functions
2021-09-07 11:29:11 +02:00
Mark Olesen
9ab8c525cf CONFIG: set API level to 2107
- liquid film, blockMesh changes, multiWorld communicators
2021-07-28 17:17:41 +02:00
Mark Olesen
521a9e4dd6 Merge remote-tracking branch 'origin/master' into develop.mol
CONFIG: set API level to 2106 in ramp-up for release
2021-06-18 17:22:24 +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
e681c127f2 CONFIG: accept module-prefix 'none' as equivalent to 'false' (ie, disabled) 2021-05-31 11:14:49 +02:00
Mark Olesen
f99ba1adbd CONFIG: bump API to 2103
- reflect updated tokenizing of expressions, scotch/paraview version
2021-05-19 18:25:17 +02:00
Mark Olesen
5a5fd1a43c COMP: sign check to avoid warnings about new[] range 2021-04-27 12:28:35 +02:00
Mark Olesen
308af39136 COMP: sign check to avoid warnings about new[] range 2021-04-27 10:20:25 +02:00
Jong-Gwan (Jason) Do
77375a88fd CONFIG: additional intel compiler flags (#2056) 2021-04-23 11:39:29 +02:00
Mark Olesen
d549826528 CONFIG: adjust intel compiler and mpi settings (#2056)
- largely as per patch from Jong-Gwan (Jason) Do

NB: the intel-one setup adds in paths for intelmpi.
    Its mpicc version does not harmonize with the OpenFOAM
    system openmpi setup (using mpicc --showme:link).

    Needs adjustment, or use intelmpi instead.

- update name mappings for newer gcc, clang versions
2021-04-23 11:39:29 +02:00
Tomoki, Karatsu
13ea1b70fe CONFIG: update/generalize FJMPI settings (#2044)
- previously had a very old (likely irrelevant) setting for solaris
  systems only.

- support site-specific customization.
  Eg, using etc/config.{csh,sh}/prefs.fjmpi

- remove erroneous shell redirects present in cshell files
2021-03-29 16:00:11 +02:00
Mark Olesen
daf9af461c CONFIG: bump API to 2102
- fvMeshDistribute and redistributePar changes
2021-03-09 09:55:02 +01:00
Mark Olesen
6940b08822 COMP: adjustments for OSX (#2013)
- int64 ambiguity
- std::array include

- bsd-sed syntax (replaces gnu-sed syntax):
  * wmake-build-info
  * wmake-with-bear
2021-03-05 11:17:11 +01:00