OpenFOAM-dev/etc: separated scripts for bash and csh into separate directories

etc/config.sh and etc/config.csh

This structure is more convenient to add support for other shells, e.g. zsh, fish etc.

Resolves feature request to simplify support for other shells in
http://www.openfoam.org/mantisbt/view.php?id=1232
This commit is contained in:
Henry Weller
2016-02-10 10:22:25 +00:00
parent b6ac82315c
commit 715d1bf2c0
27 changed files with 112 additions and 146 deletions

20
etc/README.org Normal file
View File

@ -0,0 +1,20 @@
* OpenFOAM Configuration
The main OpenFOAM settings are located in the parent etc/ directory. The bash
and csh shells are supported and to configure OpenFOAM source etc/bashrc or
etc/cshrc respectively which source the following files in the config.sh or
config.csh respectively:
+ =settings=: core settings
+ =aliases=: aliases for interactive shells
+ =unset=: sourced to clear as many OpenFOAM environment settings as possible
+ =ensight=: application settings for EnSight
+ =paraview=: application settings for ParaView
+ =scotch=: application settings for compiling against scotch
+ =metis=: application settings for compiling against metis 5
The config.*/example directories contains various example configuration files
for the corresponding shell:
+ =compiler=: an example of fine tuning ThirdParty compiler settings
+ =openmpi=: an example of fine tuning openmpi settings for OpenFOAM
+ =paraview=: an example of chaining to the standard config/paraview with a
different ParaView_VERSION
+ =prefs=: an example of supplying alternative site-defined settings

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -211,16 +211,16 @@ export PATH LD_LIBRARY_PATH MANPATH
# Source project setup files # Source project setup files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource $WM_PROJECT_DIR/etc/config/settings.sh _foamSource $WM_PROJECT_DIR/etc/config.sh/settings
_foamSource $WM_PROJECT_DIR/etc/config/aliases.sh _foamSource $WM_PROJECT_DIR/etc/config.sh/aliases
# Source user setup files for optional packages # Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/gperftools.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL`
# Clean environment paths again. Only remove duplicates # Clean environment paths again. Only remove duplicates

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/CGAL.csh # config.csh/CGAL
# #
# Description # Description
# Setup file for CGAL (& boost) include/libraries. # Setup file for CGAL (& boost) include/libraries.

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# etc/config/aliases.csh # etc/config.csh/aliases
# #
# Description # Description
# Aliases for working with OpenFOAM # Aliases for working with OpenFOAM
@ -42,7 +42,7 @@ alias wmDP 'wmSET WM_PRECISION_OPTION=DP'
alias wmREFRESH 'wmSET $FOAM_SETTINGS' alias wmREFRESH 'wmSET $FOAM_SETTINGS'
# clear env # clear env
alias wmUNSET 'source $WM_PROJECT_DIR/etc/config/unset.csh' alias wmUNSET 'source $WM_PROJECT_DIR/etc/config.csh/unset'
# Toggle wmakeScheduler on/off # Toggle wmakeScheduler on/off
# - also need to set WM_HOSTS # - also need to set WM_HOSTS
@ -52,7 +52,7 @@ alias wmSchedOFF 'unsetenv WM_SCHEDULER'
# Change ParaView version # Change ParaView version
# ~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~
alias foamPV 'source `$WM_PROJECT_DIR/etc/config/paraview.csh` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION' alias foamPV 'source `$WM_PROJECT_DIR/etc/config.csh/paraview` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
# Change directory aliases # Change directory aliases

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/ensight.csh # config.csh/ensight
# #
# Description # Description
# Setup file for Ensight # Setup file for Ensight

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,11 +22,11 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/example/compiler.csh # config.csh/example/compiler
# #
# Description # Description
# Example of fine tuning ThirdParty compiler settings for OpenFOAM # Example of fine tuning ThirdParty compiler settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/config/settings.csh # Sourced from OpenFOAM-<VERSION>/etc/config.csh/settings
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,11 +22,11 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/example/openmpi.csh # config.csh/example/openmpi
# #
# Description # Description
# Example of fine tuning openmpi settings for OpenFOAM # Example of fine tuning openmpi settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/config/settings.csh # Sourced from OpenFOAM-<VERSION>/etc/config.csh/settings
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,10 +22,10 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/example/paraview.csh # config.csh/example/paraview
# #
# Description # Description
# Example of chaining to the standard config/paraview.csh with a # Example of chaining to the standard config.csh/paraview with a
# different ParaView_VERSION # different ParaView_VERSION
# #
# Note # Note
@ -38,7 +38,7 @@
# Use other (shipped) paraview.csh with a different ParaView_VERSION # Use other (shipped) paraview.csh with a different ParaView_VERSION
# #
set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.csh` set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config.csh/paraview`
if ( $status == 0 ) source $foamFile ParaView_VERSION=3.12.0 if ( $status == 0 ) source $foamFile ParaView_VERSION=3.12.0
unset foamFile unset foamFile

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/example/prefs.csh # config.csh/example/prefs.csh
# #
# Description # Description
# Preset variables for the OpenFOAM configuration - C-Shell shell syntax. # Preset variables for the OpenFOAM configuration - C-Shell shell syntax.

View File

@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/paraview.csh # config.csh/paraview
# #
# Description # Description
# Setup file for paraview-[3-5].x # Setup file for paraview-[3-5].x

View File

@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# etc/config/settings.csh # etc/config.csh/settings
# #
# Description # Description
# Startup file for OpenFOAM # Startup file for OpenFOAM
@ -209,7 +209,7 @@ unsetenv MPFR_ARCH_PATH GMP_ARCH_PATH
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( ! $?foamCompiler ) then if ( ! $?foamCompiler ) then
set foamCompiler=system set foamCompiler=system
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " foamCompiler not set, using '$foamCompiler'" echo " foamCompiler not set, using '$foamCompiler'"
endif endif
@ -254,7 +254,7 @@ case ThirdParty:
breaksw breaksw
default: default:
echo echo
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'" echo " Unknown OpenFOAM compiler type '$WM_COMPILER'"
echo " Please check your settings" echo " Please check your settings"
echo echo
@ -262,7 +262,7 @@ case ThirdParty:
endsw endsw
# Optional configuration tweaks: # Optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/compiler`
if ( $?gcc_version ) then if ( $?gcc_version ) then
set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
@ -275,7 +275,7 @@ case ThirdParty:
# Check that the compiler directory can be found # Check that the compiler directory can be found
if ( ! -d "$gccDir" ) then if ( ! -d "$gccDir" ) then
echo echo
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " Cannot find $gccDir installation." echo " Cannot find $gccDir installation."
echo " Please install this compiler version or if you wish to" \ echo " Please install this compiler version or if you wish to" \
" use the system compiler," " use the system compiler,"
@ -311,7 +311,7 @@ case ThirdParty:
# Check that the compiler directory can be found # Check that the compiler directory can be found
if ( ! -d "$clangDir" ) then if ( ! -d "$clangDir" ) then
echo echo
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " Cannot find $clangDir installation." echo " Cannot find $clangDir installation."
echo " Please install this compiler version or if you wish to" \ echo " Please install this compiler version or if you wish to" \
" use the system compiler," " use the system compiler,"
@ -360,7 +360,7 @@ case SYSTEMOPENMPI:
case OPENMPI: case OPENMPI:
setenv FOAM_MPI openmpi-1.10.0 setenv FOAM_MPI openmpi-1.10.0
# Optional configuration tweaks: # Optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/openmpi`
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
@ -381,7 +381,7 @@ case SYSTEMMPI:
if ( ! ($?MPI_ROOT) ) then if ( ! ($?MPI_ROOT) ) then
echo echo
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " Please set the environment variable MPI_ROOT to point to" \ echo " Please set the environment variable MPI_ROOT to point to" \
" the base folder for the system MPI in use." " the base folder for the system MPI in use."
echo " Example:" echo " Example:"
@ -393,7 +393,7 @@ case SYSTEMMPI:
if ( ! ($?MPI_ARCH_FLAGS) ) then if ( ! ($?MPI_ARCH_FLAGS) ) then
echo echo
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ARCH_FLAGS is not set. Example:" echo " MPI_ARCH_FLAGS is not set. Example:"
echo echo
echo ' setenv MPI_ARCH_FLAGS "-DOMPI_SKIP_MPICXX"' echo ' setenv MPI_ARCH_FLAGS "-DOMPI_SKIP_MPICXX"'
@ -402,7 +402,7 @@ case SYSTEMMPI:
if ( ! ($?MPI_ARCH_INC) ) then if ( ! ($?MPI_ARCH_INC) ) then
echo echo
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ARCH_INC is not set. Example:" echo " MPI_ARCH_INC is not set. Example:"
echo echo
echo ' setenv MPI_ARCH_INC "-isystem $MPI_ROOT/include"' echo ' setenv MPI_ARCH_INC "-isystem $MPI_ROOT/include"'
@ -411,7 +411,7 @@ case SYSTEMMPI:
if ( ! ($?MPI_ARCH_LIBS) ) then if ( ! ($?MPI_ARCH_LIBS) ) then
echo echo
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ARCH_LIBS is not set. Example:" echo " MPI_ARCH_LIBS is not set. Example:"
echo echo
echo ' setenv MPI_ARCH_LIBS "-L$MPI_ROOT/lib -lmpi"' echo ' setenv MPI_ARCH_LIBS "-L$MPI_ROOT/lib -lmpi"'
@ -499,7 +499,7 @@ case SGIMPI:
if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
if ( ! -d "$MPI_ROOT" ) then if ( ! -d "$MPI_ROOT" ) then
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ROOT not a valid mpt installation directory." echo " MPI_ROOT not a valid mpt installation directory."
echo " Please set MPI_ROOT to the mpt installation directory." echo " Please set MPI_ROOT to the mpt installation directory."
echo " (usually done by loading the mpt module)" echo " (usually done by loading the mpt module)"
@ -529,7 +529,7 @@ case INTELMPI:
if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
if ( ! -d "$MPI_ROOT" ) then if ( ! -d "$MPI_ROOT" ) then
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
echo " MPI_ROOT not a valid mpt installation directory." echo " MPI_ROOT not a valid mpt installation directory."
echo " Please set MPI_ROOT to the mpt installation directory." echo " Please set MPI_ROOT to the mpt installation directory."
echo " (usually done by loading the mpt module)" echo " (usually done by loading the mpt module)"

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# etc/config/unset.csh # etc/config.csh/unset
# #
# Description # Description
# Clear as many OpenFOAM environment settings as possible # Clear as many OpenFOAM environment settings as possible

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/CGAL.sh # config.sh/CGAL
# #
# Description # Description
# Setup file for CGAL (& boost) include/libraries. # Setup file for CGAL (& boost) include/libraries.

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# etc/config/aliases.sh # etc/config.sh/aliases
# #
# Description # Description
# Aliases for working with OpenFOAM # Aliases for working with OpenFOAM
@ -42,7 +42,7 @@ alias wmDP='wmSET WM_PRECISION_OPTION=DP'
alias wmREFRESH='wmSET $FOAM_SETTINGS' alias wmREFRESH='wmSET $FOAM_SETTINGS'
# clear env # clear env
alias wmUNSET='. $WM_PROJECT_DIR/etc/config/unset.sh' alias wmUNSET='. $WM_PROJECT_DIR/etc/config.sh/unset'
# Toggle wmakeScheduler on/off # Toggle wmakeScheduler on/off
# - also need to set WM_HOSTS # - also need to set WM_HOSTS
@ -55,7 +55,7 @@ alias wmSchedOFF='unset WM_SCHEDULER'
unset foamPV unset foamPV
foamPV() foamPV()
{ {
. $WM_PROJECT_DIR/etc/config/paraview.sh ParaView_VERSION=$1 . $WM_PROJECT_DIR/etc/config.sh/paraview ParaView_VERSION=$1
echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)" 1>&2 echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)" 1>&2
} }

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/ensight.sh # config.sh/ensight
# #
# Description # Description
# Setup file for Ensight # Setup file for Ensight

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,11 +22,11 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/example/compiler.sh # config.sh/example/compiler
# #
# Description # Description
# Example of fine tuning ThirdParty compiler settings for OpenFOAM # Example of fine tuning ThirdParty compiler settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/config/settings.sh # Sourced from OpenFOAM-<VERSION>/etc/config.sh/settings
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,11 +22,11 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/example/openmpi.sh # config.sh/example/openmpi
# #
# Description # Description
# Example of fine tuning openmpi settings for OpenFOAM # Example of fine tuning openmpi settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/config/settings.sh # Sourced from OpenFOAM-<VERSION>/etc/config.sh/settings
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,10 +22,10 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/example/paraview.sh # config.sh/example/paraview
# #
# Description # Description
# Example of chaining to the standard config/paraview.sh with a # Example of chaining to the standard config.sh/paraview with a
# different ParaView_VERSION # different ParaView_VERSION
# #
# Note # Note
@ -35,10 +35,10 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# Use other (shipped) paraview.sh with a different ParaView_VERSION # Use other (shipped) paraview with a different ParaView_VERSION
# #
foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.sh 2>/dev/null) foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o config.sh/paraview 2>/dev/null)
[ $? -eq 0 ] && . $foamFile ParaView_VERSION=3.12.0 [ $? -eq 0 ] && . $foamFile ParaView_VERSION=3.12.0
unset foamFile unset foamFile

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/example/prefs.sh # config.sh/example/prefs.sh
# #
# Description # Description
# Preset variables for the OpenFOAM configuration - POSIX shell syntax. # Preset variables for the OpenFOAM configuration - POSIX shell syntax.

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/gperftools.sh # config.sh/gperftools
# #
# Description # Description
# Setup file for gperftools binaries libraries. # Setup file for gperftools binaries libraries.

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/metis.sh # config.sh/metis
# #
# Description # Description
# Setup file for metis include/libraries. # Setup file for metis include/libraries.

View File

@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/paraview.sh # config.sh/paraview
# #
# Description # Description
# Setup file for paraview-[3-5].x # Setup file for paraview-[3-5].x

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# config/scotch.sh # config.sh/scotch
# #
# Description # Description
# Setup file for scotch include/libraries. # Setup file for scotch include/libraries.

View File

@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# etc/config/settings.sh # etc/config.sh/settings
# #
# Description # Description
# Startup file for OpenFOAM # Startup file for OpenFOAM
@ -236,7 +236,7 @@ unset MPFR_ARCH_PATH GMP_ARCH_PATH
if [ -z "$foamCompiler" ] if [ -z "$foamCompiler" ]
then then
foamCompiler=system foamCompiler=system
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " foamCompiler not set, using '$foamCompiler'" 1>&2 echo " foamCompiler not set, using '$foamCompiler'" 1>&2
fi fi
@ -279,7 +279,7 @@ OpenFOAM | ThirdParty)
;; ;;
*) *)
echo 1>&2 echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " Unknown OpenFOAM compiler type '$WM_COMPILER'" 1>&2 echo " Unknown OpenFOAM compiler type '$WM_COMPILER'" 1>&2
echo " Please check your settings" 1>&2 echo " Please check your settings" 1>&2
echo 1>&2 echo 1>&2
@ -287,7 +287,7 @@ OpenFOAM | ThirdParty)
esac esac
# Optional configuration tweaks: # Optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler`
if [ -n "$gcc_version" ] if [ -n "$gcc_version" ]
then then
@ -299,7 +299,7 @@ OpenFOAM | ThirdParty)
# Check that the compiler directory can be found # Check that the compiler directory can be found
[ -d "$gccDir" ] || { [ -d "$gccDir" ] || {
echo 1>&2 echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " Cannot find $gccDir installation." 1>&2 echo " Cannot find $gccDir installation." 1>&2
echo " Please install this compiler version or if you wish to" \ echo " Please install this compiler version or if you wish to" \
" use the system compiler," 1>&2 " use the system compiler," 1>&2
@ -337,7 +337,7 @@ OpenFOAM | ThirdParty)
# Check that the compiler directory can be found # Check that the compiler directory can be found
[ -d "$clangDir" ] || { [ -d "$clangDir" ] || {
echo 1>&2 echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " Cannot find $clangDir installation." 1>&2 echo " Cannot find $clangDir installation." 1>&2
echo " Please install this compiler version or if you wish to" \ echo " Please install this compiler version or if you wish to" \
" use the system compiler," 1>&2 " use the system compiler," 1>&2
@ -383,7 +383,7 @@ SYSTEMOPENMPI)
OPENMPI) OPENMPI)
export FOAM_MPI=openmpi-1.10.0 export FOAM_MPI=openmpi-1.10.0
# Optional configuration tweaks: # Optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/openmpi`
export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
@ -405,7 +405,7 @@ SYSTEMMPI)
if [ -z "$MPI_ROOT" ] if [ -z "$MPI_ROOT" ]
then then
echo 1>&2 echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " Please set the environment variable MPI_ROOT to point to" \ echo " Please set the environment variable MPI_ROOT to point to" \
" the base folder for the system MPI in use." 1>&2 " the base folder for the system MPI in use." 1>&2
echo " Example:" 1>&2 echo " Example:" 1>&2
@ -418,7 +418,7 @@ SYSTEMMPI)
if [ -z "$MPI_ARCH_FLAGS" ] if [ -z "$MPI_ARCH_FLAGS" ]
then then
echo 1>&2 echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " MPI_ARCH_FLAGS is not set. Example:" 1>&2 echo " MPI_ARCH_FLAGS is not set. Example:" 1>&2
echo 1>&2 echo 1>&2
echo " export MPI_ARCH_FLAGS=\"-DOMPI_SKIP_MPICXX\"" 1>&2 echo " export MPI_ARCH_FLAGS=\"-DOMPI_SKIP_MPICXX\"" 1>&2
@ -428,7 +428,7 @@ SYSTEMMPI)
if [ -z "$MPI_ARCH_INC" ] if [ -z "$MPI_ARCH_INC" ]
then then
echo 1>&2 echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " MPI_ARCH_INC is not set. Example:" 1>&2 echo " MPI_ARCH_INC is not set. Example:" 1>&2
echo 1>&2 echo 1>&2
echo " export MPI_ARCH_INC=\"-isystem \$MPI_ROOT/include\"" 1>&2 echo " export MPI_ARCH_INC=\"-isystem \$MPI_ROOT/include\"" 1>&2
@ -438,7 +438,7 @@ SYSTEMMPI)
if [ -z "$MPI_ARCH_LIBS" ] if [ -z "$MPI_ARCH_LIBS" ]
then then
echo 1>&2 echo 1>&2
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " MPI_ARCH_LIBS is not set. Example:" 1>&2 echo " MPI_ARCH_LIBS is not set. Example:" 1>&2
echo 1>&2 echo 1>&2
echo " export MPI_ARCH_LIBS=\"-L\$MPI_ROOT/lib -lmpi\"" 1>&2 echo " export MPI_ARCH_LIBS=\"-L\$MPI_ROOT/lib -lmpi\"" 1>&2
@ -532,7 +532,7 @@ SGIMPI)
if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ] if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
then then
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " MPI_ROOT not a valid mpt installation directory or ending" \ echo " MPI_ROOT not a valid mpt installation directory or ending" \
" in a '/'." 1>&2 " in a '/'." 1>&2
echo " Please set MPI_ROOT to the mpt installation directory." 1>&2 echo " Please set MPI_ROOT to the mpt installation directory." 1>&2
@ -559,7 +559,7 @@ INTELMPI)
if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ] if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
then then
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2 echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
echo " MPI_ROOT not a valid mpt installation directory or ending" \ echo " MPI_ROOT not a valid mpt installation directory or ending" \
" in a '/'." 1>&2 " in a '/'." 1>&2
echo " Please set MPI_ROOT to the mpt installation directory." 1>&2 echo " Please set MPI_ROOT to the mpt installation directory." 1>&2

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# File # File
# etc/config/unset.sh # etc/config.sh/unset
# #
# Description # Description
# Clear as many OpenFOAM environment settings as possible # Clear as many OpenFOAM environment settings as possible

View File

@ -1,54 +0,0 @@
The main OpenFOAM settings are located in the parent etc/ directory
* bashrc, cshrc
entry point for sourcing
* prefs.csh, prefs.sh
these files are untracked and can be used for some site-defined
settings
The etc/config/ directory contains various configuration files in
sh/csh variants:
* settings.csh, settings.sh
core settings
* aliases.csh, aliases.sh
aliases for interactive shells
* unset.csh, unset.sh
sourced to clear as many OpenFOAM environment settings as possible
* ensight.csh, ensight.sh
application settings for EnSight
* paraview.csh, paraview.sh
application settings for ParaView
* scotch.sh
application settings for compiling against scotch
* metis.sh
application settings for compiling against metis 5
---
The config/example directory contains various example configuration files
in sh/csh variants
* compiler.csh, compiler.sh
an example of fine tuning ThirdParty compiler settings for OpenFOAM
* openmpi.csh, openmpi.sh
an example of fine tuning openmpi settings for OpenFOAM
* paraview.csh, paraview.sh
an example of chaining to the standard config/paraview.sh with a
different ParaView_VERSION
* prefs.csh, prefs.sh
an example of supplying alternative site-defined settings
---

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -202,14 +202,14 @@ if ( $status == 0 ) setenv MANPATH $cleaned
# Source project setup files # Source project setup files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource $WM_PROJECT_DIR/etc/config/settings.csh _foamSource $WM_PROJECT_DIR/etc/config.csh/settings
_foamSource $WM_PROJECT_DIR/etc/config/aliases.csh _foamSource $WM_PROJECT_DIR/etc/config.csh/aliases
# Source user setup files for optional packages # Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/paraview`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/ensight`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/CGAL`
# Clean environment paths again. Only remove duplicates # Clean environment paths again. Only remove duplicates