diff --git a/.gitignore b/.gitignore index e2c6f9b41f320800ffa96e192129bb90a8eab745..67ac189fcca1d9f32a9c445814f28bf0e2682863 100644 --- a/.gitignore +++ b/.gitignore @@ -60,8 +60,8 @@ doc/[Dd]oxygen/man # untracked configuration files /etc/prefs.csh /etc/prefs.sh -/etc/config/*.csh -/etc/config/*.sh +/etc/config/prefs.csh +/etc/config/prefs.sh # source packages - anywhere *.tar.bz2 diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths index f3948c3cc2085af0f3c7579bb87d60680615112b..9526748f07bc28b66561db5c0a29bff1dfebcefd 100755 --- a/bin/tools/foamConfigurePaths +++ b/bin/tools/foamConfigurePaths @@ -131,7 +131,7 @@ do paraviewInstall="$2" # replace ParaView_DIR=... _inlineSed \ - etc/apps/paraview3/bashrc \ + etc/config/paraview.sh \ '/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='"$paraviewInstall@" \ "Replacing ParaView_DIR setting by '$paraviewInstall'" shift 2 diff --git a/etc/bashrc b/etc/bashrc index d2539c5b5012bcf606366ef7d4d33bc24f617f1a..62c9854d951170d0c442782c23d7a16aba1ade5a 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -177,7 +177,7 @@ _foamEval() _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh` # Evaluate command-line parameters and record settings for later -# these can be used to set/unset values, or specify prefs files +# these can be used to set/unset values, or specify alternative pref files export FOAM_SETTINGS="$@" _foamEval $@ @@ -201,13 +201,13 @@ export PATH LD_LIBRARY_PATH MANPATH # Source project setup files # ~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamSource $WM_PROJECT_DIR/etc/settings.sh -_foamSource $WM_PROJECT_DIR/etc/aliases.sh +_foamSource $WM_PROJECT_DIR/etc/config/aliases.sh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/bashrc` -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/bashrc` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh` # Clean environment paths again. Only remove duplicates diff --git a/etc/config/README b/etc/config/README new file mode 100644 index 0000000000000000000000000000000000000000..8c22b460161d4dff2610e4471fb3502a73421cf7 --- /dev/null +++ b/etc/config/README @@ -0,0 +1,51 @@ +The main OpenFOAM settings are located in the parent etc/ directory + +* bashrc, cshrc + entry point for sourcing + +* settings.csh, settings.sh + core settings + +* 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: + +* 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 + +--- + +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 + +--- diff --git a/etc/aliases.csh b/etc/config/aliases.csh similarity index 92% rename from etc/aliases.csh rename to etc/config/aliases.csh index 558390b403e21cc5d155cd8c839648a3cc892d75..6573c91973a7ecadc9f45cddc5dfa827f8fdb2ef 100644 --- a/etc/aliases.csh +++ b/etc/config/aliases.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# etc/aliases.csh +# etc/config/aliases.csh # # Description # Aliases for working with OpenFOAM @@ -39,7 +39,7 @@ alias wmSP 'wmSET WM_PRECISION_OPTION=SP' alias wmDP 'wmSET WM_PRECISION_OPTION=DP' # clear env -alias wmUNSET='source $WM_PROJECT_DIR/etc/unset.csh' +alias wmUNSET='source $WM_PROJECT_DIR/etc/config/unset.csh' # Toggle wmakeScheduler on/off # - also need to set WM_HOSTS @@ -49,7 +49,7 @@ alias wmSchedOFF 'unsetenv WM_SCHEDULER' # Change ParaView version # ~~~~~~~~~~~~~~~~~~~~~~~ -alias foamPV 'source `$WM_PROJECT_DIR/etc/apps/paraview3/cshrc` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION' +alias foamPV 'source `$WM_PROJECT_DIR/etc/config/paraview.csh` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION' # Change directory aliases diff --git a/etc/aliases.sh b/etc/config/aliases.sh similarity index 94% rename from etc/aliases.sh rename to etc/config/aliases.sh index e9c1227004a3a63e5bac945ec8eebf2b5a09ffc5..188159745c185b1d43244ca4f027e7716d402e45 100644 --- a/etc/aliases.sh +++ b/etc/config/aliases.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# etc/aliases.sh +# etc/config/aliases.sh # # Description # Aliases for working with OpenFOAM @@ -39,7 +39,7 @@ alias wmSP='wmSET WM_PRECISION_OPTION=SP' alias wmDP='wmSET WM_PRECISION_OPTION=DP' # clear env -alias wmUNSET='. $WM_PROJECT_DIR/etc/unset.sh' +alias wmUNSET='. $WM_PROJECT_DIR/etc/config/unset.sh' # Toggle wmakeScheduler on/off # - also need to set WM_HOSTS @@ -52,7 +52,7 @@ alias wmSchedOFF='unset WM_SCHEDULER' unset foamPV foamPV() { - . $WM_PROJECT_DIR/etc/apps/paraview3/bashrc ParaView_VERSION=$1 + . $WM_PROJECT_DIR/etc/config/paraview.sh ParaView_VERSION=$1 echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)" } diff --git a/etc/apps/ensight/cshrc b/etc/config/ensight.csh similarity index 95% rename from etc/apps/ensight/cshrc rename to etc/config/ensight.csh index 73a00884fcef89f6b9d0ba867d21168b2369ebc8..484fa0fc02d73e31286103cc2897f26dd825ba94 100644 --- a/etc/apps/ensight/cshrc +++ b/etc/config/ensight.csh @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# ensight/cshrc +# config/ensight.csh # # Description # Setup file for Ensight diff --git a/etc/apps/ensight/bashrc b/etc/config/ensight.sh similarity index 95% rename from etc/apps/ensight/bashrc rename to etc/config/ensight.sh index 0e6b981bc8976a9d5f27d0450f5c9ef2b58b9c4f..597c51c010a43367c1e9cfe3cb84b7366c43e681 100644 --- a/etc/apps/ensight/bashrc +++ b/etc/config/ensight.sh @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# ensight/bashrc +# config/ensight.sh # # Description # Setup file for Ensight diff --git a/etc/config/compiler.csh-EXAMPLE b/etc/config/example/compiler.csh similarity index 94% rename from etc/config/compiler.csh-EXAMPLE rename to etc/config/example/compiler.csh index 6d54edbd479480932a8d0ddcb15d27529592e77b..6905daf8bd64f72d5cd644a41bd58ca09ab1debd 100644 --- a/etc/config/compiler.csh-EXAMPLE +++ b/etc/config/example/compiler.csh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# config/compiler.csh +# config/example/compiler.csh # # Description -# Fine tuning of ThirdParty compiler settings for OpenFOAM +# Example of fine tuning ThirdParty compiler settings for OpenFOAM # Sourced from OpenFOAM-<VERSION>/etc/settings.csh # #------------------------------------------------------------------------------ diff --git a/etc/config/compiler.sh-EXAMPLE b/etc/config/example/compiler.sh similarity index 94% rename from etc/config/compiler.sh-EXAMPLE rename to etc/config/example/compiler.sh index bc6aada36e279d1857642f9fcb062d9e359dd22a..7dffdcc10c4f25649e6a61a41a4dae7c4e11a35a 100644 --- a/etc/config/compiler.sh-EXAMPLE +++ b/etc/config/example/compiler.sh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# config/compiler.sh +# config/example/compiler.sh # # Description -# Fine tuning of ThirdParty compiler settings for OpenFOAM +# Example of fine tuning ThirdParty compiler settings for OpenFOAM # Sourced from OpenFOAM-<VERSION>/etc/settings.sh # #------------------------------------------------------------------------------ diff --git a/etc/config/openmpi.csh-EXAMPLE b/etc/config/example/openmpi.csh similarity index 93% rename from etc/config/openmpi.csh-EXAMPLE rename to etc/config/example/openmpi.csh index 94be702e9d7c051524390808d288609d80a7dc01..da07872d31b7eee9742971fd3b9e36d6139e5542 100644 --- a/etc/config/openmpi.csh-EXAMPLE +++ b/etc/config/example/openmpi.csh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# config/openmpi.csh +# config/example/openmpi.csh # # Description -# Fine tuning of openmpi settings for OpenFOAM +# Example of fine tuning openmpi settings for OpenFOAM # Sourced from OpenFOAM-<VERSION>/etc/settings.csh # #------------------------------------------------------------------------------ diff --git a/etc/config/openmpi.sh-EXAMPLE b/etc/config/example/openmpi.sh similarity index 93% rename from etc/config/openmpi.sh-EXAMPLE rename to etc/config/example/openmpi.sh index b7c5035b0487fc65c9c29563772e5c7af0b9fd4e..7c0ed18543136e16e0b31e39fc6ebdbcbf8e88a6 100644 --- a/etc/config/openmpi.sh-EXAMPLE +++ b/etc/config/example/openmpi.sh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# config/openmpi.sh +# config/example/openmpi.sh # # Description -# Fine tuning of openmpi settings for OpenFOAM +# Example of fine tuning openmpi settings for OpenFOAM # Sourced from OpenFOAM-<VERSION>/etc/settings.sh # #------------------------------------------------------------------------------ diff --git a/etc/apps/paraview3/cshrc-EXAMPLE b/etc/config/example/paraview.csh similarity index 86% rename from etc/apps/paraview3/cshrc-EXAMPLE rename to etc/config/example/paraview.csh index 475dbffce03ce049a7142744ff9a12b812c811ff..8509e924e37fd7b7c23c322a9724e765f4520492 100644 --- a/etc/apps/paraview3/cshrc-EXAMPLE +++ b/etc/config/example/paraview.csh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# paraview3/cshrc-EXAMPLE +# config/example/paraview.csh # # Description -# Example of chaining to the standard paraview3/cshrc with a +# Example of chaining to the standard config/paraview.csh with a # different ParaView_VERSION # # Note @@ -35,10 +35,10 @@ #------------------------------------------------------------------------------ # -# Use other (shipped) cshrc with a different ParaView_VERSION +# Use other (shipped) paraview.csh with a different ParaView_VERSION # -set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o apps/paraview3/cshrc` +set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.csh` if ( $status == 0 ) source $foamFile ParaView_VERSION=3.9.0 unset foamFile diff --git a/etc/apps/paraview3/bashrc-EXAMPLE b/etc/config/example/paraview.sh similarity index 86% rename from etc/apps/paraview3/bashrc-EXAMPLE rename to etc/config/example/paraview.sh index 8db47a9ec7190cbc7072c60e1b42b0ec529c4ab0..09b300f137545f7c8e01b1a31fa5949f0d9041b7 100644 --- a/etc/apps/paraview3/bashrc-EXAMPLE +++ b/etc/config/example/paraview.sh @@ -22,10 +22,10 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# paraview3/bashrc-EXAMPLE +# config/example/paraview.sh # # Description -# Example of chaining to the standard paraview3/bashrc with a +# Example of chaining to the standard config/paraview.sh with a # different ParaView_VERSION # # Note @@ -35,10 +35,10 @@ #------------------------------------------------------------------------------ # -# Use other (shipped) bashrc with a different ParaView_VERSION +# Use other (shipped) paraview.sh with a different ParaView_VERSION # -foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o apps/paraview3/bashrc 2>/dev/null) +foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.sh 2>/dev/null) [ $? -eq 0 ] && . $foamFile ParaView_VERSION=3.9.0 unset foamFile diff --git a/etc/prefs.csh-EXAMPLE b/etc/config/example/prefs.csh similarity index 98% rename from etc/prefs.csh-EXAMPLE rename to etc/config/example/prefs.csh index 56091f798ed88c0ed32abf5be728de01304e878a..83f7a7b7b4534d068ac8adae7fed996a27005ed8 100644 --- a/etc/prefs.csh-EXAMPLE +++ b/etc/config/example/prefs.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# etc/prefs.csh +# config/example/prefs.csh # # Description # Preset variables for the OpenFOAM configuration - C-Shell shell syntax. diff --git a/etc/prefs.sh-EXAMPLE b/etc/config/example/prefs.sh similarity index 98% rename from etc/prefs.sh-EXAMPLE rename to etc/config/example/prefs.sh index f3e771d030dbbe42039f7037bd743a7bc5b2f635..d2251ce63f198d7df07721c78605e363f004c821 100644 --- a/etc/prefs.sh-EXAMPLE +++ b/etc/config/example/prefs.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# etc/prefs.sh +# config/example/prefs.sh # # Description # Preset variables for the OpenFOAM configuration - POSIX shell syntax. diff --git a/etc/apps/paraview3/cshrc b/etc/config/paraview.csh similarity index 99% rename from etc/apps/paraview3/cshrc rename to etc/config/paraview.csh index 867353e843e7a6511c9f241129a2cb8ad356200c..c9adc6f1980d1ae612a430a5d847e4f0c3a1d357 100644 --- a/etc/apps/paraview3/cshrc +++ b/etc/config/paraview.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# paraview3/cshrc +# config/paraview.csh # # Description # Setup file for paraview-3.x diff --git a/etc/apps/paraview3/bashrc b/etc/config/paraview.sh similarity index 99% rename from etc/apps/paraview3/bashrc rename to etc/config/paraview.sh index 1dd5386829359ddd134b8d74ee62f3eb157906f0..1c38b3dd3fa04908572123e772a936368b67ae0e 100644 --- a/etc/apps/paraview3/bashrc +++ b/etc/config/paraview.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# paraview3/bashrc +# config/paraview.sh # # Description # Setup file for paraview-3.x @@ -113,7 +113,6 @@ else unset PV_PLUGIN_PATH fi - unset _foamParaviewEval unset cleaned cmake paraviewInstDir paraviewPython diff --git a/etc/apps/scotch/bashrc b/etc/config/scotch.sh similarity index 98% rename from etc/apps/scotch/bashrc rename to etc/config/scotch.sh index 0fb6952110d09fa9cc2c6aab67e149f4b9e48e7f..f32f62292c5a2fbe1624bf8987bc4ab6f9da18d2 100644 --- a/etc/apps/scotch/bashrc +++ b/etc/config/scotch.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# scotch/bashrc +# config/scotch.sh # # Description # Setup file for scotch include/libraries. @@ -36,5 +36,4 @@ export SCOTCH_VERSION=scotch_5.1.11 export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION - # ----------------------------------------------------------------------------- diff --git a/etc/unset.csh b/etc/config/unset.csh similarity index 99% rename from etc/unset.csh rename to etc/config/unset.csh index 48a163791262dbb33fef3aa3ab4c26634ef45e4b..d9a3d697874b74d98e4c70cac717da0b4194bb13 100644 --- a/etc/unset.csh +++ b/etc/config/unset.csh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# etc/unset.csh +# etc/config/unset.csh # # Description # Clear as many OpenFOAM environment settings as possible diff --git a/etc/unset.sh b/etc/config/unset.sh similarity index 99% rename from etc/unset.sh rename to etc/config/unset.sh index 23e182aa53f922e5effaeac1dd85a9d33c030771..66ee2e35b5b6c957e37b9d7afee4d8b60e7ef6ce 100644 --- a/etc/unset.sh +++ b/etc/config/unset.sh @@ -22,7 +22,7 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# etc/unset.sh +# etc/config/unset.sh # # Description # Clear as many OpenFOAM environment settings as possible diff --git a/etc/cshrc b/etc/cshrc index c2c1b12a9b7757074536e74a937a034b7e07ad58..c87986832ab3d7829fa4e63aa4a9acf65c6da1d9 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -138,7 +138,7 @@ alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!* _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh` # Evaluate command-line parameters and record settings for later -# these can be used to set/unset values, or specify prefs files +# these can be used to set/unset values, or specify alternative pref files setenv FOAM_SETTINGS "${*}" while ( $#argv > 0 ) switch ($argv[1]) @@ -195,12 +195,12 @@ if ( $status == 0 ) setenv MANPATH $cleaned # Source project setup files # ~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamSource $WM_PROJECT_DIR/etc/settings.csh -_foamSource $WM_PROJECT_DIR/etc/aliases.csh +_foamSource $WM_PROJECT_DIR/etc/config/aliases.csh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/cshrc` -_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/cshrc` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh` +_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh` # Clean environment paths again. Only remove duplicates diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake index cded295a7e274c66c4c11769013d0957e9beb42d..b620b27791e388a86f88b3b59474cc60769a7cf4 100755 --- a/src/parallel/decompose/Allwmake +++ b/src/parallel/decompose/Allwmake @@ -3,13 +3,13 @@ cd ${0%/*} || exit 1 # run from this directory makeType=${1:-libso} # get SCOTCH_VERSION, SCOTCH_ARCH_PATH -if settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc` +if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh` then . $settings echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH" else echo - echo "Error: no apps/scotch/bashrc settings" + echo "Error: no config/scotch.sh settings" echo fi