diff --git a/bin/paraFoam b/bin/paraFoam index 6f1e2fe604..913ffa5bcf 100755 --- a/bin/paraFoam +++ b/bin/paraFoam @@ -4,37 +4,24 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. +# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------- # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # Script # paraFoam # # Description -# Start paraview with the OpenFOAM libraries and reader modules. +# Start paraview with OpenFOAM libraries and reader modules. # # Note -# Combining -block or -builtin options with -region option yields +# Combining -block, -vtk, -builtin options with -region option yields # undefined behaviour #------------------------------------------------------------------------------ -usage() { - exec 1>&2 - while [ "$#" -ge 1 ]; do echo "$1"; shift; done +printHelp() { + # Print usage to stdout so that it can be captured for bash completion cat<. +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/bashrc # # Description -# Set the environment for OpenFOAM when using a POSIX shell. -# To be sourced manually or from the ~/.profile or ~/.bashrc files. -# Should be usable by any POSIX-compliant shell (eg, bash,dash,zsh,...) +# Set OpenFOAM environment for POSIX shell (eg, bash,dash,zsh,...) +# Source manually or from the ~/.profile or ~/.bashrc files. +# +# Note +# Many environment variables can be overridden using a 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 +# +# Any changes made to this bashrc file may be lost with the next upgrade. # #------------------------------------------------------------------------------ export WM_PROJECT=OpenFOAM export WM_PROJECT_VERSION=plus -################################################################################ -# USER EDITABLE PART: Changes made here may be lost with the next upgrade -# -# FOAM_INST_DIR = the parent directory containing the OpenFOAM installation(s). -# - If the OpenFOAM installation has this OpenFOAM-/etc/bashrc, the -# next lines should work when sourced by a BASH or ZSH shell. -# - If this does not produce the desired result, please set one of the fallback -# values to an appropriate path. -# +# [FOAM_INST_DIR] - parent directory containing the OpenFOAM installation. +# * When this file is located as $WM_PROJECT_DIR/etc/bashrc, the next lines +# should work when sourced by BASH or ZSH shells. If this however fails, +# set one of the fallback values to an appropriate path. +# -- rc="${BASH_SOURCE:-${ZSH_NAME:+$0}}" [ -n "$rc" ] && FOAM_INST_DIR=$(\cd $(dirname $rc)/../.. && \pwd -L) || \ FOAM_INST_DIR=$HOME/$WM_PROJECT @@ -55,55 +52,55 @@ FOAM_INST_DIR=$HOME/$WM_PROJECT export FOAM_INST_DIR unset rc -# The default environment variables below can be overridden in a prefs.sh file -# located in ~/.OpenFOAM/$WM_PROJECT_VERSION, ~/.OpenFOAM, -# $FOAM_INST_DIR/site/$WM_PROJECT_VERSION or $FOAM_INST_DIR/site +# Default environment variables. +# Can override with a file instead of editing below. -#- Compiler location: -# WM_COMPILER_TYPE = system | ThirdParty +# [WM_COMPILER_TYPE] - Compiler location: +# = system | ThirdParty export WM_COMPILER_TYPE=system -#- Compiler: -# WM_COMPILER = Gcc | Gcc4[8-9] | Gcc5[1-4] | Gcc6[1-3] | GccKNL -# | Clang | Clang3[8-9] | Clang[45]0 | Icc | IccKNL | Cray +# [WM_COMPILER] - Compiler: +# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-3] | Gcc7[1-2] | GccKNL | +# Clang | Clang3[8-9] | Clang[45]0 | Icc | IccKNL | Cray export WM_COMPILER=Gcc -unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH -#- Memory addressing: -# WM_ARCH_OPTION = 32 | 64 -# - on a 64-bit OS this can be 32 or 64 -# - on a 32-bit OS addressing is 32-bit and this option is not used +# [WM_ARCH_OPTION] - Memory addressing: +# = 32 | 64 +# * on a 64-bit OS this can be 32 or 64 +# * on a 32-bit OS, it is always 32-bit and this option is ignored export WM_ARCH_OPTION=64 -#- Precision: -# WM_PRECISION_OPTION = DP | SP +# [WM_PRECISION_OPTION] - Floating-point precision: +# = DP | SP export WM_PRECISION_OPTION=DP -#- Label size: -# WM_LABEL_SIZE = 32 | 64 +# [WM_LABEL_SIZE] - Label size in bits: +# = 32 | 64 export WM_LABEL_SIZE=32 -#- Optimised, debug, profiling: -# WM_COMPILE_OPTION = Opt | Debug | Prof +# [WM_COMPILE_OPTION] - Optimised, debug, profiling: +# = Opt | Debug | Prof export WM_COMPILE_OPTION=Opt -#- MPI implementation: -# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPICH | MPICH-GM | HPMPI -# | MPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI +# [WM_MPLIB] - MPI implementation: +# = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPI | MPICH | MPICH-GM | +# HPMPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI export WM_MPLIB=SYSTEMOPENMPI -#- Operating System: -# WM_OSTYPE = POSIX -#export WM_OSTYPE=POSIX -#- Alternative to 'trapFpe' controlDict entry -# for floating-point exceptions (true|false) +# [FOAM_SIGFPE] - Trapping of floating-point exceptions. +# - overrides the 'trapFpe' controlDict entry +# = true | false #export FOAM_SIGFPE=true -#- Alternative to 'setNaN' controlDict entry -# for memory initialisation (true|false) +# [FOAM_SETNAN] - Memory initialisation as NaN +# - overrides the 'setNaN' controlDict entry +# = true | false #export FOAM_SETNAN=false +# [WM_OSTYPE] - Operating System Type: +# = POSIX +#export WM_OSTYPE=POSIX ################################################################################ @@ -153,14 +150,14 @@ _foamEval $@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foamClean=$WM_PROJECT_DIR/bin/foamCleanPath -#- Clean PATH +# Clean PATH cleaned=$($foamClean "$PATH" "$foamOldDirs") && PATH="$cleaned" -#- Clean LD_LIBRARY_PATH +# Clean LD_LIBRARY_PATH cleaned=$($foamClean "$LD_LIBRARY_PATH" "$foamOldDirs") \ && LD_LIBRARY_PATH="$cleaned" -#- Clean MANPATH +# Clean MANPATH cleaned=$($foamClean "$MANPATH" "$foamOldDirs") && MANPATH="$cleaned" export PATH LD_LIBRARY_PATH MANPATH @@ -198,18 +195,18 @@ _foamEtc config.sh/FFTW # Clean environment paths again. Only remove duplicates # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#- Clean PATH +# Clean PATH cleaned=$($foamClean "$PATH") && PATH="$cleaned" -#- Clean LD_LIBRARY_PATH +# Clean LD_LIBRARY_PATH cleaned=$($foamClean "$LD_LIBRARY_PATH") && LD_LIBRARY_PATH="$cleaned" -#- Clean MANPATH (trailing ':' to find system pages) +# Clean MANPATH (trailing ':' to find system pages) cleaned=$($foamClean "$MANPATH") && MANPATH="${cleaned}:" export PATH LD_LIBRARY_PATH MANPATH -#- Clean LD_PRELOAD +# Clean LD_PRELOAD if [ -n "$LD_PRELOAD" ] then cleaned=$($foamClean "$LD_PRELOAD") && LD_PRELOAD="$cleaned" @@ -220,10 +217,10 @@ fi # Cleanup environment # ~~~~~~~~~~~~~~~~~~~ -#- Functions +# Functions . $WM_PROJECT_DIR/etc/config.sh/functions -#- Variables (do as last for a clean exit code) +# Variables (do as last for a clean exit code) unset cleaned foamClean foamOldDirs #------------------------------------------------------------------------------ diff --git a/etc/config.csh/CGAL b/etc/config.csh/CGAL index 4f4a5f3c95..b45adadb51 100644 --- a/etc/config.csh/CGAL +++ b/etc/config.csh/CGAL @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/CGAL diff --git a/etc/config.csh/FFTW b/etc/config.csh/FFTW index 8733ff591a..d3efa7dc70 100644 --- a/etc/config.csh/FFTW +++ b/etc/config.csh/FFTW @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/FFTW diff --git a/etc/config.csh/aliases b/etc/config.csh/aliases index 0dbff6732a..a2651043d0 100644 --- a/etc/config.csh/aliases +++ b/etc/config.csh/aliases @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/aliases @@ -53,12 +41,6 @@ alias wmSchedOff 'unsetenv WM_SCHEDULER' # ~~~~~~~~~~~~~~~~~~~~~~~~ alias foam 'cd $WM_PROJECT_DIR' -if ( $?WM_PROJECT_SITE ) then - alias foamSite 'cd $WM_PROJECT_SITE' -else - alias foamSite 'cd $WM_PROJECT_INST_DIR/site' -endif - alias src 'cd $FOAM_SRC' alias lib 'cd $FOAM_LIBBIN' alias app 'cd $FOAM_APP' diff --git a/etc/config.csh/compiler b/etc/config.csh/compiler index fa9915788b..8db05c34fe 100644 --- a/etc/config.csh/compiler +++ b/etc/config.csh/compiler @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/compiler @@ -32,7 +20,7 @@ switch ("$WM_COMPILER_TYPE") case ThirdParty: - # Default versions of GMP, MPFR and MPC, override as necessary + # Default versions of GMP, MPFR, MPC - override as necessary set gmp_version=gmp-system set mpfr_version=mpfr-system set mpc_version=mpc-system @@ -57,6 +45,9 @@ case ThirdParty: case Gcc54: set gcc_version=gcc-5.4.0 breaksw + case Gcc55: + set gcc_version=gcc-5.5.0 + breaksw case Gcc61: set gcc_version=gcc-6.1.0 breaksw diff --git a/etc/config.csh/complete-wrapper b/etc/config.csh/complete-wrapper index 8fbbdffac6..db4822e48b 100644 --- a/etc/config.csh/complete-wrapper +++ b/etc/config.csh/complete-wrapper @@ -6,8 +6,9 @@ # \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ -# This file is part of OpenFOAM, licensed under the GNU General Public License -# . +# License +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/complete-wrapper diff --git a/etc/config.csh/ensight b/etc/config.csh/ensight index 6671523f63..0212bb6e4f 100644 --- a/etc/config.csh/ensight +++ b/etc/config.csh/ensight @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------- # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.csh/ensight diff --git a/etc/config.csh/example/compiler b/etc/config.csh/example/compiler index 20e98115ae..ebc90c35b1 100644 --- a/etc/config.csh/example/compiler +++ b/etc/config.csh/example/compiler @@ -3,23 +3,11 @@ # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation -# \\/ M anipulation | +# \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.csh/example/compiler @@ -30,6 +18,9 @@ # #------------------------------------------------------------------------------ +# Load the standard versions +eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh -mode=o config.csh/compiler` + # Modify/override compiler settings switch ("$WM_COMPILER") case Gcc70: diff --git a/etc/config.csh/example/openmpi b/etc/config.csh/example/openmpi index 70dc5d69ca..a23e951db9 100644 --- a/etc/config.csh/example/openmpi +++ b/etc/config.csh/example/openmpi @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.csh/example/openmpi @@ -31,6 +19,6 @@ #------------------------------------------------------------------------------ # Modified openmpi settings -setenv FOAM_MPI openmpi-1.4.3 +setenv FOAM_MPI openmpi-3.0.0 #------------------------------------------------------------------------------ diff --git a/etc/config.csh/example/paraview b/etc/config.csh/example/paraview index 3ce3baa299..a2211ec2ec 100644 --- a/etc/config.csh/example/paraview +++ b/etc/config.csh/example/paraview @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.csh/example/paraview @@ -34,12 +22,10 @@ # #------------------------------------------------------------------------------ -# -# Use other (shipped) paraview with a different ParaView_VERSION -# +# Use shipped paraview config file (-mode=o) with a different ParaView_VERSION set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode=o config.csh/paraview` -if ( $status == 0 ) source $foamFile ParaView_VERSION=5.0.1 +if ( $status == 0 ) source $foamFile ParaView_VERSION=5.4.0 unset foamFile diff --git a/etc/config.csh/example/prefs.csh b/etc/config.csh/example/prefs.csh index 99dca9f454..2d688b587b 100644 --- a/etc/config.csh/example/prefs.csh +++ b/etc/config.csh/example/prefs.csh @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.csh/example/prefs.csh @@ -36,17 +24,13 @@ # #------------------------------------------------------------------------------ -## Specify OpenFOAM ThirdParty compiler -## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# set WM_COMPILER_TYPE=ThirdParty +#- Compiler location: +setenv WM_COMPILER_TYPE ThirdParty -## Specify compiler type -## ~~~~~~~~~~~~~~~~~~~~~ -#setenv WM_COMPILER Clang - -## Specify system openmpi -## ~~~~~~~~~~~~~~~~~~~~~~ -# setenv WM_MPLIB SYSTEMOPENMPI +#- Compiler: +setenv WM_COMPILER Clang +#- MPI implementation: +setenv WM_MPLIB SYSTEMOPENMPI #------------------------------------------------------------------------------ diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi index ae9a7c15a4..a12e939757 100644 --- a/etc/config.csh/mpi +++ b/etc/config.csh/mpi @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/mpi diff --git a/etc/config.csh/paraview b/etc/config.csh/paraview index fa0cea0f49..b4e65fbf0c 100644 --- a/etc/config.csh/paraview +++ b/etc/config.csh/paraview @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.csh/paraview diff --git a/etc/config.csh/settings b/etc/config.csh/settings index 40c3df8985..05ed6eba4b 100644 --- a/etc/config.csh/settings +++ b/etc/config.csh/settings @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/settings @@ -38,11 +26,19 @@ alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}' alias _foamAddMan 'setenv MANPATH \!*\:${MANPATH}' #------------------------------------------------------------------------------ -# Set environment variables according to system type -if (! $?WM_OSTYPE ) setenv WM_OSTYPE POSIX # Default is POSIX -setenv WM_COMPILER_LIB_ARCH # Set, but empty: default for 32bit +setenv WM_ARCH `uname -s` # System name +if (! $?WM_OSTYPE ) setenv WM_OSTYPE POSIX # System type (POSIX is default) -setenv WM_ARCH `uname -s` +# Default compiler = gcc/g++ and C++11 +setenv WM_CC "gcc" +setenv WM_CXX "g++" +setenv WM_CFLAGS "-fPIC" +setenv WM_CXXFLAGS "-fPIC -std=c++11" +setenv WM_COMPILER_ARCH # Defined but empty +setenv WM_COMPILER_LIB_ARCH # Defined but empty: default for 32bit +unsetenv WM_LDFLAGS + +# Adjust according to system and architecture switch ($WM_ARCH) case Linux: setenv WM_ARCH linux @@ -57,21 +53,17 @@ case Linux: switch ($WM_ARCH_OPTION) case 32: setenv WM_COMPILER_ARCH 64 - setenv WM_CC 'gcc' - setenv WM_CXX 'g++' - setenv WM_CFLAGS '-m32 -fPIC' - setenv WM_CXXFLAGS '-m32 -fPIC -std=c++11' - setenv WM_LDFLAGS '-m32' + setenv WM_CFLAGS "$WM_CFLAGS -m32" + setenv WM_CXXFLAGS "$WM_CXXFLAGS -m32" + setenv WM_LDFLAGS "-m32" breaksw case 64: setenv WM_ARCH linux64 setenv WM_COMPILER_LIB_ARCH 64 - setenv WM_CC 'gcc' - setenv WM_CXX 'g++' - setenv WM_CFLAGS '-m64 -fPIC' - setenv WM_CXXFLAGS '-m64 -fPIC -std=c++11' - setenv WM_LDFLAGS '-m64' + setenv WM_CFLAGS "$WM_CFLAGS -m64" + setenv WM_CXXFLAGS "$WM_CXXFLAGS -m64" + setenv WM_LDFLAGS "-m64" breaksw default: @@ -83,27 +75,34 @@ case Linux: case ia64: setenv WM_ARCH linuxIA64 - setenv WM_COMPILER I64 + breaksw + + case armv7l: + setenv WM_ARCH linuxARM7 + setenv WM_ARCH_OPTION 32 + setenv WM_COMPILER_LIB_ARCH 32 + breaksw + + case aarch64: + setenv WM_ARCH linuxARM64 + setenv WM_ARCH_OPTION 64 + setenv WM_COMPILER_LIB_ARCH 64 breaksw case ppc64: setenv WM_ARCH linuxPPC64 setenv WM_COMPILER_LIB_ARCH 64 - setenv WM_CC 'gcc' - setenv WM_CXX 'g++' - setenv WM_CFLAGS '-m64 -fPIC' - setenv WM_CXXFLAGS '-m64 -fPIC -std=c++11' - setenv WM_LDFLAGS '-m64' + setenv WM_CFLAGS "$WM_CFLAGS -m64" + setenv WM_CXXFLAGS "$WM_CXXFLAGS -m64" + setenv WM_LDFLAGS "-m64" breaksw case ppc64le: setenv WM_ARCH linuxPPC64le setenv WM_COMPILER_LIB_ARCH 64 - setenv WM_CC 'gcc' - setenv WM_CXX 'g++' - setenv WM_CFLAGS '-m64 -fPIC' - setenv WM_CXXFLAGS '-m64 -fPIC -std=c++11' - setenv WM_LDFLAGS '-m64' + setenv WM_CFLAGS "$WM_CFLAGS -m64" + setenv WM_CXXFLAGS "$WM_CXXFLAGS -m64" + setenv WM_LDFLAGS "-m64" breaksw default: @@ -117,11 +116,9 @@ case SunOS: setenv WM_ARCH SunOS64 setenv WM_MPLIB FJMPI setenv WM_COMPILER_LIB_ARCH 64 - setenv WM_CC 'gcc' - setenv WM_CXX 'g++' - setenv WM_CFLAGS '-mabi=64 -fPIC' - setenv WM_CXXFLAGS '-mabi=64 -fPIC -std=c++11' - setenv WM_LDFLAGS '-mabi=64 -G0' + setenv WM_CFLAGS "$WM_CFLAGS -mabi=64" + setenv WM_CXXFLAGS "$WM_CXXFLAGS -mabi=64" + setenv WM_LDFLAGS "-mabi=64 -G0" breaksw default: @@ -137,8 +134,8 @@ endsw #------------------------------------------------------------------------------ -# Optional jobControl directory: unset is equivalent to ~/.OpenFOAM/jobControl -# setenv FOAM_JOB_DIR "$HOME/.OpenFOAM/jobControl" +# [FOAM_JOB_DIR] - unset is equivalent to ~/.OpenFOAM/jobControl +## setenv FOAM_JOB_DIR "$HOME/.OpenFOAM/jobControl" # wmake configuration setenv WM_DIR $WM_PROJECT_DIR/wmake @@ -213,18 +210,15 @@ if (! $?WM_COMPILER_TYPE ) setenv WM_COMPILER_TYPE system # Adjustments for non-gcc compilers switch ("$WM_COMPILER") -case Clang*: - # Using clang compiler suite +case Clang*: # Clang compiler suite setenv WM_CC 'clang' setenv WM_CXX 'clang++' breaksw -case Cray*: - # Using cray system compilers +case Cray*: # Cray system compilers setenv WM_CC 'cc' setenv WM_CXX 'CC' breaksw -case Icc*: - # Using intel compilers +case Icc*: # Intel compilers setenv WM_CC 'icc' setenv WM_CXX 'icpc' breaksw @@ -238,15 +232,18 @@ unsetenv GMP_ARCH_PATH MPFR_ARCH_PATH # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamEtc config.csh/compiler +# ThirdParty base for compilers +set archDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH + switch ("$WM_COMPILER_TYPE-$WM_COMPILER") case ThirdParty-Gcc*: if (! $?gmp_version ) set gmp_version=gmp-system if (! $?mpfr_version ) set mpfr_version=mpfr-system if (! $?mpc_version ) set mpc_version=mpc-system - set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version - set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version - set mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version - set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version + set gccDir=$archDir/$gcc_version + set gmpDir=$archDir/$gmp_version + set mpfrDir=$archDir/$mpfr_version + set mpcDir=$archDir/$mpc_version # Check that the compiler directory can be found if ( ! -d "$gccDir" ) then @@ -288,7 +285,7 @@ GCC_NOT_FOUND breaksw case ThirdParty-Clang*: - set clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version + set clangDir=$archDir/$clang_version # Check that the compiler directory can be found if ( ! -d "$clangDir" ) then @@ -332,10 +329,10 @@ endsw # Cleanup # ~~~~~~~ +unset archDir unset gcc_version gccDir unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir unset clang_version clangDir # Retain: _foamAddPath _foamAddLib _foamAddMan - #------------------------------------------------------------------------------ diff --git a/etc/config.csh/tcsh_completion b/etc/config.csh/tcsh_completion index 9dfcca7046..f183e83387 100644 --- a/etc/config.csh/tcsh_completion +++ b/etc/config.csh/tcsh_completion @@ -5,8 +5,9 @@ # \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ -# This file is part of OpenFOAM, licensed under the GNU General Public License -# . +# License +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/tcsh_completion diff --git a/etc/config.csh/unset b/etc/config.csh/unset index 20f7c9eb6d..daed3469e2 100644 --- a/etc/config.csh/unset +++ b/etc/config.csh/unset @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/unset @@ -182,7 +170,6 @@ unalias wmSchedOn unalias wmSchedOff unalias foam -unalias foamSite unalias src unalias lib diff --git a/etc/config.csh/vtk b/etc/config.csh/vtk index 1abca1e975..00927aae54 100644 --- a/etc/config.csh/vtk +++ b/etc/config.csh/vtk @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.csh/vtk diff --git a/etc/config.sh/CGAL b/etc/config.sh/CGAL index e3acd42cbe..08d0c7ee75 100644 --- a/etc/config.sh/CGAL +++ b/etc/config.sh/CGAL @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/CGAL diff --git a/etc/config.sh/FFTW b/etc/config.sh/FFTW index c8b707d6a5..2d9b59c254 100644 --- a/etc/config.sh/FFTW +++ b/etc/config.sh/FFTW @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/FFTW diff --git a/etc/config.sh/aliases b/etc/config.sh/aliases index 0543a09a70..9f189d5cf1 100644 --- a/etc/config.sh/aliases +++ b/etc/config.sh/aliases @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/aliases @@ -51,13 +39,6 @@ alias wmSchedOff='unset WM_SCHEDULER' # ~~~~~~~~~~~~~~~~~~~~~~~~ alias foam='cd $WM_PROJECT_DIR' -if [ -n "$WM_PROJECT_SITE" ] -then - alias foamSite='cd $WM_PROJECT_SITE' -else - alias foamSite='cd $WM_PROJECT_INST_DIR/site' -fi - alias src='cd $FOAM_SRC' alias lib='cd $FOAM_LIBBIN' alias app='cd $FOAM_APP' diff --git a/etc/config.sh/bash_completion b/etc/config.sh/bash_completion index 2355f34087..53cf60aa29 100644 --- a/etc/config.sh/bash_completion +++ b/etc/config.sh/bash_completion @@ -5,8 +5,9 @@ # \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ -# This file is part of OpenFOAM, licensed under the GNU General Public License -# . +# License +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/bash_completion diff --git a/etc/config.sh/ccmio b/etc/config.sh/ccmio index 782dcb7702..88c0dd68d0 100644 --- a/etc/config.sh/ccmio +++ b/etc/config.sh/ccmio @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/ccmio diff --git a/etc/config.sh/compiler b/etc/config.sh/compiler index 3a1aefd63f..4f00fa46f4 100644 --- a/etc/config.sh/compiler +++ b/etc/config.sh/compiler @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/compiler @@ -32,7 +20,7 @@ case "$WM_COMPILER_TYPE" in ThirdParty) - # Default versions of GMP, MPFR and MPC, override as necessary + # Default versions of GMP, MPFR, MPC - override as necessary gmp_version=gmp-system mpfr_version=mpfr-system mpc_version=mpc-system @@ -56,6 +44,9 @@ ThirdParty) Gcc54) gcc_version=gcc-5.4.0 ;; + Gcc55) + gcc_version=gcc-5.5.0 + ;; Gcc61) gcc_version=gcc-6.1.0 ;; diff --git a/etc/config.sh/ensight b/etc/config.sh/ensight index ec7566a80a..9b0ab54236 100644 --- a/etc/config.sh/ensight +++ b/etc/config.sh/ensight @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/ensight diff --git a/etc/config.sh/example/compiler b/etc/config.sh/example/compiler index e8a86a042b..8b3f412db0 100644 --- a/etc/config.sh/example/compiler +++ b/etc/config.sh/example/compiler @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.sh/example/compiler @@ -30,7 +18,7 @@ # #------------------------------------------------------------------------------ -# Load the standard versions... +# Load the standard versions eval $($WM_PROJECT_DIR/bin/foamEtcFile -sh -mode=o config.sh/compiler) # Modify/override compiler settings diff --git a/etc/config.sh/example/openmpi b/etc/config.sh/example/openmpi index 7fa099f841..4a6b2ddfd5 100644 --- a/etc/config.sh/example/openmpi +++ b/etc/config.sh/example/openmpi @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.sh/example/openmpi @@ -31,6 +19,6 @@ #------------------------------------------------------------------------------ # Modified openmpi settings -export FOAM_MPI=openmpi-1.4.3 +export FOAM_MPI=openmpi-3.0.0 #------------------------------------------------------------------------------ diff --git a/etc/config.sh/example/paraview b/etc/config.sh/example/paraview index 0008243588..9f045e684c 100644 --- a/etc/config.sh/example/paraview +++ b/etc/config.sh/example/paraview @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.sh/example/paraview @@ -34,13 +22,10 @@ # #------------------------------------------------------------------------------ -# -# Use the shipped paraview config file (-mode=o) -# with a different ParaView_VERSION -# +# Use shipped paraview config file (-mode=o) with a different ParaView_VERSION foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode=o config.sh/paraview 2>/dev/null) -[ $? -eq 0 ] && . $foamFile ParaView_VERSION=5.0.1 +[ $? -eq 0 ] && . $foamFile ParaView_VERSION=5.4.0 unset foamFile diff --git a/etc/config.sh/example/prefs.sh b/etc/config.sh/example/prefs.sh index 883db4bda5..fc7abeebf5 100644 --- a/etc/config.sh/example/prefs.sh +++ b/etc/config.sh/example/prefs.sh @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # config.sh/example/prefs.sh @@ -36,17 +24,13 @@ # #------------------------------------------------------------------------------ -## Specify OpenFOAM ThirdParty compiler -## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#WM_COMPILER_TYPE=ThirdParty +#- Compiler location: +WM_COMPILER_TYPE=ThirdParty -## Specify compiler type -## ~~~~~~~~~~~~~~~~~~~~~ -#export WM_COMPILER=Clang - -## Specify system openmpi -## ~~~~~~~~~~~~~~~~~~~~~~ -#export WM_MPLIB=SYSTEMOPENMPI +#- Compiler: +export WM_COMPILER=Clang +#- MPI implementation: +export WM_MPLIB=SYSTEMOPENMPI #------------------------------------------------------------------------------ diff --git a/etc/config.sh/functions b/etc/config.sh/functions index df3096d998..5ebf2222da 100644 --- a/etc/config.sh/functions +++ b/etc/config.sh/functions @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/functions diff --git a/etc/config.sh/gperftools b/etc/config.sh/gperftools index 4e13f927bb..0bb46c32ea 100644 --- a/etc/config.sh/gperftools +++ b/etc/config.sh/gperftools @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/gperftools diff --git a/etc/config.sh/kahip b/etc/config.sh/kahip index 42557831c3..e6b51c0291 100644 --- a/etc/config.sh/kahip +++ b/etc/config.sh/kahip @@ -5,8 +5,9 @@ # \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ -# This file is part of OpenFOAM, licensed under the GNU General Public License -# . +# License +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/kahip diff --git a/etc/config.sh/metis b/etc/config.sh/metis index 2776a283c2..59cfe40827 100644 --- a/etc/config.sh/metis +++ b/etc/config.sh/metis @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/metis diff --git a/etc/config.sh/mgridgen b/etc/config.sh/mgridgen index ffc7239d28..8fc237e3d9 100644 --- a/etc/config.sh/mgridgen +++ b/etc/config.sh/mgridgen @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/mgridgen diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi index 1a87bf238f..2ee7b51898 100644 --- a/etc/config.sh/mpi +++ b/etc/config.sh/mpi @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/mpi diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview index b2a1cc161a..47e61b95f4 100644 --- a/etc/config.sh/paraview +++ b/etc/config.sh/paraview @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/paraview diff --git a/etc/config.sh/scotch b/etc/config.sh/scotch index 7c8cb13587..c8402ffdff 100644 --- a/etc/config.sh/scotch +++ b/etc/config.sh/scotch @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/scotch diff --git a/etc/config.sh/settings b/etc/config.sh/settings index 20821fae2e..6d0285c876 100644 --- a/etc/config.sh/settings +++ b/etc/config.sh/settings @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/settings @@ -29,23 +17,24 @@ # Sourced from OpenFOAM-/etc/bashrc # #------------------------------------------------------------------------------ -# Set environment variables according to system type -: ${WM_OSTYPE:=POSIX}; export WM_OSTYPE # Default is POSIX +export WM_ARCH=$(uname -s) # System name +: ${WM_OSTYPE:=POSIX}; export WM_OSTYPE # System type (POSIX is default) -export WM_ARCH=$(uname -s) +# Default compiler = gcc/g++ and C++11 +export WM_CC="gcc" +export WM_CXX="g++" +export WM_CFLAGS="-fPIC" +export WM_CXXFLAGS="-fPIC -std=c++11" +unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH WM_LDFLAGS + +# Adjust according to system and architecture case "$WM_ARCH" in Linux) WM_ARCH=linux - # Compiler specifics case $(uname -m) in i686) export WM_ARCH_OPTION=32 - export WM_CC='gcc' - export WM_CXX='g++' - export WM_CFLAGS='-fPIC' - export WM_CXXFLAGS='-fPIC -std=c++11' - export WM_LDFLAGS= ;; x86_64) @@ -53,20 +42,16 @@ Linux) case "$WM_ARCH_OPTION" in 32) export WM_COMPILER_ARCH=64 - export WM_CC='gcc' - export WM_CXX='g++' - export WM_CFLAGS='-m32 -fPIC' - export WM_CXXFLAGS='-m32 -fPIC -std=c++11' - export WM_LDFLAGS='-m32' + export WM_CFLAGS="$WM_CFLAGS -m32" + export WM_CXXFLAGS="$WM_CXXFLAGS -m32" + export WM_LDFLAGS="-m32" ;; 64) WM_ARCH=linux64 export WM_COMPILER_LIB_ARCH=64 - export WM_CC='gcc' - export WM_CXX='g++' - export WM_CFLAGS='-m64 -fPIC' - export WM_CXXFLAGS='-m64 -fPIC -std=c++11' - export WM_LDFLAGS='-m64' + export WM_CFLAGS="$WM_CFLAGS -m64" + export WM_CXXFLAGS="$WM_CXXFLAGS -m64" + export WM_LDFLAGS="-m64" ;; *) echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32|64" 1>&2 @@ -76,38 +61,34 @@ Linux) ia64) WM_ARCH=linuxIA64 - export WM_COMPILER=I64 ;; armv7l) WM_ARCH=linuxARM7 export WM_ARCH_OPTION=32 export WM_COMPILER_LIB_ARCH=32 - export WM_CC='gcc' - export WM_CXX='g++' - export WM_CFLAGS='-fPIC' - export WM_CXXFLAGS='-fPIC -std=c++11' - export WM_LDFLAGS= + ;; + + aarch64) + WM_ARCH=linuxARM64 + export WM_ARCH_OPTION=64 + export WM_COMPILER_LIB_ARCH=64 ;; ppc64) WM_ARCH=linuxPPC64 export WM_COMPILER_LIB_ARCH=64 - export WM_CC='gcc' - export WM_CXX='g++' - export WM_CFLAGS='-m64 -fPIC' - export WM_CXXFLAGS='-m64 -fPIC -std=c++11' - export WM_LDFLAGS='-m64' + export WM_CFLAGS="$WM_CFLAGS -m64" + export WM_CXXFLAGS="$WM_CXXFLAGS -m64" + export WM_LDFLAGS="-m64" ;; ppc64le) WM_ARCH=linuxPPC64le export WM_COMPILER_LIB_ARCH=64 - export WM_CC='gcc' - export WM_CXX='g++' - export WM_CFLAGS='-m64 -fPIC' - export WM_CXXFLAGS='-m64 -fPIC -std=c++11' - export WM_LDFLAGS='-m64' + export WM_CFLAGS="$WM_CFLAGS -m64" + export WM_CXXFLAGS="$WM_CXXFLAGS -m64" + export WM_LDFLAGS="-m64" ;; *) @@ -120,11 +101,9 @@ SunOS) WM_ARCH=SunOS64 WM_MPLIB=FJMPI export WM_COMPILER_LIB_ARCH=64 - export WM_CC='gcc' - export WM_CXX='g++' - export WM_CFLAGS='-mabi=64 -fPIC' - export WM_CXXFLAGS='-mabi=64 -fPIC -std=c++11' - export WM_LDFLAGS='-mabi=64 -G0' + export WM_CFLAGS="$WM_CFLAGS -mabi=64" + export WM_CXXFLAGS="$WM_CXXFLAGS -mabi=64" + export WM_LDFLAGS="-mabi=64 -G0" ;; *) # An unsupported operating system @@ -137,11 +116,10 @@ UNSUPPORTED_OS ;; esac - #------------------------------------------------------------------------------ -# Optional jobControl directory: unset is equivalent to ~/.OpenFOAM/jobControl -# export FOAM_JOB_DIR="$HOME/.OpenFOAM/jobControl" +# [FOAM_JOB_DIR] - unset is equivalent to ~/.OpenFOAM/jobControl +## export FOAM_JOB_DIR="$HOME/.OpenFOAM/jobControl" # wmake configuration export WM_DIR=$WM_PROJECT_DIR/wmake @@ -157,7 +135,12 @@ export FOAM_LIBBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib # Site-specific directory -siteDir="${WM_PROJECT_SITE:-$WM_PROJECT_INST_DIR/site}" +if [ -n "$WM_PROJECT_SITE" ] +then + siteDir=$WM_PROJECT_SITE +else + siteDir=$WM_PROJECT_INST_DIR/site +fi # Shared site executables/libraries # Similar naming convention as ~OpenFOAM expansion @@ -215,18 +198,15 @@ _foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN # Adjust for non-gcc compilers case "$WM_COMPILER" in -Clang*) - # Using clang compiler suite +Clang*) # Clang compiler suite export WM_CC='clang' export WM_CXX='clang++' ;; -Cray*) - # Using cray system compilers +Cray*) # Cray system compilers export WM_CC='cc' export WM_CXX='CC' ;; -Icc*) - # Using intel compilers +Icc*) # Intel compilers export WM_CC='icc' export WM_CXX='icpc' ;; @@ -240,12 +220,15 @@ unset GMP_ARCH_PATH MPFR_ARCH_PATH # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _foamEtc config.sh/compiler +# ThirdParty base for compilers +archDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH + case "$WM_COMPILER_TYPE-$WM_COMPILER" in ThirdParty-Gcc*) - gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version - gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/${gmp_version:-gmp-system} - mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/${mpfr_version:-mpfr-system} - mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/${mpc_version:-mpc-system} + gccDir=$archDir/$gcc_version + gmpDir=$archDir/${gmp_version:-gmp-system} + mpfrDir=$archDir/${mpfr_version:-mpfr-system} + mpcDir=$archDir/${mpc_version:-mpc-system} # Check that the compiler directory can be found [ -d "$gccDir" ] || /bin/cat << GCC_NOT_FOUND 1>&2 @@ -289,7 +272,7 @@ GCC_NOT_FOUND ;; ThirdParty-Clang*) - clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version + clangDir=$archDir/$clang_version # Check that the compiler directory can be found [ -d "$clangDir" ] || /bin/cat << CLANG_NOT_FOUND 1>&2 @@ -329,9 +312,9 @@ UNKNOWN_TYPE esac - # Cleanup # ~~~~~~~ +unset archDir unset gcc_version gccDir unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir unset clang_version clangDir diff --git a/etc/config.sh/unset b/etc/config.sh/unset index 31710db372..04b16eb5f6 100644 --- a/etc/config.sh/unset +++ b/etc/config.sh/unset @@ -6,20 +6,8 @@ # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/unset @@ -168,7 +156,6 @@ unalias wmSchedOn 2>/dev/null unalias wmSchedOff 2>/dev/null unalias foam 2>/dev/null -unalias foamSite 2>/dev/null unalias src 2>/dev/null unalias lib 2>/dev/null diff --git a/etc/config.sh/vtk b/etc/config.sh/vtk index 8d881b64c5..0142c42eb5 100644 --- a/etc/config.sh/vtk +++ b/etc/config.sh/vtk @@ -6,20 +6,8 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/config.sh/vtk diff --git a/etc/cshrc b/etc/cshrc index 759599098b..fc5a17a182 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -6,42 +6,40 @@ # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM. -# -# OpenFOAM is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenFOAM. If not, see . +# This file is part of OpenFOAM, licensed under GNU General Public License +# . # # File # etc/cshrc # # Description -# Set the environment for OpenFOAM when using a cshell. -# To be sourced manually or from the ~/.login or ~/.cshrc files. +# Set OpenFOAM environment for C-shell (csh, tcsh). +# Source manually or from the ~/.login or ~/.cshrc files. +# +# Note +# Many environment variables can be overridden using a 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 +# +# Any changes made to this cshrc file may be lost with the next upgrade. # #------------------------------------------------------------------------------ setenv WM_PROJECT OpenFOAM setenv WM_PROJECT_VERSION plus -################################################################################ -# USER EDITABLE PART: Changes made here may be lost with the next upgrade -# -# FOAM_INST_DIR = the parent directory containing the OpenFOAM installation(s). -# - If the OpenFOAM installation has this OpenFOAM-/etc/cshrc, the -# next lines should work when sourced by a CSH or TCSH shell. -# - If this does not produce the desired result, please set one of the fallback -# values to an appropriate path. -# +# [FOAM_INST_DIR] - parent directory containing the OpenFOAM installation. +# * When this file is located as $WM_PROJECT_DIR/etc/cshrc, the next lines +# should work when sourced by CSH or TCSH shells. If this however fails, +# set one of the fallback values to an appropriate path. +# -- setenv FOAM_INST_DIR `lsof +p $$ |& \ sed -n -e 's@[^/]*@@' -e 's@/'$WM_PROJECT'[^/]*/etc/cshrc.*@@p'` # setenv FOAM_INST_DIR $HOME/$WM_PROJECT @@ -51,56 +49,55 @@ setenv FOAM_INST_DIR `lsof +p $$ |& \ # END OF (NORMAL) USER EDITABLE PART ################################################################################ -# The default environment variables below can be overridden in a prefs.csh file -# located in ~/.OpenFOAM/$WM_PROJECT_VERSION, ~/.OpenFOAM, -# $FOAM_INST_DIR/site/$WM_PROJECT_VERSION or $FOAM_INST_DIR/site +# Default environment variables. +# Can override with a file instead of editing below. -#- Compiler location: -# WM_COMPILER_TYPE = system | ThirdParty +# [WM_COMPILER_TYPE] - Compiler location: +# = system | ThirdParty setenv WM_COMPILER_TYPE system -#- Compiler: -# WM_COMPILER = Gcc | Gcc4[8-9] | Gcc5[1-4] | Gcc6[1-3] | GccKNL -# | Clang | Clang3[8-9] | Clang[45]0 | Icc | IccKNL | Cray +# [WM_COMPILER] - Compiler: +# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-3] | Gcc7[1-2] | GccKNL | +# Clang | Clang3[8-9] | Clang[45]0 | Icc | IccKNL | Cray setenv WM_COMPILER Gcc -setenv WM_COMPILER_ARCH # defined but empty -unsetenv WM_COMPILER_LIB_ARCH -#- Memory addressing: -# WM_ARCH_OPTION = 32 | 64 -# - on a 64-bit OS this can be 32 or 64 -# - on a 32-bit OS addressing is 32-bit and this option is not used +# [WM_ARCH_OPTION] - Memory addressing: +# = 32 | 64 +# * on a 64-bit OS this can be 32 or 64 +# * on a 32-bit OS, it is always 32-bit and this option is ignored setenv WM_ARCH_OPTION 64 -#- Precision: -# WM_PRECISION_OPTION = DP | SP +# [WM_PRECISION_OPTION] - Floating-point precision: +# = DP | SP setenv WM_PRECISION_OPTION DP -#- Label size: -# WM_LABEL_SIZE = 32 | 64 +# [WM_LABEL_SIZE] - Label size in bits: +# = 32 | 64 setenv WM_LABEL_SIZE 32 -#- Optimised, debug, profiling: -# WM_COMPILE_OPTION = Opt | Debug | Prof +# [WM_COMPILE_OPTION] - Optimised, debug, profiling: +# = Opt | Debug | Prof setenv WM_COMPILE_OPTION Opt -#- MPI implementation: -# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPICH | MPICH-GM | HPMPI -# | MPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI +# [WM_MPLIB] - MPI implementation: +# = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPI | MPICH | MPICH-GM | +# HPMPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI setenv WM_MPLIB SYSTEMOPENMPI -#- Operating System: -# WM_OSTYPE = POSIX -#setenv WM_OSTYPE POSIX -#- Alternative to 'trapFpe' controlDict entry -# for floating-point exceptions (true|false) +# [FOAM_SIGFPE] - Trapping of floating-point exceptions. +# - overrides the 'trapFpe' controlDict entry +# = true | false #setenv FOAM_SIGFPE true -#- Alternative to 'setNaN' controlDict entry -# for memory initialisation (true|false) +# [FOAM_SETNAN] - Memory initialisation as NaN +# - overrides the 'setNaN' controlDict entry +# = true | false #setenv FOAM_SETNAN false +# [WM_OSTYPE] - Operating System Type: +# = POSIX +#setenv WM_OSTYPE POSIX ################################################################################ @@ -194,21 +191,21 @@ end # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ set foamClean=$WM_PROJECT_DIR/bin/foamCleanPath -#- prevent local variables from shadowing setenv variables +# Prevent local variables from shadowing setenv variables unset PATH MANPATH LD_LIBRARY_PATH LD_PRELOAD if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH if (! $?MANPATH ) setenv MANPATH -#- Clean PATH (path) +# Clean PATH (path) set cleaned=`$foamClean "$PATH" "$foamOldDirs"` if ( $status == 0 ) setenv PATH $cleaned -#- Clean LD_LIBRARY_PATH +# Clean LD_LIBRARY_PATH set cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned -#- Clean MANPATH +# Clean MANPATH set cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` if ( $status == 0 ) setenv MANPATH $cleaned @@ -237,19 +234,19 @@ _foamEtc config.csh/FFTW # Clean environment paths again. Only remove duplicates # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#- Clean PATH (path) +# Clean PATH (path) set cleaned=`$foamClean "$PATH"` if ( $status == 0 ) setenv PATH $cleaned -#- Clean LD_LIBRARY_PATH +# Clean LD_LIBRARY_PATH set cleaned=`$foamClean "$LD_LIBRARY_PATH"` if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned -#- Clean MANPATH (trailing ':' to find system pages) +# Clean MANPATH (trailing ':' to find system pages) set cleaned=`$foamClean "$MANPATH"` if ( $status == 0 ) setenv MANPATH "${cleaned}:" -#- Clean LD_PRELOAD +# Clean LD_PRELOAD if ( $?LD_PRELOAD ) then set cleaned=`$foamClean "$LD_PRELOAD"` if ( $status == 0 ) setenv LD_PRELOAD $cleaned