diff --git a/.gitignore b/.gitignore index 1b8ce3cde3..e2c6f9b41f 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,8 @@ doc/[Dd]oxygen/man # untracked configuration files /etc/prefs.csh /etc/prefs.sh +/etc/config/*.csh +/etc/config/*.sh # source packages - anywhere *.tar.bz2 diff --git a/etc/config/compiler.csh-EXAMPLE b/etc/config/compiler.csh-EXAMPLE new file mode 100644 index 0000000000..6d54edbd47 --- /dev/null +++ b/etc/config/compiler.csh-EXAMPLE @@ -0,0 +1,51 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. +# \\/ 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 . +# +# File +# config/compiler.csh +# +# Description +# Fine tuning of ThirdParty compiler settings for OpenFOAM +# Sourced from OpenFOAM-/etc/settings.csh +# +#------------------------------------------------------------------------------ + +# Modified compiler settings +switch ("$WM_COMPILER") +case Gcc46: +case Gcc46++0x: + set gcc_version=gcc-4.6.0 + set gmp_version=gmp-5.0.1 + set mpfr_version=mpfr-2.4.2 + set mpc_version=mpc-0.8.1 + breaksw +case Gcc45: +case Gcc45++0x: + set gcc_version=gcc-4.5.2 + set gmp_version=gmp-5.0.1 + set mpfr_version=mpfr-2.4.2 + set mpc_version=mpc-0.8.1 + breaksw +endsw + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/config/compiler.sh-EXAMPLE b/etc/config/compiler.sh-EXAMPLE new file mode 100644 index 0000000000..bc6aada36e --- /dev/null +++ b/etc/config/compiler.sh-EXAMPLE @@ -0,0 +1,49 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. +# \\/ 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 . +# +# File +# config/compiler.sh +# +# Description +# Fine tuning of ThirdParty compiler settings for OpenFOAM +# Sourced from OpenFOAM-/etc/settings.sh +# +#------------------------------------------------------------------------------ + +# Modified compiler settings +case "$WM_COMPILER" in +Gcc46 | Gcc46++0x) + gcc_version=gcc-4.6.0 + gmp_version=gmp-5.0.1 + mpfr_version=mpfr-2.4.2 + mpc_version=mpc-0.8.1 + ;; +Gcc45 | Gcc45++0x) + gcc_version=gcc-4.5.2 + gmp_version=gmp-5.0.1 + mpfr_version=mpfr-2.4.2 + mpc_version=mpc-0.8.1 + ;; +esac + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/config/openmpi.csh-EXAMPLE b/etc/config/openmpi.csh-EXAMPLE new file mode 100644 index 0000000000..94be702e9d --- /dev/null +++ b/etc/config/openmpi.csh-EXAMPLE @@ -0,0 +1,36 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. +# \\/ 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 . +# +# File +# config/openmpi.csh +# +# Description +# Fine tuning of openmpi settings for OpenFOAM +# Sourced from OpenFOAM-/etc/settings.csh +# +#------------------------------------------------------------------------------ + +# Modified openmpi settings +setenv FOAM_MPI openmpi-1.4.3 + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/config/openmpi.sh-EXAMPLE b/etc/config/openmpi.sh-EXAMPLE new file mode 100644 index 0000000000..b7c5035b04 --- /dev/null +++ b/etc/config/openmpi.sh-EXAMPLE @@ -0,0 +1,36 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. +# \\/ 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 . +# +# File +# config/openmpi.sh +# +# Description +# Fine tuning of openmpi settings for OpenFOAM +# Sourced from OpenFOAM-/etc/settings.sh +# +#------------------------------------------------------------------------------ + +# Modified openmpi settings +export FOAM_MPI=openmpi-1.4.3 + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/settings.csh b/etc/settings.csh index 0e15cef31e..b63999dccb 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -248,6 +248,9 @@ case ThirdParty: breaksw endsw + # optional configuration tweaks: + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.csh` + if ( $?gcc_version ) then 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 @@ -367,8 +370,10 @@ unsetenv MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN switch ("$WM_MPLIB") case OPENMPI: - #setenv FOAM_MPI openmpi-1.4.3 setenv FOAM_MPI openmpi-1.5.3 + # optional configuration tweaks: + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.csh` + setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI # Tell OpenMPI where to find its install directory diff --git a/etc/settings.sh b/etc/settings.sh index f3ccaebb18..ec9b33041e 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -265,6 +265,9 @@ OpenFOAM | ThirdParty) ;; esac + # optional configuration tweaks: + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.sh` + if [ -n "$gcc_version" ] then gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version @@ -387,8 +390,10 @@ unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN case "$WM_MPLIB" in OPENMPI) - #export FOAM_MPI=openmpi-1.4.3 export FOAM_MPI=openmpi-1.5.3 + # optional configuration tweaks: + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.sh` + export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI # Tell OpenMPI where to find its install directory