Commit Graph

170 Commits

Author SHA1 Message Date
Mark Olesen
272e09b051 CONFIG: add Gcc81 2018-05-07 17:21:30 +02: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
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
de4a1eeedb CONFIG: improve evaluation of arguments for foamEtcFile
- forward command-line arguments for paraview, where they may also be
  evaluated (cshrc, POSIX shell)
  Eg,
      . etc/bashrc ParaView_VERSION=5.4.1-mpipy
      source etc/cshrc ParaView_VERSION=5.4.1-mpipy
2018-01-24 12:15:09 +01:00
Mark Olesen
110b00f048 ENH: improved handling of gmp/mpfr library settings (issue #674)
- export library path for gmp/mpfr from CGAL config files.
  This is required when non-system gmp/mpfr libraries are being
  used, but not using a ThirdParty compiler installation.

- automatically handle lib/ vs lib64/ (eg, for central installations)
  for packages such as boost, CGAL, etc. While the ThirdParty
  compilation of these will normally land in lib64/, this may not be
  the case when they are supplied by another means.

- reworked the handling of foamEtcFile and foamCleanPath for less
  clutter in the configuration files.
  Added the bin/tools/lib-dir script to handle logic that is
  too complex to easily manage in csh.
2018-01-11 01:30:23 +01:00
Mark Olesen
2fe7d0c00b STYLE: update BuildIssues with CGAL mpfr-none problem (issue #674)
- add some notes about 'git submodule' in modules/README.md
2017-12-21 10:38:57 +01:00
Mark Olesen
4c81ee202d CONFIG: update for gcc-4.9.4, and cfmesh module 2017-12-18 10:51:53 +01:00
Mark Olesen
a820e2d2b7 STYLE: add explicit note to bashrc,cshrc about using prefs.{sh,csh}
- adjust comment formatting to reduce clutter
2017-12-14 11:18:40 +01:00
Mark Olesen
3f853f031a STYLE: cleanup of compiler settings
- relocate WM_COMPILER_ARCH, WM_COMPILER_LIB_ARCH from
  etc/{bashrc,cshrc} to etc/config.{csh,sh}/settings since these
  should not be changed by the user anyhow.

- Use gcc/g++ as common base and specialize afterwards (to reduce
  duplication)

- adjust format of WM_PROJECT_SITE fallback to allow for easier
  automated edits
2017-12-14 10:22:30 +01:00
Mark Olesen
05a8fe5dd3 STYLE: compact license text in config files for easier reading/editing 2017-11-20 09:00:10 +01:00
Mark Olesen
d65ca495d3 STYLE: minor changes in comments 2017-11-22 10:52:42 +01:00
Mark Olesen
2ecfb3e986 CONFIG: update clang versions 2017-11-03 14:43:33 +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
92d1d1f037 CONFIG: verify bash version for completion support
- the (global) associative array requires bash >= 4.2
2017-08-10 10:05:22 +02:00
Mark Olesen
c614110d46 ENH: improve bash completion functionality (issue #551)
- use complete -o filenames, dropped -o nospace to make it more responsive.

- restructure completion code to use a unified backend, which makes it easier
  understand, maintain and re-use.

- foamCreateBashCompletions now simply outputs to a stdout, and allows
  quick generation of completion of single applications.

- add -fileHandler completion in anticipation of future changes there.

- relocated as etc/config.s/bash_completion to prevent inadvertently
  having two versions (.com, .org) installed at the same time.
2017-07-31 15:35:40 +02: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
feab8e94a8 ENH: restrict aliases, completions to interactive shells
- minor cleanup of bash completion script
2017-06-21 08:09:15 +01:00
Mark Olesen
685d6a0e72 CONFIG: avoid bash completions for non-bash shells (eg, dash, ksh, zsh) 2017-06-14 11:22:51 +02:00
Andrew Heather
caf9a0870d ENH: Added bash completion for OpenFOAM applications 2017-06-08 16:24:06 +01: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
91b0a9379b STYLE: mention clang-4.0 in the bashrc, cshrc files 2017-04-03 08:31:04 +02:00
Mark Olesen
af49eaf625 ENH: default jobControl now under the '~/.OpenFOAM/jobControl' directory
- this implies that jobControl is a user-resource for OpenFOAM.
  It was previously located under $WM_PROJECT_INST_DIR/jobControl,
  but few users will have write access there.

- an unset FOAM_JOB_DIR variable is treated as "~/.OpenFOAM/jobControl",
  which can partially reduce environment clutter.

- provide argList::noJobInfo() to conveniently suppress job-info on an
  individual basis for short-running utilities (eg, foamListTimes) to
  avoid unneeded clutter.
2017-04-03 08:28:15 +02:00
Mark Olesen
3ece6e521a ENH: improve MPI configuration possibilities
- permit SYSTEMMPI user adjustments via
      etc/config.{csh,sh}/mpi-system
  This can be a convenient place for setting up SYSTEMMPI for OpenFOAM
  without adjusting bashrc, prefs.sh ...

- add a USERMPI type. This represents any generic mpi implementation.
  The user is responsible for supplying an appropriate
  wmake/rules/General/mplibUSERMPI file and managing all settings.

  This type of setup can be useful in combination with specific build
  systems (SPACK, EASYBUILD, etc) or module systems for which the MPI
  variant is part of the installed configuration.
2017-03-29 13:48:54 +02:00
Mark Olesen
e6e617ed47 STYLE: suppress unalias warnings/errors
- cleanup variables last in etc/bashrc for a clean exit code
2017-03-23 10:16:05 +01:00
Mark Olesen
1be180b99f ENH: source 'other' prefs before user/group
- this allows the sys-admin to provide base values independent of any
  WM_PROJECT_SITE value.
2017-03-22 15:33:51 +01: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
4339d93c8e STYLE: drop _foamSource definition (unneeded). 2017-03-14 17:24:23 +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
c84b9aaac6 ENH: use new foamEtcFile options to simplify syntax when sourcing files
Can now use this:
    _foamSourceEtc config.sh/scotch
    _foamSourceEtc config.csh/scotch

instead of this:
    _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/scotch`

In the bash/sh version, leave the _foamSource function for now, since
ThirdParty is still relying on it.

STYLE: elminate while-loop for _foamAddPath etc since this type of
construct isn't readily possible for csh and isn't being used anywhere.
2017-02-23 15:55:38 +01:00
Mark Olesen
1ed5b35049 CONFIG: pass-through icc compiler choice for KNL, add gcc 6.3.0
- bump ADIOS version to 1.11.1
2017-02-20 10:47:45 +01:00
Mark Olesen
d3911dd167 STYLE: avoid old-style shell backticks in various places 2017-02-20 09:30:58 +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
5e9d916fd3 CONFIG: add ADIOS configuration information for early adopters
- the configuration settings can be used for the third-party build,
  but the configuration is not yet actively enabled in
  etc/bashrc, etc/cshrc
2016-12-15 13:29:30 +01:00
Andrew Heather
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
Henry Weller
0030d9ea35 etc/bashrc,cshrc: Added FJMPI and INTELMPI
Resolves request http://bugs.openfoam.org/view.php?id=2367
2016-12-01 19:53:08 +00:00
Mark Olesen
5c15769dfe GIT: revert back to system openmpi (issue #308)
- consistently use SYSTEMOPENMPI for both sh and csh versions
  (inadvertently changed in ee5251a7bb).
2016-11-20 13:12:02 +01:00
Henry Weller
535831422e etc/bashrc: Added support for sourcing etc/bashrc with relative path
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2310
2016-11-04 13:12:30 +00:00
Henry Weller
429ca91216 etc/config: Removed references to gcc versions < 4.8
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2312
2016-10-30 00:01:48 +01:00
Mark Olesen
b844867112 BUG: etc/bashrc incorrect behaviour if sourced locally (issue #280)
- It is incorrect to prefix the assignment with an 'export' since this
  automatically marks the overall command as successful and circumvents
  the fallback.

  There is no simple way to have proper behaviour when sourced with a
  local directory path, but at least it now uses the fallback.

  It is still easy to wreak the mechanism with valid but confusing input.
  For example,

     ". /path/to/openfoam/etc/././bashrc"

  The only real certainty is that "${BASH_SOURCE%/*}"
  should point to the 'etc/' directory. In which case,

      cd ${BASH_SOURCE%/*}    # <- now in the etc/ directory
      pwd=$(pwd -P)           # <- fully-qualified path to etc/
      pwd=${pwd%/*/*}         # <- up two parent levels

  - This works with ". ./bashrc", but fails with ". bashrc"
    (probably not so common).
  - Con: The construct requires an additional sub-shell.
2016-10-28 16:48:30 +02:00
Andrew Heather
a224366c28 BUG: etc/bashrc - use \cd to avoid problem when cd is aliased. Fixes #280 2016-10-28 14:55:46 +01:00
Mark Olesen
053b22a969 STYLE: incorrect project setting in etc/bashrc 2016-10-28 10:38:48 +02:00
sergio
f4d80786eb Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-10-26 08:31:08 -07:00
Mark Olesen
84683b5f90 CONFIG: remove foundation use of FOAMY_HEX_MESH control.
- instead we use the CGAL settings directly since they have the
  same option of (version | system | none)

- may wish to review this again in the future.
2016-09-29 12:36:27 +02:00
sergio
361ed6420d Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-09-28 09:06:35 -07:00
sergio
ee5251a7bb keep bas 2016-09-28 08:54:41 -07:00
Henry Weller
96f2562e93 OpenFOAM-dev/etc/bashrc: Use 'pwd -P' to handle relative paths and links
Resolves bug-report http://bugs.openfoam.org/view.php?id=2223
2016-09-03 15:57:52 +01:00
Henry Weller
c482490a60 etc/bashrc, etc/config.sh:
- "$FOAM_USER_APPBIN" and "$FOAM_USER_LIBBIN" have been added to
    "foamOldDirs" in "etc/bashrc" and "etc/config.sh/unset"

  - "$OPAL_PREFIX" is now undefined in the option "SYSTEMOPENMPI" within
    "etc/config.sh/mpi", but only if the path defined in this variable
    is cleaned when using "foamCleanPath".

  - "$OPAL_PREFIX" is now also conditionally undefined in
    "etc/config.sh/unset" when the path is picked up by "foamCleanPath".

Patch contributed by Bruno Santos
Resolved bug-report http://bugs.openfoam.org/view.php?id=2210
2016-08-23 21:02:55 +01:00
Mark Olesen
787b19c4e4 STYLE: cleanup compiler settings (issue #176)
- export/setenv WM_COMPILER_TYPE as suggested by Mattijs.

- for overall consistency, don't carp about an unset WM_COMPILER_TYPE,
  since this would only be on the first instance (prior to the
  export/setenv) and would be confusing about why/when this message
  may occur.

- reduce clutter: only use (system|ThirdParty) for WM_COMPILER_TYPE.
  Drop the old 'OpenFOAM' setting for WM_COMPILER_TYPE, which was
  transitional in early 2011.

- make the error messages more meaningful
2016-07-12 17:19:06 +02:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00