- Eg, with surface writers now in surfMesh, there are fewer libraries
depending on conversion and sampling.
COMP: regularize linkage ordering and avoid some implicit linkage (#1238)
- 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.
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)
- with the wmake rules we may have some compiler options bound to the
internal compiler variable. For example,
CC = g++ -std=c++11 -m64
c++FLAGS = ...
So shift any flags from CC to CXXFLAGS for the output of
'wmake -show-cxx', 'wmake -show-cxxflags', etc.
This makes it much easier to handle the values correctly elsewhere.
Eg,
CXX="$(wmake -show-cxx)" CXXFLAGS="$(wmake -show-cxxflags)" \
./configure
- provide dedicated detection 'have_ptscotch' function that can be
used after the 'have_scotch' function.
It sets the PTSCOTCH_ARCH_PATH, PTSCOTCH_INC_DIR, PTSCOTCH_LIB_DIR
and helps when the serial and parallel versions are located with
different logic.
- can be useful for retrieving the compilation flags for use with other
make systems (eg, cmake)
* wmake -show-compile (C++ not C)
* wmake -show-cxx
* wmake -show-cxxflags
- with -mcpu=native for automatic detection and -armpl for linking in
the performance libraries
STYLE: relocate -mcpu into compiler instead of compiler-flags (#1225)
- 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
- 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
- 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.
- instead of
WM_COMPILER=GccKNL WM_COMPILE_OPTION=Opt
-> linux64GccKNLDPInt32Opt
now specify
WM_COMPILER=Gcc WM_COMPILE_OPTION=OptKNL
-> linux64GccDPInt32OptKNL
This makes it easier (and more obvious) for adding different tweaks
without needing to generate too many files.
Eg,
cd wmake/rules/linux64Gcc
cp cOpt cOptBdw
cp c++Opt c++OptBdw
edit these two files and then use WM_COMPILE_OPTION=OptBdw
CONFIG: provide some default c/c++ flags in General compiler rules
- can make is easier when deriving new compile options, and ensures
that '-02' is enabled as an initial default.
- finds the correct root directory location before creating
the lnInclude directory
Eg,
from within something like src/finiteVolume/fields/fvPatchFields/..
wmakeLnInclude -update -root
it backtracks to find the top-level directory with Make/
and makes the lnInclude directory there:
Using /home/mark/openfoam/OpenFOAM-plus/src/finiteVolume
ln: /home/mark/openfoam/OpenFOAM-plus/src/finiteVolume/lnInclude
- was for parallel compilation across multiple hosts, but less useful
with modern CPUs with higher number of cores and/or hyperthreading.
Fragile use and dependent on a 'lockfile' utility that is not often
installed.
- 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
- looks slightly messier without associative arrays, but improves
portability. Should now also work with dash.
STYLE: support wmakeBuildInfo -cmp and -check options as equivalent
- 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)
- append the commit hash value with the commit date when creating
the build string information and drop the version prefix.
This provides an immediate overview of when the code was last
changed. The prefixed version information can be dropped from
the build string, since it is readily available in other forms.
- removed reliance on ParaView_INCLUDE_DIR variable for conveying the
major.minor version information when compiling. This can be somewhat
fragile and also adds variable that is an unnecessary when running
(only used when compiling).
Instead use `have_pvplugin_support` function in paraviewFunctions
wmake script to determine the maj.min from the PV_PLUGIN_PATH
since we have already defined the output path there with paraview
maj.min numbering.
Can now build with paraview from the operating system,
provided that it has develop headers available.
ParaView_VERSION=system
In the etc/config.sh/paraview setup, the maj.min is taken from
the corresponding `paraview --version` output and used when
defining the PV_PLUGIN_PATH.
During the build, the include path taken from `paraview-config`
for a system installation, from the guess installation root
of the paraview binary, or ParaView_DIR otherwise.
NB: using a system ParaView for building runTimePostProcessing is unsupported.
- these types of builds appear to have various library resolution issues
(eg, libexpat not being loaded). Additionally, the build logic does
not yet cover this type of use case.
- if FOAM_EXT_LIBBIN is unset and some scripts set this to /usr/lib*
as a fallback (eg, to avoid an undefined value) this will cause a
system library to be found before appropriate *_ARCH_PATH entry.
This was noticed during a scotch compilation without third-party:
resulting in the system library (/usr/lib64/libscotch.so) to be found
instead of the SCOTCH_ARCH_PATH location
(/usr/lib64/mpi/gcc/openmpi/lib64/).
Simply changing the search order doesn't work for use, since we wish
to retain a preference for any dynamic libraries discovered in a
real FOAM_EXT_LIBBIN.
Circumvent these issues by only taking libraries from
FOAM_EXT_LIBBIN if it also points to a location within ThirdParty.
- local token shifting was missing when getting the next file chunk
(while in the middle of parsing that text).
As well as adding the correct shifting, also tag the local buffer
with nullptr when it is done. Be extra paranoid and check the
raw buffer range before passing off to std::string.
Previously the coordinate system functionality was split between
coordinateSystem and coordinateRotation. The coordinateRotation stored
the rotation tensor and handled all tensor transformations.
The functionality has now been revised and consolidated into the
coordinateSystem classes. The sole purpose of coordinateRotation
is now just to provide a selectable mechanism of how to define the
rotation tensor (eg, axis-angle, euler angles, local axes) for user
input, but after providing the appropriate rotation tensor it has
no further influence on the transformations.
--
The coordinateSystem class now contains an origin and a base rotation
tensor directly and various transformation methods.
- The origin represents the "shift" for a local coordinate system.
- The base rotation tensor represents the "tilt" or orientation
of the local coordinate system in general (eg, for mapping
positions), but may require position-dependent tensors when
transforming vectors and tensors.
For some coordinate systems (currently the cylindrical coordinate system),
the rotation tensor required for rotating a vector or tensor is
position-dependent.
The new coordinateSystem and its derivates (cartesian, cylindrical,
indirect) now provide a uniform() method to define if the rotation
tensor is position dependent/independent.
The coordinateSystem transform and invTransform methods are now
available in two-parameter forms for obtaining position-dependent
rotation tensors. Eg,
... = cs.transform(globalPt, someVector);
In some cases it can be useful to use query uniform() to avoid
storage of redundant values.
if (cs.uniform())
{
vector xx = cs.transform(someVector);
}
else
{
List<vector> xx = cs.transform(manyPoints, someVector);
}
Support transform/invTransform for common data types:
(scalar, vector, sphericalTensor, symmTensor, tensor).
====================
Breaking Changes
====================
- These changes to coordinate systems and rotations may represent
a breaking change for existing user coding.
- Relocating the rotation tensor into coordinateSystem itself means
that the coordinate system 'R()' method now returns the rotation
directly instead of the coordinateRotation. The method name 'R()'
was chosen for consistency with other low-level entities (eg,
quaternion).
The following changes will be needed in coding:
Old: tensor rot = cs.R().R();
New: tensor rot = cs.R();
Old: cs.R().transform(...);
New: cs.transform(...);
Accessing the runTime selectable coordinateRotation
has moved to the rotation() method:
Old: Info<< "Rotation input: " << cs.R() << nl;
New: Info<< "Rotation input: " << cs.rotation() << nl;
- Naming consistency changes may also cause code to break.
Old: transformVector()
New: transformPrincipal()
The old method name transformTensor() now simply becomes transform().
====================
New methods
====================
For operations requiring caching of the coordinate rotations, the
'R()' method can be used with multiple input points:
tensorField rots(cs.R(somePoints));
and later
Foam::transformList(rots, someVectors);
The rotation() method can also be used to change the rotation tensor
via a new coordinateRotation definition (issue #879).
The new methods transformPoint/invTransformPoint provide
transformations with an origin offset using Cartesian for both local
and global points. These can be used to determine the local position
based on the origin/rotation without interpreting it as a r-theta-z
value, for example.
================
Input format
================
- Streamline dictionary input requirements
* The default type is cartesian.
* The default rotation type is the commonly used axes rotation
specification (with e1/e2/3), which is assumed if the 'rotation'
sub-dictionary does not exist.
Example,
Compact specification:
coordinateSystem
{
origin (0 0 0);
e2 (0 1 0);
e3 (0.5 0 0.866025);
}
Full specification (also accepts the longer 'coordinateRotation'
sub-dictionary name):
coordinateSystem
{
type cartesian;
origin (0 0 0);
rotation
{
type axes;
e2 (0 1 0);
e3 (0.5 0 0.866025);
}
}
This simplifies the input for many cases.
- Additional rotation specification 'none' (an identity rotation):
coordinateSystem
{
origin (0 0 0);
rotation { type none; }
}
- Additional rotation specification 'axisAngle', which is similar
to the -rotate-angle option for transforming points (issue #660).
For some cases this can be more intuitive.
For example,
rotation
{
type axisAngle;
axis (0 1 0);
angle 30;
}
vs.
rotation
{
type axes;
e2 (0 1 0);
e3 (0.5 0 0.866025);
}
- shorter names (or older longer names) for the coordinate rotation
specification.
euler EulerRotation
starcd STARCDRotation
axes axesRotation
================
Coding Style
================
- use Foam::coordSystem namespace for categories of coordinate systems
(cartesian, cylindrical, indirect). This reduces potential name
clashes and makes a clearer declaration. Eg,
coordSystem::cartesian csys_;
The older names (eg, cartesianCS, etc) remain available via typedefs.
- added coordinateRotations namespace for better organization and
reduce potential name clashes.
- avoids compiler ambiguity when virtual methods such as
IOdictionary::read() exist.
- the method was introduced in 1806, and was thus not yet widely used
- ignore implicit-fallthrough for ragel generated code.
- add -Wno-deprecated-declarations for c++LESSWARN.
These principally associated with older CGAL versions and their use
of particular mpfr routines.
- since 1612, FOAM_INST_DIR and foamInstDir longer have any
special meanings when sourcing the bashrc or cshrc files.
Thus no need for special treatment in any of the dispatch wrappers.
Retained FOAM_INST_DIR as (unexported) variable in etc/bashrc,
just in case people are using patched versions of etc/bashrc
as part of their installation.
ENH: relax prefix restrictions on foamCreateVideo (issue #904)
- shift the implicit '.' to be part of the default prefix. This allows
things like "-image myimages_00" to work as might be expected.
- comments
- avoid egrep for getting processor count.
- wcleanBuild, wcleanPlatform with shorter form '-curr' instead of '-c'
to avoid any potential user confusion with '-comp'
- link CGAL (clang version) without reference to mpfr,gmp libraries
- use offset address in printStack for Darwin as well
- alternative handling of feexcept on Darwin
- improvement documentation for surface sampling.
- can now specify alternative sampling scheme for obtaining the
face values instead of just using the "cell" value. For example,
sampleScheme cellPoint;
This can be useful for cases when the surface is close to a boundary
cell and there are large gradients in the sampled field.
- distanceSurface now handles non-closed surfaces more robustly.
Unknown regions (not inside or outside) are marked internally and
excluded from consideration. This allows use of 'signed' surfaces
where not previously possible.
- since PackedBoolList is now a compatibility typedef for bitSet,
it is useful to have an additional means of distinction.
STYLE: simplify internal version tests and compiler defines.
- the API version is now conveyed via the OPENFOAM define directly.
The older OPENFOAM_PLUS define is provided for existing code.
- parsing error state only arises from a missing final newline
in the file (which the dnl macro does not capture).
Report with a warning instead of modifying the dnl macro since
we generally wish to know about this anyhow.
- add missing newline to YEqn.H file.
- handling of dead links (find -L -delete unsupported)
- remove ignore case flag on 's/../../i' used in have_scotch script.
It is unneeded and not tolerated by Darwin's sed.
- avoid embedded comments in EXE_INC (Make/options files), which do
not work well with the OSX LLVM cpp.
It strips out the comments but also removes the continuation char.
STYLE: adjust notes about paraview library locations
- 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.
- the previous grammar used
'/*' { fgoto comment; }
to start processing multi-line comments and
comment := any* :>> '*/' @{ fgoto main; };
as a finishing action to return to normal lexing, but seemed not to
have been triggered properly.
Now simply trap in a single rule:
'/*' any* :>> '*/'; # Multi-line comment
STYLE: use more compact dnl (delete to newline)
OLD: [^\n]* '\n'
NEW: (any* -- '\n') '\n'
eliminates the intermediate state
- However, the new ragel-based parser is much faster
than the others, and does not cause 'too many open files' error
that the flex-based parser does (issue #784).
The timings (using src/sampling as being somewhat representative)
$ wclean; wmakeLnInclude -u .; time wmake -s dep
3.4s wmkdepend (ragel) [now default]
5.7s wmkdep (flex)
6.1s cpp -M
- The makeDepend script is for testing purposes only, but could used as
a hook for other dependency generation systems (eg, ninja).
It simply wraps 'cpp -M' in a form that is calling compatible with
wmkdepend.
BUG: wmkdepend parser was missing optional leading space on #include match
STYLE: use -G2 (goto-based) option for wmkdepend state machine
- the machine is compact with few states and lends itself to this
- 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).
This is similar to efforts (Feb 2010) but using ragel
(https://en.wikipedia.org/wiki/Ragel) instead of the now defunct
coco/r. The modified commit message from 2010:
ENH: add C++-based wmkdepend parser (uses ragel grammar).
- This avoids dependency on lex/flex and provides better encapsulation
for buffer switching. As a result, the maximum number of open files
only corresponds to the include depth.
--
Note that the flex source and rules are still available, but are not
deactivate (see wmake/rules/General/transform)
- primary points for an external user are the polyMesh constructor
- add config info for gcc-7.3.0
COMP: intel-2017. Ignore unknown pragmas. Disambiguate method resolution.
- downgrades some diagnostics about nonconformant code from errors to
warnings. Oddly enough, the errors actually arise from STL library
elements shipped with gcc itself. Affects kahip compilation with
gcc-6, gcc-7
- 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
- unknown options or missing option values now emit a shorter message
without the entire usage. This makes it easier to identify the errors
and is better aligned with the behaviour of GNU system tools.
====
$ simpleFoam -case
Using: OpenFOAM-plus (see www.OpenFOAM.com)
Build: plus-01234
Error: option '-case' requires an argument
See 'simpleFoam -help' for usage
====
- provide for reduced (-help) and full (-help-full) usage information.
In many cases the reduced usage provided sufficient and easier
to find the information.
- make -srcDoc an alias for -doc-source
- no warnings about option aliases for future dates.
- add -compiler=NAME option to remove a build or platforms directory
corresponding to any specified compiler on the current arch.
- when -compiler or -compiler=NAME is specified, also clean related
sub-directories as well. This will cleanup mpi-related directory.
- improve functional compatibility with DynList (remove methods)
* eg, remove an element from any position in a DynamicList
* reduce the number of template parameters
* remove/subset regions of DynamicList
- propagate Swap template specializations for lists, hashtables
- move construct/assignment to various containers.
- add find/found methods for FixedList and UList for a more succinct
(and clearer?) usage than the equivalent global findIndex() function.
- simplify List_FOR_ALL loops
- suppress error messages that appear with zsh.
According to unset(1p), 'unset -f' unsets a function.
If the function was not previously defined, this is a no-op.
This is similar for zsh, but there it emits a warning if the
function was not previously defined.
- avoid 'local' in functions sources from etc/bashrc.
ksh does not support this.
- use 'command' shell builtin instead of 'type'.
Seems to be more consistent between shell flavours.
- if called from the top-level project directory ($WM_PROJECT_DIR)
default to using {applications,src} directories. This avoids
erroneous linking of etc/codeTemplates and avoids the lengthy
scanning of the tutorials directory
- 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
- caused by the typo '@E' instead of '$E' (commit 997f1713cb)
ENH: minor improvements for wmake/src makefile
- 'make clean' now also tries to remove the parent platforms/
directory if possible.
- the flex intermediate build target is placed into the platforms/
directory to avoid touching the src/ directory at all.
- suppress warnings about unused functions (GCC only)
- new behaviour is to do nothing if no platform was specified.
This helps avoid inadvertently removing files.
- support special platforms for compatibility with wmake/wclean targets.
Eg, "wcleanPlatform all"
- allow use from ThirdParty top-level as well, since the directory
structure is similar.
BUG: fix regression in wcleanLnIncludeAll introduced by 9e2e111518
- use "-pvMAJ.MIN" suffix for similarity with the paraview convention
- use sentinel file to ensure clean change of intermediate targets
- ensure all library files are being properly removed
Examples,
wmakePrintBuild -plus
Check if value is known
(ie, everything configured and also OpenFOAM+):
if wmakePrintBuild -plus >/dev/null 2>&1
then
echo YES
else
echo NO
fi
Check if version is new enough
if ofver=$(wmakePrintBuild -plus 2>/dev/null) && [ "$ofver" -ge 1612 ]
then
echo YES
else
echo NO
fi
Conditionals
ofver=$(wmakePrintBuild -plus 2>/dev/null)
case "${ofver:=0}" in
1612)
echo "something for 1612
;;
1706)
echo "something for 1706
;;
esac
- Could be related to interrupted builds.
So if there are any parts of the build that rely on an explicit
'wmakeLnInclude', make sure that the contents are properly updated.
--
ENH: improved feedback from top-level Allwmake
- Report which section (libraries, applications) is being built.
- Provide final summary of date, version, etc, which can be helpful
for later diagnosis or record keeping.
- The -log=XXX option for Allwmake now accepts a directory name
and automatically appends an appropriate log name.
Eg,
./Allwmake -log=logs/ ->> logs/log.linux64GccDPInt32Opt
The default name is built from the value of WM_OPTIONS.
--
BUG: shell not exiting properly in combination with -log option
- the use of 'tee' causes the shell to hang around.
Added an explicit exit to catch this.
--
- Detecting the '-k' (-non-stop) option at the top-level Allwmake, which
may improve robustness.
- Explicit continue-on-error for foamyMesh (as optional component)
- unify format of script messages for better readability
COMP: reduce warnings when building Pstream (old-style casts in openmpi)
- support gperftools-none, gperftools-system configurations
as per other third-party packages.
STYLE: clean up more environment variables
CONFIG: testing adios rule
- these directories are sometimes used for a central, non-thirdparty, non-system
installation
- leave gmp and mpfr as is, since it is not clear how these would interact with system
versions
On 64-bit systems, the system installations of boost, cgal are under
lib64/. The behaviour for a ThirdParty build is mostly lib/ but this
can also be changing.
Boost 1_62_0 and older build into 'lib/'.
CGAL-4.9 builds into 'lib64/', older versions into 'lib/'.
Future-proof things by using lib$WM_COMPILER_LIB_ARCH for boost and
cgal build rules, and forcing these as build targets in the ThirdParty
makeCGAL as well.
--
STYLE: check for boost/version.hpp, CGAL/version.h instead their directories
- CGAL itself includes its library dependencies, we only need to
provide the -L... option to the proper ThirdParty locations.
Should help improve general build robustness.
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.
The pre-processor macro 'OPENFOAM_PLUS' is defined with a numerical
value equal to the currently compatible version number.
This can be used judiciously within user coding to help with minor
differences between OpenFOAM versions. For example,
#ifdef OPENFOAM_PLUS
#if (OPENFOAM_PLUS >= 1612)
...
#endif
#endif
or simply
#if (OPENFOAM_PLUS >= 1612)
...
#endif
- return 0 if not under git, since nothing particular can be said
about the build number.
- explicitly define which git-dir is to be used.
This ensure we don't accidentally get some values from some unrelated
project in the parent directory.
and added support for queue scheduling option '-q', '-queue'
Now the 'Allwmake' scripts execute 'wmake -all' to handle parallel
processing in a general way, avoiding code duplication.
wmakeCollect collects the compilation commands for the all of the object
files to be compiled into a single makefile which is passed to make to
schedule the compilations in parallel efficiently.
Before wmakeCollect can be called the lnInclude directories must be
up-to-date and after wmakeCollect the linkage stage of the compilation
must executed using wmake.
This entire process is now handled by wmake using the new '-queue' or
'-q' option to compile sections of the OpenFOAM source tree or the
entire tree efficiently. The number of cores the compilation executes
on may be specified either using the WM_NCOMPPROCS variable or the '-j'
option.
To efficiently compile OpenFOAM after a 'git pull' the '-update' option
is provided which updates lnInclude directories, dep files and removes
deprecated files and directories. This option may be used with '-q':
wmake -q -update
which may be optionally overridden by version-specific rules.
For example the default rules for gcc on GNU/Linux x86_64 are in the
wmake/rules/linux64Gcc directory. If there is a need to change any of
the rules for a specific version of gcc, e.g. gcc-4.8.4 the directory
wmake/rules/linux64Gcc48 may be created into which any of the language
files may be provided containing the rules to override the defaults.
The Makefiles are now in the makefiles sub-directory
The "-f | -force" option in wmakeLnInclude is now "-u | -update" for
consistency with the other scripts.
The "Usage" entry in the headers is now consistently formatted in all
scripts.
wcleanPlatform is a more general and cleaner version of wcleanMachine
supporting the "-all" option to provide the equivalent of wcleanAll.
Both wcleanMachine and wcleanAll are now deprecated and will be removed
for the next major release.
Updates lnInclude directories and dep files before compilation. This is
useful to apply following a "git pull" to ensure consistency between the
source files, dep files and links.
Searches all the "src" and "application" directories of the project for
broken symbolic links for source code files and then remove all .dep
files that relate to the files that no longer exist. Must be executed
in main project source code folder: $WM_PROJECT_DIR
Patch provided by Bruno Santos
Resolves feature-request http://www.openfoam.org/mantisbt/view.php?id=1941
It will exit after removing the empty folders and it will not do the
other standard "wclean" operations. This replaces the functionality
provided by "wrmdepold".
Patch provided by Bruno Santos