diff --git a/etc/bashrc b/etc/bashrc index 99cfe44af0d7e5f0175c5a39ae6b3125c1d501c5..50df795c080f80fad94e8a04c0e10005c60aebb7 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -13,23 +13,21 @@ # etc/bashrc # # Description -# Set OpenFOAM environment for POSIX shell (eg, bash,dash,zsh,...) -# Source manually or from the ~/.profile or ~/.bashrc files. +# The OpenFOAM environment for POSIX shell (eg, bash,dash,zsh,...). +# Source manually or from the ~/.bashrc or ~/.profile files. # -# Note -# Many environment variables can be overridden using a <prefs.sh> file -# from one of these locations: -# * user-specific: -# * ~/.OpenFOAM/$WM_PROJECT_VERSION -# * ~/.OpenFOAM -# * group-specific: -# * $WM_PROJECT_SITE/site/$WM_PROJECT_VERSION -# * $WM_PROJECT_SITE/site -# * general: -# * $WM_PROJECT_DIR/etc +# Many settings can be overridden using a <prefs.sh> file: # -# Any changes made to this bashrc file may be lost with the next upgrade. +# - Base values (eg, from system admin): +# - $WM_PROJECT_DIR/etc/prefs.sh # +# - User or group values (first file found): +# - ~/.OpenFOAM/$WM_PROJECT_VERSION/prefs.sh +# - ~/.OpenFOAM/prefs.sh +# - $WM_PROJECT_SITE/site/$WM_PROJECT_VERSION/prefs.sh +# - $WM_PROJECT_SITE/site/prefs.sh +# +# Note: Changes made to this bashrc file may be lost with the next upgrade. #------------------------------------------------------------------------------ export WM_PROJECT=OpenFOAM @@ -52,8 +50,8 @@ FOAM_INST_DIR=$HOME/$WM_PROJECT export FOAM_INST_DIR unset rc -# Default environment variables. -# Can override with a <prefs.sh> file instead of editing below. +# Configuration environment variables. +# Should override via <prefs.sh> file instead of editing this file. # [WM_COMPILER_TYPE] - Compiler location: # = system | ThirdParty @@ -61,7 +59,7 @@ export WM_COMPILER_TYPE=system # [WM_COMPILER] - Compiler: # = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-4] | Gcc7[1-3] | Gcc8[1] | GccKNL | -# Clang | Clang3[8-9] | Clang[4-6]0 | Icc | IccKNL | Cray | Arm +# Clang | Clang3[7-9] | Clang[4-6]0 | Icc | IccKNL | Cray | Arm export WM_COMPILER=Gcc # [WM_ARCH_OPTION] - Memory addressing: @@ -88,12 +86,15 @@ export WM_COMPILE_OPTION=Opt export WM_MPLIB=SYSTEMOPENMPI -# [FOAM_SIGFPE] - Trapping of floating-point exceptions. +#------------------------------------------------------------------------------ +# (legacy / advanced) +# +# [FOAM_SIGFPE] - Trap floating-point exceptions. # - overrides the 'trapFpe' controlDict entry # = true | false #export FOAM_SIGFPE=true -# [FOAM_SETNAN] - Memory initialisation as NaN +# [FOAM_SETNAN] - Initialize memory with NaN # - overrides the 'setNaN' controlDict entry # = true | false #export FOAM_SETNAN=false @@ -129,10 +130,9 @@ export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION # Load shell functions . $WM_PROJECT_DIR/etc/config.sh/functions -# Override definitions via prefs, with 'other' first so the sys-admin -# can provide base values independent of WM_PROJECT_SITE -_foamEtc -mode=o prefs.sh -_foamEtc -mode=ug prefs.sh +# Overrides via <prefs.sh> +_foamEtc -mode=o prefs.sh # 1) other (system) values +_foamEtc -mode=ug prefs.sh # 2) user or group values # Evaluate command-line parameters and record settings for later. # These can be used to set/unset values, specify additional files etc. diff --git a/etc/config.csh/compiler b/etc/config.csh/compiler index 26d9cc084a00434cfbdbb3b57f34e1fa88345553..2083665f46ee430a5863069891c6e35b249c44d0 100644 --- a/etc/config.csh/compiler +++ b/etc/config.csh/compiler @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -73,6 +73,7 @@ case ThirdParty: set gcc_version=gcc-8.1.0 breaksw case Clang: + case Clang37: set clang_version=llvm-3.7.1 breaksw case Clang38: diff --git a/etc/config.csh/settings b/etc/config.csh/settings index dc47b2553982bff8d9d198e630e137c41e1c8ee6..85bbff458dbe2dcc8bc893b4252d327753665d96 100644 --- a/etc/config.csh/settings +++ b/etc/config.csh/settings @@ -106,9 +106,11 @@ case Linux: case Darwin: # Presumably x86_64 if (! $?WM_ARCH_OPTION ) setenv WM_ARCH_OPTION 64 # Default to 64-bit setenv WM_ARCH darwin64 + setenv WM_CFLAGS "$WM_CFLAGS -m64 -Ddarwin" + setenv WM_CXXFLAGS "$WM_CXXFLAGS -m64 -Ddarwin" /bin/cat << INCOMPLETE =============================================================================== -Operating system '$WM_ARCH' has incomplete support in this OpenFOAM release. +Darwin support (clang only) is incomplete or untested in this OpenFOAM release. For further assistance, please contact www.OpenFOAM.com =============================================================================== INCOMPLETE diff --git a/etc/config.sh/compiler b/etc/config.sh/compiler index 08b306b2d1db45786caf3cdc05743273c65fb8a4..5c9c318dd16eee4919e536f82709346d18559851 100644 --- a/etc/config.sh/compiler +++ b/etc/config.sh/compiler @@ -3,7 +3,7 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -71,7 +71,7 @@ ThirdParty) Gcc81) gcc_version=gcc-8.1.0 ;; - Clang) + Clang | Clang37) clang_version=llvm-3.7.1 ;; Clang38) diff --git a/etc/config.sh/settings b/etc/config.sh/settings index bb7d71a2c4e6ca55efc5f368a331024dcb327ca8..6b51ae3b051435a0efae3d0f0fb2b8d9515683f8 100644 --- a/etc/config.sh/settings +++ b/etc/config.sh/settings @@ -100,9 +100,11 @@ Linux) Darwin) # Presumably x86_64 : ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION # Default to 64-bit WM_ARCH=darwin64 + export WM_CFLAGS="$WM_CFLAGS -m64 -Ddarwin" + export WM_CXXFLAGS="$WM_CXXFLAGS -m64 -Ddarwin" /bin/cat << INCOMPLETE 1>&2 =============================================================================== -Operating system '$WM_ARCH' has incomplete support in this OpenFOAM release. +Darwin support (clang only) is incomplete or untested in this OpenFOAM release. For further assistance, please contact www.OpenFOAM.com =============================================================================== INCOMPLETE diff --git a/etc/cshrc b/etc/cshrc index db8ac55a7df55a1b3cc1e5ba70a7acb7af68ca87..1792541cdbde81c172d6bf2d025d941ffdfba274 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -13,23 +13,21 @@ # etc/cshrc # # Description -# Set OpenFOAM environment for C-shell (csh, tcsh). -# Source manually or from the ~/.login or ~/.cshrc files. +# The OpenFOAM environment for C-shell (csh, tcsh). +# Source manually or from the ~/.cshrc or ~/.login files. # -# Note -# Many environment variables can be overridden using a <prefs.csh> file -# from one of these locations: -# * user-specific: -# * ~/.OpenFOAM/$WM_PROJECT_VERSION -# * ~/.OpenFOAM -# * group-specific: -# * $WM_PROJECT_SITE/site/$WM_PROJECT_VERSION -# * $WM_PROJECT_SITE/site -# * general: -# * $WM_PROJECT_DIR/etc +# Many settings can be overridden using a <prefs.csh> file: # -# Any changes made to this cshrc file may be lost with the next upgrade. +# - Base values (eg, from system admin): +# - $WM_PROJECT_DIR/etc/prefs.csh # +# - User or group values (first file found): +# - ~/.OpenFOAM/$WM_PROJECT_VERSION/prefs.csh +# - ~/.OpenFOAM/prefs.csh +# - $WM_PROJECT_SITE/site/$WM_PROJECT_VERSION/prefs.csh +# - $WM_PROJECT_SITE/site/prefs.csh +# +# Note: Changes made to this cshrc file may be lost with the next upgrade. #------------------------------------------------------------------------------ setenv WM_PROJECT OpenFOAM @@ -49,8 +47,8 @@ setenv FOAM_INST_DIR `lsof +p $$ |& \ # END OF (NORMAL) USER EDITABLE PART ################################################################################ -# Default environment variables. -# Can override with a <prefs.sh> file instead of editing below. +# Configuration environment variables. +# Should override via <prefs.csh> file instead of editing this file. # [WM_COMPILER_TYPE] - Compiler location: # = system | ThirdParty @@ -58,7 +56,7 @@ setenv WM_COMPILER_TYPE system # [WM_COMPILER] - Compiler: # = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-4] | Gcc7[1-3] | Gcc8[1] | GccKNL | -# Clang | Clang3[8-9] | Clang[4-6]0 | Icc | IccKNL | Cray | Arm +# Clang | Clang3[7-9] | Clang[4-6]0 | Icc | IccKNL | Cray | Arm setenv WM_COMPILER Gcc # [WM_ARCH_OPTION] - Memory addressing: @@ -85,12 +83,15 @@ setenv WM_COMPILE_OPTION Opt setenv WM_MPLIB SYSTEMOPENMPI -# [FOAM_SIGFPE] - Trapping of floating-point exceptions. +#------------------------------------------------------------------------------ +# (legacy / advanced) +# +# [FOAM_SIGFPE] - Trap floating-point exceptions. # - overrides the 'trapFpe' controlDict entry # = true | false #setenv FOAM_SIGFPE true -# [FOAM_SETNAN] - Memory initialisation as NaN +# [FOAM_SETNAN] - Initialize memory with NaN # - overrides the 'setNaN' controlDict entry # = true | false #setenv FOAM_SETNAN false @@ -139,10 +140,9 @@ setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION # Load shell "functions" (actually aliases) source $WM_PROJECT_DIR/etc/config.csh/functions -# Override definitions via prefs, with 'other' first so the sys-admin -# can provide base values independent of WM_PROJECT_SITE -_foamEtc -mode=o prefs.csh -_foamEtc -mode=ug prefs.csh +# Overrides via <prefs.csh> +_foamEtc -mode=o prefs.csh # 1) other (system) systems +_foamEtc -mode=ug prefs.csh # 2) user or group settings # Evaluate command-line parameters and record settings for later. # These can be used to set/unset values, specify additional files etc.