Commit Graph

353 Commits

Author SHA1 Message Date
Mark Olesen
435be2e5ec CONFIG: improve flexibility of MPI specification
- it is now possible to include the selected mpi version in the
  top-level bashrc or prefs.sh file. For example,

      WM_MPLIB=OPENMPI-4.1.1  or  WM_MPLIB=openmpi-4.1.1

  after evaluation of the config.sh/mpi, this will define

      WM_MPLIB=OPENMPI-4.1.1  and  FOAM_MPI=openmpi-4.1.1

  During the wmake, the mpi-rules will first load the MPI 'family'
  rules (OPENMPI in this example) before trying to load
  version-specific rules if they exist.

  NOTE: the regular user-defined prefs system is unaffected by this
  change. This means it is still possible to use a file such as
  'prefs.openmpi' to define the preferred version instead or as well.
  However, it does mean inconsistent naming can be specified.
  For example, specify WM_MPLIB=OPENMPI-4.1.1 at the top-level but
  actually have FOAM_MPI=openmpi-4.0.6 in the prefs.openmpi file.
  This will make the value of WM_MPLIB misleading.

CONFIG: foamConfigurePaths support for sys-openmpi major version

CONFIG: cleanup any shadow env variables
2021-10-29 17:04:51 +02:00
Mark Olesen
c2697f466d CONFIG: update c++ standard, some compiler rules (partially addresses #2209)
- migrate to c++14 for most compilers *except* gcc.
  There are still many systems in use with gcc-4.8.5, which does not
  support c++14.

- initial rules for nvidia compilers (pgi is will soon be defunct).
  Not fully tested...

CONFIG: provide fallback value for the user directory name

- in containers may have an unset USER env variable.
  Default to 'user' to prevent ugly looking directory names.
2021-10-21 15:31:05 +02:00
Mark Olesen
9ab8c525cf CONFIG: set API level to 2107
- liquid film, blockMesh changes, multiWorld communicators
2021-07-28 17:17:41 +02:00
Mark Olesen
521a9e4dd6 Merge remote-tracking branch 'origin/master' into develop.mol
CONFIG: set API level to 2106 in ramp-up for release
2021-06-18 17:22:24 +02:00
Mark Olesen
f99ba1adbd CONFIG: bump API to 2103
- reflect updated tokenizing of expressions, scotch/paraview version
2021-05-19 18:25:17 +02:00
Mark Olesen
5a5fd1a43c COMP: sign check to avoid warnings about new[] range 2021-04-27 12:28:35 +02:00
Mark Olesen
308af39136 COMP: sign check to avoid warnings about new[] range 2021-04-27 10:20:25 +02:00
Jong-Gwan (Jason) Do
77375a88fd CONFIG: additional intel compiler flags (#2056) 2021-04-23 11:39:29 +02:00
Mark Olesen
d549826528 CONFIG: adjust intel compiler and mpi settings (#2056)
- largely as per patch from Jong-Gwan (Jason) Do

NB: the intel-one setup adds in paths for intelmpi.
    Its mpicc version does not harmonize with the OpenFOAM
    system openmpi setup (using mpicc --showme:link).

    Needs adjustment, or use intelmpi instead.

- update name mappings for newer gcc, clang versions
2021-04-23 11:39:29 +02:00
Tomoki, Karatsu
13ea1b70fe CONFIG: update/generalize FJMPI settings (#2044)
- previously had a very old (likely irrelevant) setting for solaris
  systems only.

- support site-specific customization.
  Eg, using etc/config.{csh,sh}/prefs.fjmpi

- remove erroneous shell redirects present in cshell files
2021-03-29 16:00:11 +02:00
Mark Olesen
daf9af461c CONFIG: bump API to 2102
- fvMeshDistribute and redistributePar changes
2021-03-09 09:55:02 +01:00
Mark Olesen
fbfc09979e CONFIG: bump API to 2012 (pre-release) 2020-12-17 21:32:53 +01:00
Mark Olesen
c2bf9e1cc8 CONFIG: bump API to 2011
- mostly to reflect changes in config prefs and output methods
2020-11-25 21:31:02 +01:00
Mark Olesen
6dd2cc808e CONFIG: provisional cuda rule. Update naming for CGAL rules 2020-11-17 21:29:07 +01:00
Mark Olesen
c91fc6f41c CONFIG: rationalize mpi config tuning (#1910)
- prefix FOAM_MPI and library directories with 'sys-' for system
  versions for uniform identication.

  WM_MPLIB      | libdir (FOAM_MPI)  | old naming |
  SYSTEMMPI     | sys-mpi            | mpi        |
  SYSTEMOPENMPI | sys-openmpi        | openmpi-system |

- prefix preferences with 'prefs.' to make them more easily
  identifiable, and update bin/tools/create-mpi-config accordingly

      Old name: config.{csh,sh}/openmpi
      New name: config.{csh,sh}/prefs.openmpi

- additional mpi preferences now available:
    * prefs.intelmpi
    * prefs.mpich
    ...

CONFIG: added hook for EASYBUILDMPI (eb-mpi), somewhat like USERMPI

- EasyBuild uses mpicc when compiling, so no explicit wmake rules are
  used

ENH: support different major versions for system openmpi

- for example, with

     WM_MPLIB=SYSTEMOPENMPI2

  defines FOAM_MPI=sys-openmpi2 and thus creates lib/sys-openmpi2

ENH: centralize handling of mpi as 'mpi-rules'

    Before:
        sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
        sinclude $(DEFAULT_RULES)/mplib$(WM_MPLIB)

        ifeq (,$(FOAM_MPI_LIBBIN))
            FOAM_MPI_LIBBIN := $(FOAM_LIBBIN)/$(FOAM_MPI)
        endif

    After:
        include $(GENERAL_RULES)/mpi-rules

- also allows variants such as SYSTEMOPENMPI2 to be handled separately
2020-11-11 18:36:01 +01:00
Mark Olesen
a475a19d01 CONFIG: bump API to 2010
- mostly reflects minor additions to Pstream methods and blockMesh
  improvements.
2020-10-12 12:52:39 +02:00
Mark Olesen
9423d2bd83 CONFIG: improve support for compiler/link options (#1830)
- introduce WM_COMPILE_CONTROL variable to convey control information
  into the build rules.

  The convention (as per spack):
      - '+' to select a feature
      - '~' to deselect a feature

  Eg, to select the gold linker, and disable openmp
  (spaces are not required):

      WM_COMPILE_CONTROL="+gold ~openmp"

CONFIG: accept FOAM_EXTRA_LDFLAGS for AMD, gold, Mingw linkers

CONFIG: generalize PROJECT_LIBS (-ldl used almost universally)
2020-09-07 09:45:51 +02:00
Mark Olesen
01f8ea9dd5 CONFIG: update Fujitsu rules (#1671)
- openmp using the libfjomp

- fastmath as per the ArmClang compiler
2020-06-24 18:04:01 +02:00
Mark Olesen
9e311151e3 CONFIG: bump API to 2006 (pre-release) 2020-06-17 16:39:40 +02:00
Mark Olesen
934d0bd743 ENH: support FOAM_MODULE_PREFIX to guide location of module builds (#1721)
- When compiling additional modules or user code, we need more control
  for the installation locations beyond the usual FOAM_USER_LIBBIN,
  FOAM_SITE_LIBBIN, FOAM_LIBBIN, and wish to have these values be
  modifiable without editing files.

- provide wmake rules for handling standard defaults:
    * GENERAL_RULES/module-path-user
    * GENERAL_RULES/module-path-group
    * GENERAL_RULES/module-path-project
  which are incorporated as follows:

  Make/options:
      include $(GENERAL_RULES)/module-path-user

  Make/files:
      LIB = $(FOAM_MODULE_LIBBIN)/libMyLibrary

  By default these would compile into FOAM_USER_{APPBIN,LIBBIN} but
  could be adjusted at compilation time. For example,

```
wmake -module-prefix=/path/my-install-location
```
Or
```
./Allwmake -module-prefix=/path/my-install-location
./Allwmake -prefix=/path/my-install-location
```
Or
```
FOAM_MODULE_PREFIX=/path/my-install-location ./Allwmake
```

ENH: add -no-recursion option for AllwmakeParseArguments

- more descriptive naming than the -fromWmake option (still supported)

- remove wmake/scripts/wmake.{cmake,wmake}-args since the -prefix
  handling and -no-recursion is now directly handled by AllwmakeParseArguments
2020-06-08 13:51:26 +02:00
Mark Olesen
b3e5620d2a COMP: typo in surfaceBooleanFeatures/PolyhedronReader Make/options
ENH: strip {GMP,MPRF}_ARCH_PATH in make rules
2020-06-05 12:36:37 +02:00
Mark Olesen
d7db8f8292 COMP: support cgal header-only configurations
- improve wmake CGAL rule(s) accordingly
2020-05-19 07:13:12 +01:00
Mark Olesen
d4e31093fd ENH: improved encapsulation of MPI (re)builds
- dependency handling relocated from cmakeFunctions to wmakeFunctions
  and reused for mpi-versioned builds. This allows more checks for
  configuration parameters and removes hard-code build path
  information.

CONFIG: remove spurious mplibHPMPI entries

CONFIG: remove ADIOS1 rules (antiquated)
2020-05-12 10:05:47 +02:00
Mark Olesen
9e3d06853e ENH: add 'subcommand' handling to wmake (#1693)
- initial split of wmake-related commands into "plumbing" and
  "porcelain" akin to how git handles things.

- wmakeBuildInfo (very low-level), now relocated to the wmake/scripts
  and accessible for the user as "wmake -build-info".

  This satisfies a long-standing desire to access build information
  in a fashion similar to the api/patch information.

CONFIG: avoid git information when building with a debian/ directory

- when a 'debian/' directory exists, there is a high probability that
  the '.git/' directory is from debian and not from OpenFOAM (ie,
  useless here). This corresponds to an implicit '-no-git', which has
  no effect when building from pristine sources.

ENH: wmakeCheckPwd becomes scripts/wmake-check-dir

- accessible for the user as "wmake -check-dir" and with 1 or 2
  directory names. A wmakeCheckPwd symlink left for compatibility.
2020-05-12 10:05:24 +02:00
Mark Olesen
e5afe55e9b CONFIG: bump API to 2004 2020-05-06 17:25:00 +02:00
Mark Olesen
b3464d8afc COMP: wmake rules for AMD (clang-based) compiler (#1627)
- not fully tested
2020-05-06 13:11:09 +02:00
Mark Olesen
78dc8c6ba6 CONFIG: refactor common link rules, support FOAM_EXTRA_CFLAGS (#1256)
- additional cgal-headers-only rules (future use)

COMP: add -lgmp for CGAL with mpfr linkage
2020-05-06 13:10:30 +02:00
Mark Olesen
9b4462e07b CONFIG: bump API to 2003
- various changes
2020-04-21 15:09:12 +02:00
Mark Olesen
9cfa5fe454 Merge remote-tracking branch 'origin/master' into develop 2020-04-21 15:07:35 +02:00
Mark Olesen
6691e6563c COMP: adjust for CGAL-1.14 changes 2020-04-21 14:59:07 +02:00
Mark Olesen
e1586bdaa0 CONFIG: add linuxARM64Fujitsu settings (#1671) 2020-04-16 00:48:08 +02:00
Mark Olesen
9aae45fa51 Merge remote-tracking branch 'origin/master' into develop 2020-04-16 00:45:11 +02:00
Mark Olesen
4200774d35 CONFIG: improve support for compiler derivatives (#1671)
- add '[-+.~]' to the recognized qualifiers.
  This allows simple readable names such as

      WM_COMPILER=Clang-vendor

  but also opens the FUTURE (not yet supported) possibility of
  combining in additional information. For example,

      WM_COMPILER=Clang~openmp
      WM_COMPILER=Clang+cuda~openmp

  by using '+' (add) and '~' (subtract) notation similar to what
  spack uses.

CONFIG: support 'override' rules

- if present, compiler-family 'override' rules are included after
  compiler-family 'general' rules have been included. This allows a
  central means for including dynamically generated content to
  override some values.

  Some examples:

  To handle different gcc versions (system compiler):

  wmake/rules/...Gcc/override

  ```
  ifneq (,$(findstring 9, $(WM_COMPILER)))
      cc  := gcc-9
      CC  := g++-9 -std=c++11
  endif
  ```

  To handle different openmp on Darwin (#1656):

  wmake/rules/darwin64Clang/override

  ```
  # Use libomp (not libgomp) unless openmp is disabled
  ifeq (,$(findstring "~openmp", "$(WM_COMPILER)"))
      COMP_OPENMP = -DUSE_OMP -Xpreprocessor -fopenmp
      LINK_OPENMP = -lomp
  else
      include $(GENERAL_RULES)/no-openmp
  endif
  ```

  This treatment arguably fits into wmake/rules/darwin64Clang/general,
  but it serves to illustrate a possible use case.
2020-04-15 13:18:31 +02:00
Mark Olesen
04b5291c55 CONFIG: handle openmp on Darwin (#1656)
- requires -Xpreprocessor
- uses 'libomp' (no 'libgomp' link)
2020-04-15 13:18:19 +02:00
Mark Olesen
f644d78bde Merge remote-tracking branch 'origin/master' into develop 2020-04-06 12:38:57 +02:00
Mark Olesen
a8b6d01b87 CONFIG: relocate wmake binaries into project platforms/tools (#1647)
- can aid when creating source-only or binary-only packages
2020-04-06 08:32:42 +02:00
Mark Olesen
8075804b18 COMP: add -pthread compile/link dependency for std::thread (#614) 2020-04-06 08:30:11 +02:00
Mark Olesen
ac8b64df46 CONFIG: support FOAM_EXTRA_CXXFLAGS (#1256)
- allows custom tuning of compilation parameters
2020-03-16 12:03:58 +01:00
Mark Olesen
2892b78d72 CONFIG: support FOAM_EXTRA_CXXFLAGS (#1256)
- allows custom tuning of compilation parameters
2020-02-20 12:18:12 +01:00
Mark Olesen
2d416a68a0 CONFIG: bump API to 2002
- changes in IOstreamOption, Switch, writeObject
2020-02-19 23:36:47 +01:00
Mark Olesen
739bc3c4af COMP: add -pthread compile/link dependency for std::thread (#614) 2020-02-07 11:06:06 +01:00
Mark Olesen
449ba56750 CONFIG: bump API to 2001 2020-01-23 14:22:27 +01:00
Mark Olesen
9edaf8bfa5 CONFIG: default compilation is 'Opt' in Makefiles
- only include compiler-family rules for C++ once

STYLE: minor cleanup of wmake/src Makefile
2019-12-16 11:22:16 +01:00
Mark Olesen
69a8369541 COMP: add note about gcc-9 and deprecated-copy 2019-12-13 20:54:28 +01:00
Mark Olesen
89fb73d2a3 COMP: disable some compiler warnings
- The -Wno-deprecated-copy flag for gcc-9.2.0

  In the future we may indeed wish to explicitly request default
  generated constructors and assignment operators, but at the moment
  these are still acceptable.

- The -Wno-alloc-size-larger-than flag for mingw compilations

  Related to differences in PTRDIFF_MAX vs SIZE_MAX on the target.
  Several issues related to this can be found in the gcc bug reports
  and on stackoverflow etc.
2019-12-11 20:42:11 +01:00
Mark Olesen
bc51349d75 CONFIG: bump API to 1912 (pre-release)
- update repository links
2019-12-11 09:19:32 +01:00
Mark Olesen
3a816006dc COMP: support m4 include directories for wrap-lemon
Set the m4 -I include accordingly to have the folllowing:
  - the directory of the parser.
  - include/ in the top-level source tree of the current target
    (eg, src/finiteVolume/include-m4/ when compiling libfiniteVolume)
  - include/ from OpenFOAM

Additional -dry-run option for makeParser, wrap-lemon for expanding m4
only.

Extend m4 wrapping support to include bison as well.
2019-12-06 16:15:07 +01:00
Mark Olesen
9e6683f7bc ENH: add conditionals to #eval (string to scalar)
Example,

     ($radius > 10) ? sin(degToRad(45)) : cos(degToRad(30))

- protect division and modulo against zero-divide.

- add scanner/parser debugging switches in the namespace,
  selectable as "stringToScalar". For example,

    debug parser:  foamDictionary -debug-switch stringToScalar=2
    debug scanner: foamDictionary -debug-switch stringToScalar=4
    debug both:    foamDictionary -debug-switch stringToScalar=6
2019-11-19 14:22:03 +01:00
Mark Olesen
1ddcdb083e ENH: add support for m4 filtering of lemon grammars 2019-10-11 09:24:04 +02:00
Mark Olesen
2c11d875ad CONFIG: bump API to 1909 to reflect #eval directive 2019-10-01 14:27:16 +02:00
Mark Olesen
4a6cd8f194 COMP: update make rules for lemon, add helper infrastructure for ragel 2019-09-27 11:05:35 +02:00
Mark Olesen
f7528a2ac5 COMP: fix inconsistent bison make rule
- generated C++ files, but didn't use C++ compiler
2019-09-26 10:41:16 +02:00
Mark Olesen
894645f9e1 CONFIG: update wmake rules for parsers
- include ragel and lemon

- rename pre-generated files to ".cc" so that they are more
  recognizable as being different from regular file content.
2019-08-16 10:06:08 +02:00
Mark Olesen
508277d0f8 COMFIG: update flex make rules to use '-f' for C-code as well
- add additional rule (ending '.ll') for the combination of
  flex for C-code but compiling the result as C++.
  This can be needed for re-entrant parsers.

- update bison rule to handle renaming of skeleton files.
  Use a wrap-bison script to manage this.
2019-08-23 17:34:25 +02:00
Mark Olesen
60517236fd CONFIG: bump API to 1908 to reflect is_contiguous handling 2019-08-13 16:26:30 +02:00
Mark Olesen
d4a0dc631c CONFIG: relax requirement on C compile option
- with 1906, OpenFOAM is purely C++ code and the last toolchain bits C
  code have been avoided. Thus relax the wmake C rule for including
  WM_COMPILE_OPTION. This makes it much easier to add different
  compiler options with fewer files.

  For example, for Broadwell-specific options:

      cd wmake/rules/linux64Gcc
      cp c++Opt c++OptBdw

      edit this file and then use WM_COMPILE_OPTION=OptBdw

- ensure that WM_COMPILE_OPTION is always non-empty
2019-08-07 09:22:09 +02:00
Mark Olesen
1b4b127af5 CONFIG: harmonize adios1, adios2 config files. Add to setup. 2019-07-31 13:21:52 +02:00
Mark Olesen
481661dabe CONFIG: bump API to 1907 to register any changes in keywords 2019-07-14 19:25:30 +02:00
Mark Olesen
16784c6b06 CONFIG: reduce reliance on WM_ARCH_OPTION (#517)
- now only needed when specify compiling -m32 on a 64-bit system.

  Internally use the __SIZEOF_LONG__ compiler macro (gcc, icc, llvm)
  to define when long is actually an int32_t.
2019-06-14 14:47:35 +02:00
Mark Olesen
f05ff81722 CONFIG: bump API to 1906 (pre-release)
- adjust copyright dates for manpages
2019-06-13 18:22:10 +02:00
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
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
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
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
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
Andrew Heather
cab94a5d0a Merge remote-tracking branch 'origin/master' into develop 2019-02-04 10:55:34 +00: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
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
mattijs
e17f6073b9 CONFIG: bump API version number to 1812 to register recent changes 2018-12-13 15:23:04 +00: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
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
820b63e0b2 CONFIG: bump API version number to 1811 to register recent changes 2018-11-26 15:14:01 +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
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
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
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
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
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
29c020f5b3 COMP: sinclude platform-specific CGAL rules
- permits platform-specific override of the general CGAL rules
2018-04-24 09:26:50 +02:00