Commit Graph

51 Commits

Author SHA1 Message Date
Mark Olesen
aa2f932b75 CONFIG: additional packaging helpers, tutorial test helper
- bin/tools/create-mpi-config to query/write values for system openmpi.
  In some cases this can be used to avoid an mpicc requirement at runtime.

- adjust openfoam session to include -test-tutorial forwarding to the
  tutorials/AutoTest. This helps with writing installation tests.

- adjust foamConfigurePaths to latest version

- removal of gperftools default config, as per develop
2020-04-21 14:59:07 +02:00
Mark Olesen
fe17c8ad5f CONFIG: improve prefix matching for system libraries (#1607)
- missed detection of system libraries when installed with multiarch
  paths like /usr/lib/x86_64-linux-gnu

CONFIG: improve handling of group/user config files (#928)

- changed bashrc handling of FOAM_CONFIG_NOUSER to use
  FOAM_CONFIG_MODE instead. Propagate into foamEtcFile to make this
  a stickier control.

  This change allows better control, but also enables cluster
  installations to define their own value within the OpenFOAM prefs.sh
  file to prevent users accidentally mis-configuring things if
  necessary.

- remove undocumented handling of an (a)ll mode in foamEtcFile to
  avoid potential pitfalls.

- add support for FOAM_CONFIG_ETC handling.
  This allows injection of an extra search layer when finding
  project etc files

ENH: improvements to foamConfigurePaths (#928)

- handle FOAM_CONFIG_ETC implicitly, or explicitly with the new
  -etc option.

STYLE: more explicit wording in foamConfigurePaths usage (#1602)

- document that an absolute path (eg, -scotch-path) overrides/ignores
  the equivalent ThirdParty setting (eg, -scotch)

- longer options -system-compiler and -third-compiler for -system
  and -third, respectively. Clearer as to their purpose.

- adjust the location sanity check to look for META-INFO directory.
2020-03-16 12:03:58 +01:00
Mark Olesen
92214eb4af CONFIG: misedit of csh mpi settings with foamConfigurePaths 2020-02-12 21:28:30 +01:00
Mark Olesen
81015889f2 CONFIG: provide separate default settings for clang/gcc (fixes #1566)
- the foamConfigurePaths script is quite simplistic and aggressive in
  what it changes. This was particularly evident when using it to
  change gcc/clang versions.

  Restructured the corresponding compiler settings to define default
  versions (eg, "default_gcc_version") that limits the scope of
  changes performed by foamConfigurePaths and makes it easier to
  understand if changing manually.
2020-02-03 11:05:04 +01:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
Mark Olesen
fb0057ea72 STYLE: accept lowercase -sp/-dp/-spdp for foamConfigurePaths 2019-09-25 18:20:32 +02:00
Mark Olesen
c072000dca ENH: add edit for ADIOS2 settings in foamConfigurePaths
CONFIG: remove adios1 config files
2019-08-16 09:17:18 +02:00
Mark Olesen
1c1b1874ea CONFIG: accept 'system' for foamConfigurePaths -paraview 2019-08-07 18:36:08 +02:00
Mark Olesen
f7a707e00e STYLE: allow '=' option separators in some bin/tools scripts 2019-06-26 11:27:53 +02:00
Mark Olesen
47f375887e CONFIG: adjust bin/tools/foamConfigurePaths
- add a '-SPDP' option

- remove the '-archOption' for forcing a '-m32' build on 64-bit
  architecture, which is now considered too obscure.
  Must edit files manually if this option is really required.
2019-06-25 07:48:33 +02:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Mark Olesen
38c56c5c6b BUG: command-args overload ignored for etc/config.csh/paraview
- now needs local 'set' instead of 'setenv'

- fixed inconsistency in edit of ParaView_VERSION for csh version
2018-12-10 09:50:46 +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
b105f926b1 ENH: improvements to foamConfigurePaths tool (#1010)
- provide edit for adjusting the ThirdParty and fallback site variables.
  This is useful when packaging into a single directory, and possibly
  without any ThirdParty dependencies.

- support '-prefix' (similar to auotconfig) as an alternative to
  '-foamInstall'. Use this prefix to set the prefix directly.
  Bypasses and disables the bash sourcing magic.
2018-11-23 15:30:29 +01:00
Mark Olesen
698bf3f61d STYLE: usage order in foamConfigurePaths 2018-11-19 15:38:14 +01:00
Mark Olesen
5029d29ff6 ENH: support -gcc option for foamConfigurePaths
- simplifies things for legacyCompile
2018-11-15 13:55:21 +01: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
22775693d5 STYLE: adjust comments, indentation 2017-12-17 13:14:05 +01:00
Mark Olesen
1f9bdb4b4f CONFIG: add foamConfigurePaths -kahip* options (closes #666) 2017-12-15 18:04:11 +01: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
c50368ecc6 ENH: add trapFpe and setNaN optimisationSwitch (issue #517)
- allows configuration without an environment variable.
  For compatibility still respect FOAM_SIGFPE and FOAM_SETNAN
  env-variables

- The env-variables are now treated as true/false switch values.
  Previously there was just a check for env exists or not, but this
  can be fairly fragile for a user's environment.
2017-07-05 17:49:37 +02: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
973cf0397d CONFIG: provide foamConfigurePaths -mpi option
- makes it easier to switch between mpi implementations (eg, openmpi, intelmpi etc)

- add comment about compiler setting for KNL
2017-02-16 09:14:17 +01:00
Mark Olesen
9b1fcb0f73 ENH: increase coverage for foamConfigurePaths script
- can adjust many more values
2016-12-16 08:17:38 +01:00
Mark Olesen
3f362fd7ec CONFIG: add config files for VTK, MESA
- sometimes used for off-screen rendering.
  Only add to library-path when they are actually available
2016-12-16 08:17:29 +01:00
Mark Olesen
c7d7cbca28 BUG: foamConfigurePaths -foamInstall fails (related to issue #280)
- relied on 'export' keyword, which was removed in commit b844867112

--
ENH: foamConfigurePaths support for additional items:

    -label 32|64            specify label size
    -system name            specify 'system' compiler to be used
    -thirdParty name        specify 'ThirdParty' compiler to be used

    -boost ver              specify boost_version
    -boostArchPath dir      specify BOOST_ARCH_PATH
    -cgal ver               specify cgal_version
    -cgalArchPath dir       specify CGAL_ARCH_PATH
    -clang ver              specify clang_version for ThirdParty Clang
    -cmake ver              specify cmake_version
    -fftw ver               specify fffw_version
    -fftwArchPath dir       specify FFTW_ARCH_PATH
    -metis ver              specify METIS_VERSION
    -metisArchPath dir      specify METIS_ARCH_PATH
2016-11-09 14:38:15 +01:00
Henry Weller
f2d9959bae foamConfigurePaths: Updated foamInstall option 2016-06-06 19:32:01 +01:00
Henry Weller
80c3bcff48 bin/tools/foamConfigurePaths: foamCompiler -> WM_COMPILER_TYPE 2016-03-09 09:05:07 +00:00
Henry Weller
45253d6204 Update header 2016-02-10 16:20:46 +00:00
Henry Weller
f9d61d7e3c Updates for changes to etc/config structure 2016-02-10 16:20:19 +00:00
laurence
14496baaa7 COMP: foamConfigurePaths given scotch version and path arguments 2013-06-17 14:51:07 +01:00
andy
0a8bae1f54 ENH: Adding changes from 2.2.0 2013-03-06 15:41:24 +00:00
mattijs
572d7551b9 ENH: foamConfigurePaths: added paraviewVersion option 2013-01-07 14:47:27 +00:00
laurence
790aa2f693 COMP: foamConfigurePaths will now check if WM_ARCH_OPTION needs to be set 2011-12-02 10:26:13 +00:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
mattijs
4ce22e4c0d ENH: foamConfigurePaths: overwrite the version always 2011-08-12 10:19:19 +01:00
mattijs
5c75ad35ab ENH: bin/tools/foamConfigurePaths: temporarily disable projectVersion 2011-06-13 16:19:05 +01:00
Mark Olesen
20693b96bd CONF: move OpenFOAM etc/apps -> etc/config
- use standard *.sh, *.csh endings
2011-05-02 14:52:11 +02:00
mattijs
2475ffe9f8 ENH: foamConfigurePaths: rule to rewrite project version 2011-03-17 15:51:00 +00:00
Mark Olesen
f691fe7896 STYLE: more consistent use of stderr for script usage 2011-02-15 16:48:26 +01:00
andy
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
andy
14d1300a36 Revert "STyLE: More 2011 copyright dates (non-code)."
This reverts commit 2e1e671d96.
2011-01-05 18:25:32 +00:00
graham
2e1e671d96 STyLE: More 2011 copyright dates (non-code). 2011-01-05 11:48:24 +00:00
Mark Olesen
18dbe9996a ENH: reorganize settings to avoid inheriting bad values
- avoid non-standard 'tempfile' in bin/tools/foamConfigurePaths
2010-12-23 07:37:32 +01:00
Mark Olesen
312d15c701 STYLE: use 'foamCompiler' instead of 'compilerInstall'
- more obvious in its meaning
2010-12-23 06:28:49 +01:00
mattijs
a45f394c37 BUG: foamConfigurePaths : incorrect logic 2010-11-04 12:50:09 +00:00
mattijs
497daa3061 STYLE: foamConfigurePaths : expanded tab 2010-10-19 17:47:33 +01:00
mattijs
0d470d124e ENH: foamConfigurePaths : check that sed has done something 2010-10-19 17:46:21 +01:00
Mark Olesen
266c4c61da STYLE: remove tabs and trailing space from new scripts 2010-07-02 09:14:10 +02:00