- 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
- 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
)
```
- 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
- 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
- since the wrapped cmake calls generally use the regular build
locations, add in MPI information to properly handle changes
in that as well. This makes it easier to build for multiple MPI
instances.
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
ENH: provide fallback prefix for cmake detection
STYLE: simplify some shell syntax, avoid uname call in sysFunctions
STYLE: report FOAM_MPI during mpiLib builds
- no limit to the number of ways of filing ptscotch libraries.
RedHat/Fedora/CentOS should look for these directories:
ptscotch include=/usr/include/openmpi-x86_64
ptscotch library=/usr/lib64/openmpi/lib
when MPI_ARCH_PATH=/usr/lib64/openmpi
and mpicc --showme:compile yields -I/usr/include/openmpi-x86_64
- 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.
- on ArchLinux, everything is installed under /usr/include/scotch.
The detection script uses SCOTCH_ARCH_PATH as an initial guess for
ptscotch as well. However, on the second pass, it has an absolute
value ("/usr") instead of a logical one ("scotch-system").
This resulted in the logic for handling scotch+ptscotch subdirs
being bypassed.
- experienced while reusing src/Pstream/Allwmake-mpi to create
additional mpi-layers after installation. Since the copied sources
are not located within the OpenFOAM source-tree (and/or the
source-tree is non-writable), it should not and does not use the
central build/WM_OPTIONS directory.
However, when exploring for the appropriate local Make directory, it
searched for the current '.' directory instead of checking for the
resolved directory.
This fails, since there is no src/Pstream/Make directory.
Must check for src/Pstream/mpi/Make directory first!
- Adjust wclean to always remove a local build directory
(Make/WM_OPTIONS) for additional safety.
After which, attempt to remove central build/WM_OPTIONS version too.
- previously hidden as Detail::[IO]FstreamAllocator, now exposed
directly as [io]fstreamPointer, which allows reuse for
std::ifstream, std::ofstream wrapping, without the additional
ISstream, OSstream layers.
These stream pointers have some characteristics similar to a
unique_ptr.
- restrict direct gzstream usage to two files (fstreamPointers.C,
gzstream.C) which improves localization and makes it simpler to
enable/disable with the `HAVE_LIBZ` define.
The HAVE_LIBZ define is currently simply hard-coded in the
Make/options.
If compiled WITHOUT libz support:
- reading gz files : FatalError
- writing gz files : emit warning and downgrade to uncompressed
- warn if compression is specified in the case controlDict
and downgrade to uncompressed
ENH: minor updates to gzstream interface for C++11
- support construct/open with std::string for the file names.
CONFIG: provisioning for have_libz detection as wmake/script
- When OpenFOAM is under git control and a 'debian/' directory exists,
this could mean two things:
1) Additional debian control has been added to OpenFOAM
2) OpenFOAM has been imported into a debian project
For the case that OpenFOAM has been imported into a debian project,
using the git information would be highly misleading. There will be no
OpenFOAM SHA1 correspondence.
However, if additional debian control has been added to OpenFOAM the
SHA1 will be valid.
The ad hoc solution is to use an additional "openfoam.debian"
directory to flag the addition of debian controls into openfoam.
When a "debian/" directory exists without a "openfoam.debian", assume
that the OpenFOAM has been imported into debian and do not use the SHA1.
- when installed in-source, use PETSC_ARCH to find additional include
directory and the correct library directory
CONFIG: bump to new hypre version
- add -hint option for have_adios2, have_hypre, have_petsc
- When compiling additional modules or user code, we need more control
for the installation locations beyond the usual FOAM_USER_LIBBIN,
FOAM_SITE_LIBBIN, FOAM_LIBBIN, and wish to have these values be
modifiable without editing files.
- provide wmake rules for handling standard defaults:
* GENERAL_RULES/module-path-user
* GENERAL_RULES/module-path-group
* GENERAL_RULES/module-path-project
which are incorporated as follows:
Make/options:
include $(GENERAL_RULES)/module-path-user
Make/files:
LIB = $(FOAM_MODULE_LIBBIN)/libMyLibrary
By default these would compile into FOAM_USER_{APPBIN,LIBBIN} but
could be adjusted at compilation time. For example,
```
wmake -module-prefix=/path/my-install-location
```
Or
```
./Allwmake -module-prefix=/path/my-install-location
./Allwmake -prefix=/path/my-install-location
```
Or
```
FOAM_MODULE_PREFIX=/path/my-install-location ./Allwmake
```
ENH: add -no-recursion option for AllwmakeParseArguments
- more descriptive naming than the -fromWmake option (still supported)
- remove wmake/scripts/wmake.{cmake,wmake}-args since the -prefix
handling and -no-recursion is now directly handled by AllwmakeParseArguments
- scripts/wmake.wmake-args partial logic for Allwmake scripts.
- handle '-quiet' as synonym for '-silent'
- Do not specify '-j' option for wrapped cmake creation to avoid
the warning:
make[1]: warning: -jN forced in submake: disabling jobserver mode.
- dependency handling relocated from cmakeFunctions to wmakeFunctions
and reused for mpi-versioned builds. This allows more checks for
configuration parameters and removes hard-code build path
information.
CONFIG: remove spurious mplibHPMPI entries
CONFIG: remove ADIOS1 rules (antiquated)
- 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.
- 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
- bin/tools/create-mpi-config to query/write values for system openmpi.
In some cases this can be used to avoid an mpicc requirement at runtime.
- adjust openfoam session to include -test-tutorial forwarding to the
tutorials/AutoTest. This helps with writing installation tests.
- adjust foamConfigurePaths to latest version
- removal of gperftools default config, as per develop
- align wmake have_* scripts to support version query as per current
develop branch
- use config.sh/ fallbacks when the corresponding *_ARCH_PATH is empty
(eg, BOOST, CGAL, FFTW).
This aids when building outside of the regular OpenFOAM environment.
- preferentially handle Allwmake.override, which allows packaging
tools to define alternative make scripts, or selectively disable
components.
- remove legacy handling of 'Optional' directory.
Conditionals have since migrated into scripts themselves and/or
use the wmake/scripts/have_* framework.
BUG: missed passing -debug for Allwmake scripts
- 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.
- 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.
- 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