Commit Graph

726 Commits

Author SHA1 Message Date
Mark Olesen
a54aff9d26 COMP: add wmake rules for mingw (#1238) 2019-04-28 13:36:50 +02:00
Mark Olesen
ed6b26ba45 BUG: had clang++ instead of armclang++ 2019-04-29 21:10:14 +02:00
Mark Olesen
897528da1a ENH: streamline handling of static/dynamic libs in detection scripts 2019-04-29 10:04:44 +02:00
Mark Olesen
beefee48d4 COMP: adjust compilation order with updated interdependencies
- 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)
2019-04-28 14:44:33 +02:00
Mark Olesen
4a1208ed30 ENH: add handling of exe file extensions in wmake/src/Makefile (#1238)
- change internal naming from 'EXE_EXT' to 'EXT_EXE' for symmetry with
  'EXT_SO'
2019-04-26 14:20:01 +02:00
Mark Olesen
2d7c266d37 STYLE: formatting in makefiles, config files
- 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.
2019-04-16 12:39:25 +02:00
Mark Olesen
8928ac54bd COMP: use standard compiler macros when distinguishing the OS
- replace (darwin) with (__APPLE__)
- replace (solarisGcc) with (__sun__ && __GNUC__)
- instead of 'darwin' -> '__APPLE'

- cease with passing a -D$(WM_ARCH) define since this adds no useful
  additional information and isn't used anywhere.

Reference
http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system

--

COMP: Extend size disambiguation on long (#1238)
2019-04-12 18:42:30 +02:00
Mark Olesen
ee4300b0a1 CONFIG: wmake -show-xyz in more places (issue #1256) 2019-04-12 11:02:30 +02:00
Mark Olesen
787325a916 COMP: manage cpu architecture with cARCH, c++ARCH internal make variables
- allows better separation from compiler settings

- use -fPIC instead of legacy -KPIC for intel compiler
2019-04-12 12:59:11 +02:00
Mark Olesen
09cf9d9963 CONFIG: adjust settings for solaris and darwin
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)
2019-04-12 11:06:45 +02:00
Mark Olesen
51aae5f34d CONFIG: bump API to 1904 for changes in interaction with external MPI 2019-04-10 18:00:04 +02:00
Mark Olesen
eb6ccdf7b1 CONFIG: adjust adios config paths 2019-04-10 16:08:21 +02:00
Mark Olesen
f0f4af16d2 Merge remote-tracking branch 'origin/master' into develop 2019-04-08 12:05:24 +02:00
Mark Olesen
63a1826211 ENH: provide 'sanitized' values for wmake -show compiler information (#1256)
- 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
2019-04-05 15:30:30 +02:00
Mark Olesen
cd91a252ac ENH: improve handling of pt-scotch headers/libraries
- 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.
2019-04-05 13:10:53 +02:00
Mark Olesen
939144233c STYLE: adjusted wording and messages for wmake
- add an additional test for wmake pre-processing
2019-04-03 08:57:01 +02:00
Mark Olesen
51bf7af8ae ENH: support wmake -show options for compiler information (#1256)
- 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
2019-04-01 09:03:48 +02:00
Mark Olesen
d2eb50832c ENH: add handling of lib/exe file extensions in makefile (#1238)
- relocates some logic from makefiles/general into platform-specific
  overrides
2019-03-14 10:42:57 +01:00
Mark Olesen
a2fb1d0bdd COMP: add wmake rules for Pgi compiler (#1234) 2019-03-11 15:56:40 +01:00
Mark Olesen
e46b241378 CONFIG: bump API version number to 1902 to register changes in surface writers 2019-03-11 15:28:55 +01:00
Mark Olesen
ce947eeb09 STYLE: relocate -mcpu into compiler instead of compiler-flags (#1225) 2019-03-01 18:34:05 +01:00
Mark Olesen
ec93384c1d COMP: adjust ARM compilation flags (#1225)
- with -mcpu=native for automatic detection and -armpl for linking in
  the performance libraries

STYLE: relocate -mcpu into compiler instead of compiler-flags (#1225)
2019-03-01 18:20:41 +01:00
Mark Olesen
f01849ffd4 COMP: adjust ARM compilation flags (#1225)
- with -mcpu=native for automatic detection and -armpl for linking in
  the performance libraries
2019-03-01 18:20:41 +01:00
Mark Olesen
473e000bed ENH: enable MPI library variants (#1153)
- 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
2019-01-28 19:19:09 +01:00
Mark Olesen
63d8e7e576 ENH: make use of FOAM_API for environment as well (issue #1158)
- 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
2019-01-10 12:21:19 +01:00
Mark Olesen
fd8379fdbe CONFIG: update MPICH and MVAPICH versions/rules
- 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.
2019-02-14 18:09:37 +01:00
Mark Olesen
97994734d2 CONFIG: bump API version number to 1901 to register recent changes
- objectRegistry search, erase methods
  - clip, minMax
  - function object triggering
  ...
2019-02-06 12:01:29 +01:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Andrew Heather
cab94a5d0a Merge remote-tracking branch 'origin/master' into develop 2019-02-04 10:55:34 +00:00
Mark Olesen
b0fafd18fe STYLE: reorganize some legacy and less frequently used components
- older emacs tools into legacy
- old process tools

* Less frequently used scripts into bin/tools/

  - findEmptyMake
  - foamAllHC
  - foamUpdateCaseFileHeader

* Infrastructure file (only used by foamNewApp)

  - wmake/wmakeFilesAndOptions -> wmake/scripts/wmakeFilesAndOptions

* Merge wmakeRoot convenience as 'wmake -pwd'
* Remove obsolete wmakePrintBuild (superseded by wmakeBuildInfo)
* Remove unused mergeHistory file
2019-01-26 11:30:50 +01:00
Mark Olesen
ef6c2ef590 CONFIG: combine wmake rules for KNL architecture as a compile option
- 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.
2019-01-25 17:39:05 +01:00
Mark Olesen
3d98c3d593 ENH: add -root option for wmakeLnInclude (convenience)
- 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
2019-01-25 16:20:58 +01:00
Mark Olesen
65e94fde66 DEFEATURE: remove wmakeScheduler (issue #1178)
- 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.
2019-01-23 12:43:41 +01:00
Mark Olesen
03bd58ee3a CONFIG: update openmpi-1.10 minor 2019-01-21 13:40:06 +01:00
Mark Olesen
1dd7362aed ENH: wmakeRoot for locating the root directory 2019-01-18 10:58:07 +01:00
Mark Olesen
fcf4c5fb22 ENH: wmake have_* script changes
- use local 'prefix' variable for easier override and more consistency
2019-01-10 20:14:46 +01:00
Mark Olesen
bef508dedc ENH: make use of FOAM_API for environment as well (issue #1158)
- 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
2019-01-10 12:21:19 +01:00
Mark Olesen
c7350f3dd7 Merge remote-tracking branch 'origin/master' into develop 2019-01-07 19:13:11 +01:00
Mark Olesen
d76dd0e1fe CONFIG: remove bash dependency from wmakeBuildInfo (fixes #1152)
- looks slightly messier without associative arrays, but improves
  portability. Should now also work with dash.

STYLE: support wmakeBuildInfo -cmp and -check options as equivalent
2019-01-06 10:50:37 +01:00
Mark Olesen
7bf25dbda1 ENH: add 'Scan' WM_COMPILE_OPTION (clang only)
- backend settings for scan-build
2019-01-02 11:49:49 +01:00
Mark Olesen
4ecdb2512d CONFIG: add llvm-7.0.1
STYLE: generalize rule for obtaining compiler stem
2019-01-02 11:08:21 +01:00
Mark Olesen
dd2c7c4894 ENH: add wmakeVersioned with tracking of ThirdParty dependencies
- primarily for handling cmake replacement libraries
2018-12-15 15:49:48 +01:00
mattijs
e17f6073b9 CONFIG: bump API version number to 1812 to register recent changes 2018-12-13 15:23:04 +00:00
Mark Olesen
a38b459ab0 CONFIG: use project api instead of version when finding config files 2018-12-10 14:04:01 +01:00
Mark Olesen
69006ef0a7 ENH: adjust wmakeBuildInfo to work with older git versions as well 2018-12-10 09:49:45 +01:00
Mark Olesen
0e4ccd7cef ENH: improve build naming without git
- now defaults to the project-version when absolutely nothing else is
  known

STYLE: simplify internal calling in wmakeBuildInfo
2018-12-08 18:18:17 +01:00
Mark Olesen
6c68c34e1a ENH: update handling of versioning and make control (issue #1010)
- 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.
2018-12-02 18:25:57 +01:00
Mark Olesen
b8c257d6ad CONFIG: adjustments to environment
- 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)
2018-12-03 09:50:48 +01:00
Mark Olesen
d587e2f03f ENH: append date to build info
- 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.
2018-11-29 23:03:57 +01:00
Mark Olesen
628b2445fc ENH: improve setup for paraview
- 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.
2018-11-29 01:48:00 +01:00
Mark Olesen
9065346a05 ENH: additional handling of questionable bad FOAM_EXT_LIBBIN values
- 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.
2018-11-27 12:23:11 +01:00
Mark Olesen
820b63e0b2 CONFIG: bump API version number to 1811 to register recent changes 2018-11-26 15:14:01 +01:00
Mark Olesen
973a940028 COMP: provide Allmake script for wmake tools
- convenient when bootstrapping some systems
2018-11-22 09:35:17 +01:00
Mark Olesen
e35ac89efb CONFIG: include static libraries in FFTW search (#1087) 2018-11-21 13:49:16 +01:00
Mark Olesen
2fc1a1692b CONFIG: adjust handling of PETSc environment (-force option) 2018-11-06 09:01:40 +01:00
Mattijs Janssens
fdf19d67a4 Merge branch 'feature-coordinateSystem' into 'develop'
coordinate system improvements

See merge request Development/OpenFOAM-plus!211
2018-10-11 16:32:03 +01:00
Mark Olesen
9129dbd46f Merge remote-tracking branch 'origin/master' into develop 2018-10-11 11:01:16 +02:00
Mark Olesen
aafbb6723f BUG: wmkdepend sometimes throws (closes #1036)
- 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.
2018-10-10 15:33:35 +02:00
Andrew Heather
4b7c21bc3c BUG: foamNewSource - corrected Make/options for app mode. Closes #1006 2018-10-09 09:47:54 +01:00
Mark Olesen
6697bb4735 ENH: improve, simplify, rationalize coordinate system handling (issue #863)
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.
2018-10-01 13:54:10 +02:00
Andrew Heather
54457c68b6 Merge remote-tracking branch 'origin/master' into develop 2018-09-21 16:01:16 +01:00
Mark Olesen
32d5030088 BUG: incorrect kahip resolution with absolute paths (closes #1003)
- for installations with central (non-ThirdParty) location for KAHIP
  (eg, spack, EasyBuild)
2018-09-12 08:37:53 +02:00
Mark Olesen
d40103a86f CONFIG: extend wmake detection scripts 2018-07-31 11:25:53 +02:00
Mark Olesen
f00c7a655c COMP: rename dictionary::read<T> to dictionary::readEntry<T>
- avoids compiler ambiguity when virtual methods such as
  IOdictionary::read() exist.

- the method was introduced in 1806, and was thus not yet widely used
2018-07-30 15:52:40 +02:00
Bernhard Gschaider
dd775c6e68 CONFIG: add trapping-math for darwin 2018-07-30 12:18:40 +02:00
Mark Olesen
94a89d530a COMP: reduce compiler warnings for gcc-7
- 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.
2018-07-24 09:29:01 +02:00
Mark Olesen
831a47b81e CONFIG: eliminate most occurances of outdated FOAM_INST_DIR (issue #444)
- 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.
2018-06-25 09:56:34 +02:00
Mark Olesen
f5275444cc CONFIG: adjust adios2 config 2018-06-19 13:53:23 +02:00
Mark Olesen
418cc9b268 STYLE: minor adjustments in wmake scripts.
- comments
- avoid egrep for getting processor count.
- wcleanBuild, wcleanPlatform with shorter form '-curr' instead of '-c'
  to avoid any potential user confusion with '-comp'
2018-07-22 18:28:29 +02:00
Andrew Heather
c909a5df25 GIT: resolved merge conflict 2018-06-13 14:20:18 +01:00
Alexey Matveichev
9258b558f4 ENH: Darwin adjustments
- 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
2018-06-13 13:32:19 +02:00
Mark Olesen
e3f85039a0 CONFIG: set API version number to 1806 for pre-release branch 2018-06-13 13:10:14 +02:00
Alexey Matveichev
cdb6d5a604 CONFIG: remove Darwin GCC wmake rules (partly broken, poorly tested) 2018-06-01 14:35:43 +02:00
Mark Olesen
12553a2e43 COMP: include /usr/local in search for system headers/libraries
- this is consistent with compiler defaults, and helps Darwin users
2018-05-30 14:45:12 +02:00
Mark Olesen
e3bb7ffd25 STYLE: avoid mix of 'sinclude' and '-include' in make files 2018-05-28 10:46:40 +02:00
Mark Olesen
4289242c07 Merge remote-tracking branch 'origin/master' into develop 2018-05-16 16:07:00 +01:00
Mark Olesen
c18a2a6370 BUG: compiler-specific INTELMPI not always found (closes #830)
- tie the MPI rules to the base compiler type *without* its version.
  Eg, linux64Gcc (which exists) instead of linux64Gcc81
2018-05-16 12:36:29 +01:00
Mark Olesen
b0648f2ba0 ENH: improvements in the surface sampling infrastructure
- 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.
2018-05-07 11:29:00 +02:00
Mark Olesen
c0766ce8ea STYLE: consistent '// End namespace' markers 2018-04-27 09:51:35 +02:00
Mark Olesen
497dde2b2f CONFIG: bump API version number to 1804 to account for bitSet
- 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.
2018-04-26 09:28:42 +02:00
Mark Olesen
ebfe46503f STYLE: improve wmkdepend parse error message
- 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.
2018-04-25 14:37:59 +02:00
Mark Olesen
76cb38fbc7 CONFIG: adjust make scripts for darwin
- 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
2018-04-24 21:20:06 +02:00
Mark Olesen
2768500d57 CONFIG: remove WM_LINK_LANGUAGE env variable (always c++)
- was somewhat redundant in wmake/rules/General/general anyhow
2018-04-24 14:59:47 +02:00
Mark Olesen
b4d38ab468 ENH: improve handling of ThirdParty packages
- 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.
2018-04-24 14:51:19 +02:00
Mark Olesen
29c020f5b3 COMP: sinclude platform-specific CGAL rules
- permits platform-specific override of the general CGAL rules
2018-04-24 09:26:50 +02:00
Mark Olesen
1f25c5975d BUG: wmkdepend finds 'include' in multi-line comments (closes #784)
- 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
2018-04-20 14:41:32 +02:00
Mark Olesen
aeef1cd4df BUG: wmkdepend parser missing some files
- adjusted grammar to be more precise
2018-04-17 09:20:01 +02:00
Mark Olesen
b29a0119de ENH: minor code tidying, machine simplifications for wmkdepend parser 2018-04-13 16:17:39 +02:00
Mark Olesen
de72a04aeb ENH: make it easier to switch between the various make dependencies programs.
- 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
2018-04-12 10:14:03 +02:00
Mark Olesen
297570de53 COMP: some low-level darwin-related patches
- 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).
2018-04-09 12:48:55 +02:00
Mark Olesen
1676bd4003 ENH: replace flex-based wmkdep with ragel-based parser (issue #784)
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)
2018-04-11 12:31:36 +02:00
Mark Olesen
52cf2d68c4 STYLE: avoid 'sed -i' in wmake rules
- less efficient and less portable than using single-pass processing
2018-04-08 22:15:21 +02:00
mattijs
b854ce228e ENH: wmkdep: better error message. See #784. 2018-03-28 16:39:05 +01:00
Mark Olesen
2db4b0867e CONFIG: consolidate C++ flags per compiler type
- easier to ensure that flags are consistent
2018-03-21 11:50:57 +01:00
mattijs
a0a039ad57 ENH: armclang: new compiler type. Fixes #779. 2018-03-21 12:08:44 +00:00
Mark Olesen
451f8e0357 Merge remote-tracking branch 'origin/master' into develop 2018-03-07 18:08:07 +01:00
Mark Olesen
664685f7fe CONFIG: bump API version number to 1803 to account for removal of Xfer
- 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.
2018-03-05 20:18:26 +01:00
Mark Olesen
7f7f9336c8 COMP: add -fpermissive to c++LESSWARN flags (closes #744)
- 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
2018-02-28 14:31:48 +01:00
Mark Olesen
f95f8bf512 COMP: wmake/wmakePrintBuild -api failed to extract API number 2018-02-22 10:54:16 +01:00
Mark Olesen
e2332d6bd2 COMP: better handling of versioned cmake libraries
- sentinel was not working properly when building user-space routines
2018-01-31 08:35:56 +01:00
Mark Olesen
1b9aec2a3d CONP: suppress register warnings for clang only 2018-01-30 06:49:32 +01:00
Mark Olesen
995c55b60e CONFIG: add clang third-party lib to LD_LIBRARY_PATH
- 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
2017-12-19 16:07:15 +01:00
Mark Olesen
c70d7237e2 STYLE: more robust extraction of API number from wmake rules 2017-12-17 15:19:09 +01:00
Mark Olesen
2795d64384 COMP: suppress clang warnings about unknown compiler warning option
- allows enabling new warnings without causing messy output with older
  clang versions
2017-12-15 20:02:26 +01:00
Mark Olesen
405cf8129a CONFIG: update some wmake rules
- initial settings for ADIOS2, linuxARM64Gcc, linuxARM64Clang
2017-12-07 15:41:58 +00:00
Mark Olesen
570e1ab0ba fixup CONFIG: update versions of ThirdParty software 2017-12-08 09:34:02 +00:00
Mark Olesen
5947f9a337 ENH: more succinct output from command-line errors.
- 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.
2017-11-24 10:27:11 +01:00
Mark Olesen
ba8fdda5cc ENH: improve wcleanBuild, wcleanPlatform flexibility (issue #627)
- 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.
2017-10-30 10:31:05 +01:00
Mark Olesen
e03ca4c466 CONFIG: add Cray compiler, cray mpich settings, wmake rules (fixes #558)
- the cray C/C++ compilers appear to be option-compatible with gcc.

- no wmake rules for 32bit builds (deemed to be unnecessary)
2017-08-04 11:09:32 +02:00
Mark Olesen
e1167d9592 ENH: provide openmp compile and link flags.
- the USE_OMP preprocessor symbol is also defined with the openmp
  compile flag to allow conditional compilation of openmp-specific
  code.
2017-10-23 09:38:43 +02:00
Mark Olesen
049617d037 ENH: update List and DynamicList methods (issue #595)
- 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
2017-09-20 17:20:54 +02:00
Mark Olesen
a531168ae4 COMP: reinstate rules for various C++ suffixes (issue #607) 2017-09-29 18:07:42 +02:00
Henry Weller
0fdcb12759 Updated to avoid warnings from gcc-7.1.1 2017-07-31 13:46:42 +01:00
Mark Olesen
df403965ab ENH: suppress wmkdep 'No such file' warnings in wmake -silent mode 2017-06-27 09:29:56 +02:00
Mark Olesen
104f43583f CONFIG: bump baseline version to 1706
- not yet release, but some of the API and file locations are closer
  to 1706 than to 1612. Needed, for example, for swak4foam.
2017-05-30 15:09:06 +02:00
Andrew Heather
2e9bead519 MRG: merged develop line back into integration branch 2017-05-18 11:11:12 +01:00
Mark Olesen
8006d64d74 COMP: skip compilation of plugins if include files are missing (fixes #464) 2017-05-05 10:02:34 +02:00
Mark Olesen
7f01a4beda CONFIG: address differences between shells
- 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.
2017-04-20 11:02:54 +02:00
Mark Olesen
765c430748 STYLE: only count processors if required
- POSIX specifies '-c' for counting the number of matching lines,
  so we can just use that instead of 'wc' in wmake
2017-04-19 19:13:23 +02:00
Mark Olesen
4d29c32e9b ENH: improve handling of wmakeLnIncludeAll default search directories
- 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
2017-04-19 18:31:21 +02:00
Mark Olesen
446b8e7188 STYLE: respect WM_DIR value when building wmake tools
- minor bug: 'wclean empty' may have had issues with logical vs physical path
2017-03-29 13:49:15 +02:00
Andrew Heather
436ec1cf1f MRG: Integrated Foundation code to commit ba4dbed 2017-03-23 12:11:49 +00:00
Andrew Heather
04c3d535b0 MRG: Integrated Foundation code to commit 47bd8e1 2017-03-23 10:12:38 +00:00
Mark Olesen
b970ba0901 ENH: minor improvements to environment
- 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
2017-03-20 08:57:12 +01:00
Mark Olesen
249f334f83 ENH: respect '-silent' option for cmake builds
- minor cleanup of wmake sources
2017-03-15 13:06:45 +01:00
Mark Olesen
8db517bfbb CONFIG: provide Clang38, Clang39 compiler settings
- easier to test or use different versions

- change WM_CXXFLAGS to -std=c++11 instead of -std=c++0x
2017-03-10 18:13:49 +01:00
Mark Olesen
10fc0646fb BUG: 'make clean' failed for wmake/src
- 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)
2017-03-09 11:48:52 +01:00
Mark Olesen
2bfd17cf8d ENH: add 'wmkdep' to warnings and error messages from wmkdep
- makes it possible to filter out or highlight messages originating
  from wmkdep in the build process.
2017-03-09 10:20:14 +01:00
Mark Olesen
6057479926 ENH: provide wcleanBuild and improve wcleanPlatform
- 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
2017-02-24 12:20:45 +01:00
Mark Olesen
cc51def1fd STYLE: minor cleanup of foamEtcFile 2017-02-23 09:17:46 +01:00
Mark Olesen
c1ca2f4a38 BUG: missing chdir in Allwclean for wallFunctionTable
STYLE: improve consistency in Allwclean scripts
2017-02-23 01:07:10 +01:00
mark
32a78d12e2 ENH: wclean all now finds Allwclean files too (issue #408)
- this may still need more testing, but the basic idea is to find
  directories with 'Allwclean' or 'Make' and process them (once!)
2017-02-21 19:40:35 +01:00
mark
9e2e111518 STYLE: adjust ordering of 'find' command arguments
- use -name test before -type test to avoid calling stat(2) on every file.
- use -delete instead of -exec rm to avoid forking
2017-02-21 19:19:04 +01:00
Mark Olesen
957635200a ENH: build into build/ directory instead of platforms/ (issue #312)
- makes it slightly easier when packaging various binaries, or when
  building packages for installation via modules etc.
2017-02-10 20:30:15 +01:00
Mark Olesen
3d02c8a530 ENH: improve isolation of shell variables in wmake scripts
- reduces unexpected interactions between various make elements
2017-02-10 16:13:54 +01:00
mark
e82a029453 ENH: add help/usage for dirToString, wmkdep. Add dirToString -strip option.
- The dirToString -strip option is simple, but reduces effort for the caller.
2017-02-10 14:10:00 +01:00
Mark Olesen
46ecad8f7a STYLE: make wmake scripts look more POSIX-like
- also add some comments about the side-effects
2017-02-10 11:38:12 +01:00
Mark Olesen
6343e1e3b3 ENH: have wmake and wclean do something sensible with a filename as target
- For convenience, let "wmake some/path/filename.C"
  behave similar to    "wmake some/path"
  and trace back for the Make directory.
2017-02-10 10:33:50 +01:00
Henry Weller
f92862a42c Allwmake: Provides clearer message when OpenFOAM environment is not loaded
Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2424
2017-01-28 17:57:13 +00:00
Mark Olesen
9d63cc5ca8 ENH: add versioning for VTK library to runTimePostProcessing (issue #370)
Eg,
    librunTimePostProcessing.so
    librunTimePostProcessing.so.7 -> librunTimePostProcessing.so.7.1.0
    librunTimePostProcessing.so.7.1.0

- centralize handling of paraview/vtk versioning into wmake/cmakeFunctions
2017-01-23 13:37:42 +01:00
Henry Weller
1d8b31d390 Updates for clang++-3.9 2017-01-18 18:12:45 +00:00
Henry Weller
f53293441b Corrected spelling mistake existance -> existence
Patch provided by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2425
2017-01-08 23:08:41 +00:00
Mark Olesen
7a90f5e6fb ENH: add versioning to paraview plugin support libraries (issue #370)
- 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
2017-01-05 16:22:07 +01:00
Mark Olesen
23d24a511e ENH: command-line query for the OPENFOAM_PLUS wmake value (issue #378)
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
2017-01-12 11:25:37 +01:00
Henry Weller
2a95bdc2a4 wmake: Corrected comments
Patch contributed by Bruno Santos
Resolves bug-report https://bugs.openfoam.org/view.php?id=2408
2016-12-27 14:15:32 +00:00
Mark Olesen
608bb5d83b COMP: update lnInclude directories when building (issue #364)
- 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)
2016-12-22 11:26:29 +01:00
Mark Olesen
91b7ede14b STYLE: adjust log name for 'Allwmake -log' (issue #333)
- now defaults to 'log.$WM_OPTIONS' (eg, log.linux64GccDPInt32Opt)
  for more clarity and fewer potential name clashes when building
  multiple versions.
2016-12-15 13:20:21 +01:00
Mark Olesen
13c3b1d617 ENH: Allwmake -log=name option to specify log name (issue #333)
- helpful when testing various builds
2016-12-13 20:53:05 +01:00
Andrew Heather
989883d62b GIT: Resolved merge conflict 2016-12-12 12:23:45 +00:00
Andrew Heather
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
Mark Olesen
1a9ee8f07b COMP: ubuntu build with CGAL lacks dependency on gmp/mpfr (issue #288)
- slightly odd. Building CGAL on other Linux systems have a proper
  ldd dependency for gmp/mpfr, but ubuntu doesn't
2016-12-09 16:55:04 +00:00
Mark Olesen
eb00c8021d ENH: provide log option for top-level builds (issue #333) 2016-12-09 14:44:26 +00:00
Mark Olesen
4013532aaa STYLE: simplify adios rules
- now that adios_config flags are largely working in ThirdParty
2016-11-28 22:12:01 +01:00
Mark Olesen
00c3c6f9a7 ENH: improve configuration of gperftools (now at version 2.5)
- support gperftools-none, gperftools-system configurations
  as per other third-party packages.

STYLE: clean up more environment variables

CONFIG: testing adios rule
2016-11-27 16:24:40 +01:00
Mark Olesen
dc1c37e464 COMP: add in plain lib/ directories for boost, cgal, fftw
- 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
2016-11-25 20:43:27 +01:00
Henry Weller
5ffdb2d4b3 wmake/scripts/AllwmakeParseArguments: Avoid duplicate command message
when Allwmake is called from wmake -all
2016-11-14 12:37:52 +00:00
Henry Weller
5050a6cf10 wmkdep.l: Removed redundant #include 2016-11-14 11:22:00 +00:00
Henry Weller
01a0fcb996 wclean: Removed duplicate echo of directory 2016-11-14 08:54:53 +00:00
Henry Weller
11ee31d17a wmake: Removed redundant QUIET_OP 2016-11-14 08:39:55 +00:00
Henry Weller
2dbfe2a75e wmake: Moved wmkdep messages into rules/General/transform makefile 2016-11-14 08:32:30 +00:00
Henry Weller
961b653183 wmake: Suppress the "is up to date" messages
Avoids a lot of unnecessary clutter in the compilation log.
2016-11-13 22:41:42 +00:00
Henry Weller
b50d7d78f7 wmake: Removed unnecessary '->>' line from output
Changed 'ld' line to include path of target library or executable.
2016-11-13 22:14:53 +00:00
Henry Weller
82faf7eff0 wmake: Indent the 'result' message 2016-11-13 18:42:08 +00:00
Henry Weller
80db302666 Allwmake: Remove 'set -x' which generates a lot of noise
'set -x' should be used for debugging.

Added command printing into wmake and Allwmake as a replacement for
'set -x' to log current target.
2016-11-13 18:08:22 +00:00
Henry Weller
985abe023e wmake: Declare all makefiles to be specifically GNU make files 2016-11-13 15:18:09 +00:00
Henry Weller
8a4c43e377 wmake: suppress "Nothing to be done for" messages 2016-11-13 15:16:42 +00:00
Henry Weller
79081ba3bb wmake: Simplified QUIET_MESSAGE function 2016-11-13 11:19:29 +00:00
Henry Weller
8b0ec47566 wmake/src/Makefile: Removed additional $E 2016-11-13 10:24:16 +00:00
Henry Weller
d676ccf01d wmake/rules/General/yacc: Added QUIET_MESSAGE 2016-11-13 10:23:53 +00:00
Henry Weller
997f1713cb wmake: Update '-s' option to print the files processed without the rules
Based on patch contributed by Alexey Matveichev
Resolves feature request http://bugs.openfoam.org/view.php?id=2328
2016-11-12 22:01:44 +00:00
Mark Olesen
e8f6099a1f COMP: Newer CGAL versions break current CGAL wmake rules (issue #288)
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
2016-11-04 12:05:35 +01:00
Andrew Heather
af81184ecf MRG: Resolve conflict with latest foundation merge 2016-10-26 15:37:15 +01:00
Henry Weller
42c2e6baca wmake/rules/General/transform: added filter for third-party paths
Resolves bug-report http://bugs.openfoam.org/view.php?id=2283
2016-10-09 15:14:19 +01:00
Henry Weller
6c3c2f1399 icpc rules: removed another unimportant warning 2016-10-04 08:10:28 +01:00
Andrew Heather
3df66b25ec STYLE: minor updates 2016-10-03 08:24:22 +01:00
Mark Olesen
22a7a70256 Merge remote-tracking branch 'origin/merge-foundation' into adjust-config-foundation-merge 2016-09-30 17:50:20 +02:00
Andrew Heather
bd0e982d99 MRG: Initial commit after latest Foundation merge 2016-09-30 11:16:28 +01:00
Mark Olesen
3c86995198 COMP: remove boost/mpfr/gmp linkage for foamyMesh components.
- 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.
2016-09-30 17:00:05 +02:00
Henry Weller
40f8709488 wmake: export WM_SCHEDULER from sub-shell for non-POSIX bash compliance 2016-09-22 08:34:15 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
0a1300d882 wmake: Updated '-q' option to work on Ubuntu and other 'dash'-based GNU/Linux distributions 2016-09-09 14:53:10 +01:00
Henry Weller
74e1352cc2 src/Pstream: Added Allwclean consistent with the Allwmake
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2218
2016-08-25 08:25:12 +01:00
Henry Weller
f75e69b5f7 wmake/rules/linux64.*KNL: Improved optimization option for Intel MIC (Knights Landing) processor
Patch contributed by Paul Edwards, Intel.
2016-08-22 16:27:46 +01:00
Henry Weller
82aa78a4d4 wmake/rules/linux.*Icc: Removed a new unhelpful warning message 2016-08-11 16:25:53 +01:00
Henry Weller
7996a9138f C++11: Update compilation rules to specify C++11 support and conformance
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.
2016-08-05 16:28:19 +01:00
Henry Weller
3a3966d400 wmake/rules/linux.*Icc: Updated for icpc (ICC) 16.0.3 20160415 2016-07-28 13:47:44 +01:00
Mark Olesen
1b55666ec7 ENH: distinguish OpenFOAM version for user-coding (fixes #195)
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
2016-07-26 14:02:40 +02:00
Henry Weller
13e8fce173 wmake: Use functions from wmakeFunctions to avoid code duplication
wclean: added support for automatic searching up the tree for the Make directory if in a sub-directory
2016-07-17 22:59:55 +01:00
Mark Olesen
9a82743d32 STYLE: bump to v1609+ for foundation merge version 2016-09-29 12:00:00 +02:00
Mark Olesen
a6a8069d84 BUG: incorrect wmakePrintBuild -check behaviour when outside of git (issue #174)
- 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.
2016-07-12 17:37:30 +02:00
Henry Weller
47b9b3a88a AllwmakeParseArguments: Correct call to wmake -all
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2146
2016-07-10 22:04:50 +01:00
Henry Weller
79e31173bd wmakeFunctions: Added '()' to depToSource definition
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2144
2016-07-09 20:45:46 +01:00
Henry Weller
cdb5d024f0 wmake: Simplified handling of '-j' option to sub-processes 2016-07-09 14:22:29 +01:00
Henry Weller
c022898851 wmakeLnIncludeAll: Add '-update' option 2016-07-09 14:22:14 +01:00
Henry Weller
c3f50d3c2b wmakeLnInclude: Minor simplifications and reformatting 2016-07-09 14:21:44 +01:00
Henry Weller
5b28e12ad3 wmakeCollect: Use 'mktemp' to create the temporary Makefiles
to avoid file names which are two long for the standard GNU/Linux file systems.
2016-07-09 14:20:31 +01:00
Henry Weller
7d553a1853 wmakeFunctions: Added a faster bash version of 'depToSource' 2016-07-09 14:19:47 +01:00
Henry Weller
bbc43dd66e wmakeCollect: Create the makefiles in the platforms directory 2016-07-09 09:59:46 +01:00
Henry Weller
02e14ffd4b wmakeLnIncludeAll: 'sync' does not guarantee synchronization of the links
A simple 'sleep' is more reliable.
2016-07-08 16:35:40 +01:00
Henry Weller
23ea3b364e wmakeLnIncludeAll: Improved messages 2016-07-08 14:02:57 +01:00
Henry Weller
10ad855d8d wmake: Improve messages from wclean, wrmdep and wmakeLnIncludeAll 2016-07-08 10:57:08 +01:00
Henry Weller
d7e6c04855 wmakeLnIncludeAll: When running parallel wait for the wmakeLnInclude jobs to complete
then synchronize the file system to ensure all links are flushed before
compilation starts
2016-07-08 08:22:28 +01:00
Henry Weller
a7fa5699df AllwmakeParseArguments: Filter-out '-q' option to avoid recusion 2016-07-07 16:22:08 +01:00
Henry Weller
c15eea16f1 wmakeLnIncludeAll: Now a bash script
Uses the 'wait -n' builtin to avoid the use of non-POSIX 'sleep' commands
2016-07-07 12:09:49 +01:00
Henry Weller
898b51c8a3 wmakePrintBuild -check: exit 0 if not a git repository 2016-07-05 21:50:34 +01:00
Henry Weller
aad28cbb78 wmakeCollect: Name the object makefiles based on the object path
Ensures the order of compilation relates to the location of the source files
2016-07-05 14:53:26 +01:00
Henry Weller
948e10841b wmakeCollect: Support simultaneous builds of different target architectures or compilers 2016-07-05 10:24:08 +01:00
Henry Weller
e8b098121c wmake: execute wmakeLnIncludeAll once with options 'queue' and 'update' 2016-07-05 07:54:45 +01:00
Henry Weller
af8e0f1443 AllwmakeParseArguments: Moved all parallel processing options into wmake
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.
2016-07-04 22:30:20 +01:00
Henry Weller
91a8421241 wmakeLnIncludeAll: Corrected type 2016-07-04 10:27:43 +01:00
Henry Weller
9e712bbfc7 wmakeLnIncludeAll: Use 'wait -n' rather than and arbitrary 'sleep' when limiting the number of jobs 2016-07-04 09:39:28 +01:00
Henry Weller
7093f478e4 wmake: use the new parallel wmakeLnIncludeAll option if WM_NCOMPPROCS is set 2016-07-03 23:11:16 +01:00
Henry Weller
6b77d86563 wmakeCollect: Experimental scheduler for wmake to speed-up parallel compilations
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
2016-07-03 22:55:16 +01:00
Henry Weller
17bec8aab2 wmakeLnIncludeAll: Added -j option for parallel operation 2016-07-03 22:22:00 +01:00
Henry Weller
47b6000c36 wmake/rules/General: Add support for WM_SCHEDULER to the compilation of lex, yacc and moc files 2016-07-03 22:21:02 +01:00
Henry Weller
dea6a3c6e8 wmake/Allwmake: Completed support for targetType 'objects'
Patch contributed by Mattijs Janssens
2016-06-24 15:25:11 +01:00
Henry Weller
96a038f281 foamyMesh: Simplify support for system CGAL installation 2016-06-21 19:47:46 +01:00
Henry Weller
7ecb1422ce wclean all: if an Allclean script exists in sub-directories execute otherwise execute wclean
Resolves bug-report http://bugs.openfoam.org/view.php?id=2125
2016-06-20 10:05:23 +01:00
Mark Olesen
f317958d5a BUG: wclean all does not use Allwclean in subdirectories (fixes #150)
- also reported as http://bugs.openfoam.org/view.php?id=2125
2016-06-20 11:04:25 +02:00
Henry Weller
b2223913d0 wmake/scripts/wmakeFunctions: Add support for $WM_PROJECT_DIR being a link 2016-06-15 14:22:33 +01:00
Henry Weller
326b646bb8 Allwmake -update: Further improvements to handle source-tree/dep file inconsistencies after git pull
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2091
2016-06-11 16:28:40 +01:00
Henry Weller
df904757b4 wmake/rules/General/CGAL: lib -> lib64 on 64bit OSs
Patch contributed by Bruno Santos
Resolves patch request http://bugs.openfoam.org/view.php?id=2114
2016-06-09 14:34:26 +01:00
Henry Weller
2443ed0a70 wmake/rules/linux64GccKNL: Optimized compilation options for the Knights Landing MIC processor 2016-06-04 10:13:22 +01:00
Henry Weller
82236c2b81 wmake/rules/linux64KNLIcc: Optimized compilation options the for Knights Landing MIC processor
Patch contributed by Paul Edwards, Intel
2016-06-03 15:29:14 +01:00
Henry Weller
af57fd2a3b wrmdep: Now prints the full path of the .dep files removed 2016-05-21 17:19:07 +01:00
Henry Weller
e7fc198592 Allwmake: improved '-update' option to handle out-of-date '.dep' files
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2091
2016-05-16 12:21:57 +01:00
Henry Weller
4107d312fa wmake/rules/linux.*Icc: Remove -xHost option which causes surfaceFeatureExtract to fail for some cases 2016-04-25 22:29:22 +01:00
Henry Weller
a9b8bb13e0 applications/.*/Allwmake: Updated to support "stop on 1st error"
Patch contributed by Bruno Santos
Resolved bug-report http://www.openfoam.org/mantisbt/view.php?id=2042
2016-04-04 09:03:40 +01:00
Henry Weller
9d0ab178b0 wmake/rules/linux64Clang/c++Opt: Removed temporary line 2016-04-03 14:46:45 +01:00
Henry Weller
5312f6c7f0 wmake/rules/linux64Icc: avoid uninteresting warning messages and change to -O3 2016-04-01 14:53:43 +01:00
Henry Weller
4e6f473a01 wmake/src/Makefile: Override WM_COMPILE_OPTION with Opt for optimized compilation of the wmake utilities
Resolves bug-report http://openfoam.org/mantisbt/view.php?id=2021
2016-03-08 14:24:11 +00:00
Henry Weller
ef86cd63d1 Update "wrmdep -update" to remove dead symbolic links
Patch provided by Bruno Santos
Resolved bug-report http://www.openfoam.org/mantisbt/view.php?id=2016
2016-03-06 19:13:45 +00:00
Henry Weller
95d146ecdf Rationalized the indentation of C-preprocessor directives 2016-02-29 15:42:03 +00:00
Henry Weller
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Henry Weller
cd265693f5 wmake: Update comments 2016-01-24 14:37:39 +00:00
Henry Weller
c3a03105c4 wmake: Add support for compiler type default rules
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.
2016-01-24 14:10:07 +00:00
Henry Weller
acb9ec8b46 wmake/rules: Add -std=c++0x to formally enable support for of C++11 features
The c++0x is used rather than c++11 to support gcc-4.5.?
2016-01-10 19:17:31 +00:00
Henry Weller
5355dbc5fe wmake: General cleanup to improve consistency and maintainability
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.
2015-12-16 18:31:02 +00:00
Henry Weller
d112699c9f Updated header 2015-12-15 15:40:06 +00:00
Henry Weller
416b0a6f2a wmakeLnIncludeAll: Start messages with capital 2015-12-15 15:39:26 +00:00
Henry Weller
3713b9e19b Updated header 2015-12-15 15:39:19 +00:00
Henry Weller
4b7c3ea5a5 wmakeLnInclude: Use xargs with find 2015-12-15 15:38:59 +00:00
Henry Weller
ea4936fd4e wcleanPlatform: Updated version of wcleanMachine and wcleanAll
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.
2015-12-15 12:12:06 +00:00
Henry Weller
92ab896216 wmake/makeWmake: Removed
Legacy script which is no longer used
2015-12-14 18:23:50 +00:00
Henry Weller
13094c2ab3 wcleanAll, wrmdep: Updated check for the WM_PROJECT_DIR 2015-12-14 17:49:02 +00:00
Henry Weller
3de4dcd838 AllwmakeParseArguments: Added "-update" option
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.
2015-12-14 11:03:16 +00:00
Henry Weller
fe1dc82e5a wrmdep: Update documentation 2015-12-13 21:23:04 +00:00
Henry Weller
f56a738f14 wrmdep: Added "update" option
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
2015-12-13 20:57:25 +00:00
Henry Weller
8429569091 wclean: Added the target "empty", which removes empty directories
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
2015-12-13 20:55:24 +00:00
Henry Weller
55f7d50be1 FreeBSD sed: ensure that a "-e" option immediately follows "-i" 2015-11-14 17:03:03 +00:00