- use Clang instead of Gcc for Darwin since this is its system
compiler. The user can force use of Gcc by using Gcc92 etc.
- make etc/cshrc sed check more robust.
- replace tcsh (${%var}) syntax with ("${var}" != "")
[Fixes and ideas from Alexey Matveichev]
CONFIG: do not source the gperftools environment by default
- this is now an used feature, but can be re-enabled by advanced users
if required.
- 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.
- with 1906, OpenFOAM is purely C++ code and the last toolchain bits C
code have been avoided. Thus relax the wmake C rule for including
WM_COMPILE_OPTION. This makes it much easier to add different
compiler options with fewer files.
For example, for Broadwell-specific options:
cd wmake/rules/linux64Gcc
cp c++Opt c++OptBdw
edit this file and then use WM_COMPILE_OPTION=OptBdw
- ensure that WM_COMPILE_OPTION is always non-empty
- now only needed when specify compiling -m32 on a 64-bit system.
Internally use the __SIZEOF_LONG__ compiler macro (gcc, icc, llvm)
to define when long is actually an int32_t.
- with the changes added in #1256 and corresponding updates to
ThirdParty we can stop exporting these variables:
WM_CC WM_CFLAGS WM_CXX WM_CXXFLAGS WM_LDFLAGS
solaris:
- rename WM_ARCH from SunOS to solaris64 for consistency with wmake/rules
- drop non-64 solaris from wmake/rules
- remove automatic selection of FJMPI. This should be done in the bashrc
or prefs.sh file instead.
- remove old (likely inaccurate) exported flags, rely on wmake -show-xyz
or user config instead
darwin:
- remove '-Ddarwin' from the exported WM_CFLAGS, WM_CXXFLAGS.
Not used elsewhere (ThirdParty)
- was WM_PROJECT_API in the environment and FOAM_API in dictionaries.
Make these both consistently FOAM_API.
This is a non-breaking change, since the value of WM_PROJECT_API
(added in 1812) and/or FOAM_API is purely informative.
For the current correct values, always use
* foamEtcFile -show-api
* wmakeBuildInfo -show-api
- was WM_PROJECT_API in the environment and FOAM_API in dictionaries.
Make these both consistently FOAM_API.
This is a non-breaking change, since the value of WM_PROJECT_API
(added in 1812) and/or FOAM_API is purely informative.
For the current correct values, always use
* foamEtcFile -show-api
* wmakeBuildInfo -show-api
- Use the OPENFOAM define (eg, 1806, 1812), which normally corresponds
to a major release, to define an API level. This remains consistent
within a release cycle and means that it is possible to manage
several sub-versions and continue to have a consistent lookup.
The current API value is updated automatically during the build
and cached as meta data for later use, even when the wmake/ directory
is missing or OpenFOAM has not yet be initialized.
The version information reported on program start or with -help
usage adjusted to reflect this. The build tag from git now also
carries the date as being more meaningful to trace than a hash
value.
- Update etc/bashrc and etc/cshrc to obtain the project directory
directly instead of via its prefix directory. The value obtained
corresponds to an absolute path, from which the prefix directory
can be obtained.
The combination of these changes removes the reliance on any
particular directory naming convention.
For example,
With an 1812 version (API level):
WM_PROJECT_VERSION=myVersion
installed as /some/path/somewhere/openfoam-mySandbox
This makes the -prefix, -foamInstall, -projectVersion, -version
values of foamEtcFiles, and similar entries for foamConfigurePaths
superfluous.
WM_PROJECT_INST_DIR is no longer required or used
ENH: improve handling and discovery of ThirdParty
- improve the flexibility and reusability of ThirdParty packs to cover
various standard use cases:
1. Unpacking initial release tar files with two parallel directories
- OpenFOAM-v1812/
- ThirdParty-v1812/
2. With an adjusted OpenFOAM directory name, for whatever reason
- OpenFOAM-v1812-myCustom/
- openfoam-1812-other-info/
3. Operating with/without ThirdParty directory
To handle these use cases, the following discovery is used.
Note PROJECT = the OpenFOAM directory `$WM_PROJECT_DIR`
PREFIX = the parent directory
VERSION = `$WM_PROJECT_VERSION`
API = `$WM_PROJECT_API`, as per `foamEtcFiles -show-api`
0. PROJECT/ThirdParty
- for single-directory installations
1. PREFIX/ThirdParty-VERSION
- this corresponds to the traditional approach
2. PREFIX/ThirdParty-vAPI
- allows for an updated value of VERSION (eg, v1812-myCustom)
without requiring a renamed ThirdParty. The API value
would still be '1812' and the original ThirdParty-v1812/
would be found.
3. PREFIX/ThirdParty-API
- this is the same as the previous example, but using an unadorned
API value. This also makes sense if the chosen version name also
uses the unadorned API value in its naming
(eg, 1812-patch190131, 1812.19W03)
4. PREFIX/ThirdParty-common
- permits maximum reuse for various versions, but only for
experienced user who are aware of potential version
incompatibilities
Directory existence is checked as is the presence of an Allwmake file
or a platforms/ directory. This reduces the potential of false positive
matches and limits the selection to directories that are either
with sources (has the Allwmake file), or pre-compiled binaries (has
the platforms/ directory).
If none of the explored directories are found to be suitable,
it reverts to using a PROJECT/ThirdParty dummy location since
this is within the project source tree and can be trusted to
have no negative side-effects.
ENH: add csh support to foamConfigurePaths
- this removes the previously experienced inconsistence in config file
contents.
REMOVED: foamExec
- was previously used when switching versions and before the
bashrc/cshrc discovery logic was added. It is now obsolete.
- provide default WM_DIR if not already set, to improve robustness if a
reduced environment is used
- add etc/ to WM_PROJECT_SITE search. This makes the site directory
structure consistent with the OpenFOAM structure.
Eg,
WM_PROJECT_SITE/etc/..
WM_PROJECT_SITE/bin/..
WM_PROJECT_SITE/platforms/..
- Don't set/export WM_OSTYPE. The default is POSIX and is properly
defaulted throughout, including in CMakeLists-OpenFOAM.txt (also for
Catalyst)
- was PREFIX/site, now PROJECT/site
This avoids several issues when installing OpenFOAM in clusters
without an intermediate OpenFOAM-specific installation prefix.
The 'site' directory may have a reserved meaning in these situations
and it is undesirable to 'leak' upwards into the parent directory to
look for configuration files.
Placing the default within the project directory avoids this.
Alternative locations can be given via the WM_PROJECT_SITE variable.
- 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.
- a partial selection from https://github.com/mrklein/openfoam-os-x
with adjustments. The primary purpose is to reduce header-level
incompatibilities and to provide a common set of make rules to allow
easier patching (or re-integration).
- 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.
- required if there is no system openmp and libomp or libgomp are
only found in the clang hierarchy
STYLE: add some notes in the openmp rules.
- the _OPENMP macro is now used in low-level testing files
- relocate WM_COMPILER_ARCH, WM_COMPILER_LIB_ARCH from
etc/{bashrc,cshrc} to etc/config.{csh,sh}/settings since these
should not be changed by the user anyhow.
- Use gcc/g++ as common base and specialize afterwards (to reduce
duplication)
- adjust format of WM_PROJECT_SITE fallback to allow for easier
automated edits
- this implies that jobControl is a user-resource for OpenFOAM.
It was previously located under $WM_PROJECT_INST_DIR/jobControl,
but few users will have write access there.
- an unset FOAM_JOB_DIR variable is treated as "~/.OpenFOAM/jobControl",
which can partially reduce environment clutter.
- provide argList::noJobInfo() to conveniently suppress job-info on an
individual basis for short-running utilities (eg, foamListTimes) to
avoid unneeded clutter.
- 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.
- export/setenv WM_COMPILER_TYPE as suggested by Mattijs.
- for overall consistency, don't carp about an unset WM_COMPILER_TYPE,
since this would only be on the first instance (prior to the
export/setenv) and would be confusing about why/when this message
may occur.
- reduce clutter: only use (system|ThirdParty) for WM_COMPILER_TYPE.
Drop the old 'OpenFOAM' setting for WM_COMPILER_TYPE, which was
transitional in early 2011.
- make the error messages more meaningful
The change from C++0x to C++11 allows all of C++11 functionality to be
used in OpenFOAM, in particular constructor delegation which avoids code
duplication or constructor helper functions. However, this also means a
change to the minimum gcc version supported which is now 4.7 rather than
4.5.
Note that gcc-4.7 does not support the entire C++11 standard but does
support all of the functionality currently needed for further OpenFOAM
development. The minimum gcc-version which supports the entire C++11
standard is 4.8 which is now the recommended minimum gcc version.
- 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)