- 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
- 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
- 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
- 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)
- fix typo in makefiles/info that affected wmake -show-compile-c
- additional safeguard in src/OpenFOAM/Make/options against self-linking.
This is not normally required unless PROJECT_LIBS has been added into
the link stage.
- Note: mpich now builds libmpi.so instead of libmpich.so
- define both -DMPICH_SKIP_MPICXX and -DOMPI_SKIP_MPICXX regardless of
using openmpi or mpich. This simplifies the files and does not harm.
- in addition to managing different vendors and versions, it may also
be necessary or desirable to have a particular variant
(eg, profiling, release, etc).
Devise a new meaningful name for the variant and create a
corresponding wmake rule.
Eg, SYSTEMOPENMPI-profiling with a corresponding
"wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI-profiling" file
that has suitable content for your system.
CONFIG: intel-mpi use intel64/ paths only for config and wmake rules (#1153)
- previously adjusted the config files, but missed the changes
required for the wmake rules too.
Now simply migrate to using "intel64/{include,bin,lib}"
instead of the older naming "{include,bin,lib}64"
These changes work since at least intel-mpi 2015 (5.x), but possibly
earlier as well
- generalize some of the library extensions (.so vs .dylib).
Provide as wmake 'sysFunctions'
- added note about unsupported/incomplete system support
- centralize detection of ThirdParty packages into wmake/ subdirectory
by providing a series of scripts in the spirit of GNU autoconfig.
For example,
have_boost, have_readline, have_scotch, ...
Each of the `have_<package>` scripts will generally provide the
following type of functions:
have_<package> # detection
no_<package> # reset
echo_<package> # echoing
and the following type of variables:
HAVE_<package> # unset or 'true'
<package>_ARCH_PATH # root for <package>
<package>_INC_DIR # include directory for <package>
<package>_LIB_DIR # library directory for <package>
This simplifies the calling scripts:
if have_metis
then
wmake metisDecomp
fi
As well as reducing clutter in the corresponding Make/options:
EXE_INC = \
-I$(METIS_INC_DIR) \
-I../decompositionMethods/lnInclude
LIB_LIBS = \
-L$(METIS_LIB_DIR) -lmetis
Any additional modifications (platform-specific or for an external build
system) can now be made centrally.
- export library path for gmp/mpfr from CGAL config files.
This is required when non-system gmp/mpfr libraries are being
used, but not using a ThirdParty compiler installation.
- automatically handle lib/ vs lib64/ (eg, for central installations)
for packages such as boost, CGAL, etc. While the ThirdParty
compilation of these will normally land in lib64/, this may not be
the case when they are supplied by another means.
- reworked the handling of foamEtcFile and foamCleanPath for less
clutter in the configuration files.
Added the bin/tools/lib-dir script to handle logic that is
too complex to easily manage in csh.
- add note in BuildIssues about the I_MPI_CC variable, which is needed
when building with Intel-MPI and gcc/clang.
This additional setting is needed since the changes needed to solve
the issue of building scotch with Intel-MPI and icc (issue #434)
means that mpiicc is now being used as the wrapper when compiling
scotch.
- have the FOAM_MPI short name for INTELMPI start with 'impi-' instead
of just the version number.
Intel-MPI is often installed as /opt/intel/impi/4.1.3.049, which
results in 'FOAM_MPI=4.1.3.049' and the mpi flavour is lost.
Prefix these cases with 'impi-'
- permit SYSTEMMPI user adjustments via
etc/config.{csh,sh}/mpi-system
This can be a convenient place for setting up SYSTEMMPI for OpenFOAM
without adjusting bashrc, prefs.sh ...
- add a USERMPI type. This represents any generic mpi implementation.
The user is responsible for supplying an appropriate
wmake/rules/General/mplibUSERMPI file and managing all settings.
This type of setup can be useful in combination with specific build
systems (SPACK, EASYBUILD, etc) or module systems for which the MPI
variant is part of the installed configuration.
- handle sourcing bashrc with a relative path (issue #383)
- handle sourcing from bash and zsh.
Still need manual intervention when sourcing dash, sh, or ksh.
- replace grep in etc/cshrc with sed only
- logical instead of physical path for WM_PROJECT_DIR (issue #431).
Doesn't seem to be possible for csh/tcsh.
* Continue using physical locations when comparing directories,
but not for the top-level FOAM_INST_DIR, WM_PROJECT_DIR.
- relocate WM_CC, WM_CXX overrides from etc/config.*/compiler
to etc/config.*/settings to ensure that they are left untouched
when etc/config.sh/compiler is sourced while making third-party
packages (eg, gcc, llvm, CGAL).
- provide fallback FOAM_TUTORIALS setting in RunFunctions
STYLE: remove "~OpenFOAM" fallback as being too rare, non-obvious
Can now use this:
_foamSourceEtc config.sh/scotch
_foamSourceEtc config.csh/scotch
instead of this:
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/scotch`
In the bash/sh version, leave the _foamSource function for now, since
ThirdParty is still relying on it.
STYLE: elminate while-loop for _foamAddPath etc since this type of
construct isn't readily possible for csh and isn't being used anywhere.
STYLE: only use paraview settings when actually available
- this means executing makeParaView prior to building OpenFOAM itself,
but is consistent with the instructions given by makeParaView,
and elminates anticipating the source location from the paraview
config file, which increases the build flexibilty for ThirdParty
* boost 1_62_0 (Sept 2016)
* CGAL 4.9 (Sept 2016)
- now has headers-only mode that could be interesting
* FFTW 3.3.5 (Jul 2016)
* openmpi 1.10.4 (Sept 2016)
- the first openmpi 2.x release is also available, but too early to switch
* paraview 5.2.0 (Nov 2016)
- builds without additional patching
STYLE: removed unneeded CMake environment variables
- move unset mpi buffer size from config.csh/settings -> config.csh/mpi
- wmUNSET now also unalias wmREFRESH
Note: unsetenv WM_COMPILER_TYPE in csh variant?
- drop reference to paraview-3 in config files.
Cannot say anything definite about support for versions
this old (2012)