ENH: allow for user adjustment of compiler/openmpi versions

This commit is contained in:
Mark Olesen
2011-04-27 14:31:37 +02:00
parent a66a9bbc8e
commit 0fc6700a14
7 changed files with 186 additions and 2 deletions

2
.gitignore vendored
View File

@ -60,6 +60,8 @@ doc/[Dd]oxygen/man
# untracked configuration files # untracked configuration files
/etc/prefs.csh /etc/prefs.csh
/etc/prefs.sh /etc/prefs.sh
/etc/config/*.csh
/etc/config/*.sh
# source packages - anywhere # source packages - anywhere
*.tar.bz2 *.tar.bz2

View File

@ -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 <http://www.gnu.org/licenses/>.
#
# File
# config/compiler.csh
#
# Description
# Fine tuning of ThirdParty compiler settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/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

View File

@ -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 <http://www.gnu.org/licenses/>.
#
# File
# config/compiler.sh
#
# Description
# Fine tuning of ThirdParty compiler settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/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

View File

@ -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 <http://www.gnu.org/licenses/>.
#
# File
# config/openmpi.csh
#
# Description
# Fine tuning of openmpi settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/settings.csh
#
#------------------------------------------------------------------------------
# Modified openmpi settings
setenv FOAM_MPI openmpi-1.4.3
# ----------------------------------------------------------------- end-of-file

View File

@ -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 <http://www.gnu.org/licenses/>.
#
# File
# config/openmpi.sh
#
# Description
# Fine tuning of openmpi settings for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/settings.sh
#
#------------------------------------------------------------------------------
# Modified openmpi settings
export FOAM_MPI=openmpi-1.4.3
# ----------------------------------------------------------------- end-of-file

View File

@ -248,6 +248,9 @@ case ThirdParty:
breaksw breaksw
endsw endsw
# optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.csh`
if ( $?gcc_version ) then if ( $?gcc_version ) then
set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_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") switch ("$WM_MPLIB")
case OPENMPI: case OPENMPI:
#setenv FOAM_MPI openmpi-1.4.3
setenv FOAM_MPI openmpi-1.5.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 setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
# Tell OpenMPI where to find its install directory # Tell OpenMPI where to find its install directory

View File

@ -265,6 +265,9 @@ OpenFOAM | ThirdParty)
;; ;;
esac esac
# optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.sh`
if [ -n "$gcc_version" ] if [ -n "$gcc_version" ]
then then
gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version 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 case "$WM_MPLIB" in
OPENMPI) OPENMPI)
#export FOAM_MPI=openmpi-1.4.3
export FOAM_MPI=openmpi-1.5.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 export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
# Tell OpenMPI where to find its install directory # Tell OpenMPI where to find its install directory