2014-02-17 15:05:12 +00:00
|
|
|
#!/bin/bash
|
2010-05-12 13:27:55 +00:00
|
|
|
#----------------------------------*-sh-*--------------------------------------
|
|
|
|
# ========= |
|
2013-12-11 16:09:41 +00:00
|
|
|
# \\ / F ield | foam-extend: Open Source CFD
|
2015-05-17 13:32:07 +00:00
|
|
|
# \\ / O peration | Version: 3.2
|
|
|
|
# \\ / A nd | Web: http://www.foam-extend.org
|
|
|
|
# \\/ M anipulation | For copyright notice see file Copyright
|
2010-05-12 13:27:55 +00:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# License
|
2013-12-11 16:09:41 +00:00
|
|
|
# This file is part of foam-extend.
|
2010-05-12 13:27:55 +00:00
|
|
|
#
|
2013-12-11 16:09:41 +00:00
|
|
|
# foam-extend is free software: you can redistribute it and/or modify it
|
2010-05-12 13:27:55 +00:00
|
|
|
# under the terms of the GNU General Public License as published by the
|
2013-12-11 16:09:41 +00:00
|
|
|
# Free Software Foundation, either version 3 of the License, or (at your
|
2010-05-12 13:27:55 +00:00
|
|
|
# option) any later version.
|
|
|
|
#
|
2013-12-11 16:09:41 +00:00
|
|
|
# foam-extend 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.
|
2010-05-12 13:27:55 +00:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2013-12-11 16:09:41 +00:00
|
|
|
# along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
2010-05-12 13:27:55 +00:00
|
|
|
#
|
|
|
|
# Script
|
|
|
|
# etc/settings.sh
|
|
|
|
#
|
|
|
|
# Description
|
2015-04-23 12:51:07 +00:00
|
|
|
# Startup file for FOAM
|
|
|
|
# Sourced from FOAM-??/etc/bashrc
|
2010-05-12 13:27:55 +00:00
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# prefix to PATH
|
|
|
|
_foamAddPath()
|
|
|
|
{
|
2010-05-17 13:51:21 +00:00
|
|
|
while [ $# -ge 1 ]
|
|
|
|
do
|
|
|
|
export PATH=$1:$PATH
|
|
|
|
shift
|
|
|
|
done
|
2010-05-12 13:27:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# prefix to LD_LIBRARY_PATH
|
|
|
|
_foamAddLib()
|
|
|
|
{
|
2010-05-17 13:51:21 +00:00
|
|
|
while [ $# -ge 1 ]
|
|
|
|
do
|
|
|
|
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
|
2011-10-03 08:28:22 +00:00
|
|
|
if [ "$WM_ARCH_BASE" = "darwin" ]
|
|
|
|
then
|
2013-07-11 17:20:30 +00:00
|
|
|
# do NOT add the lib of MacPort as this might break programs
|
|
|
|
if [ "$1" != "/opt/local/lib" ]
|
|
|
|
then
|
2013-07-18 01:43:15 +00:00
|
|
|
export DYLD_LIBRARY_PATH=$1:$DYLD_LIBRARY_PATH
|
|
|
|
fi
|
2011-10-03 08:28:22 +00:00
|
|
|
fi
|
2010-05-17 13:51:21 +00:00
|
|
|
shift
|
|
|
|
done
|
2010-05-12 13:27:55 +00:00
|
|
|
}
|
|
|
|
|
2010-12-01 13:07:16 +00:00
|
|
|
# Source files, possibly with some verbosity
|
|
|
|
# Yes, this is the same definition as in the file etc/bash
|
|
|
|
# We need that definition available for scripts sourcing
|
|
|
|
# settings.sh directly.
|
|
|
|
_foamSource()
|
|
|
|
{
|
|
|
|
while [ $# -ge 1 ]
|
|
|
|
do
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1"
|
|
|
|
. $1
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
}
|
2010-05-12 13:27:55 +00:00
|
|
|
|
|
|
|
# location of the jobControl directory
|
2011-10-03 08:28:22 +00:00
|
|
|
export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl
|
2010-05-12 13:27:55 +00:00
|
|
|
|
|
|
|
# wmake configuration
|
|
|
|
export WM_DIR=$WM_PROJECT_DIR/wmake
|
|
|
|
export WM_LINK_LANGUAGE=c++
|
|
|
|
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
|
|
|
export PATH=$WM_DIR:$PATH
|
|
|
|
|
|
|
|
# base configuration
|
|
|
|
export FOAM_APP=$WM_PROJECT_DIR/applications
|
2011-10-13 06:16:39 +00:00
|
|
|
export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
|
2010-05-17 13:51:21 +00:00
|
|
|
export FOAM_LIB=$WM_PROJECT_DIR/lib
|
2011-10-13 06:16:39 +00:00
|
|
|
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
2010-05-17 13:51:21 +00:00
|
|
|
export FOAM_SRC=$WM_PROJECT_DIR/src
|
|
|
|
|
2015-04-23 12:51:07 +00:00
|
|
|
# shared site configuration - similar naming convention as ~FOAM expansion
|
2015-09-03 16:53:54 +00:00
|
|
|
export FOAM_SITE_DIR=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION
|
|
|
|
export FOAM_SITE_APPBIN=$FOAM_SITE_DIR/bin/$WM_OPTIONS
|
|
|
|
export FOAM_SITE_LIBBIN=$FOAM_SITE_DIR/lib/$WM_OPTIONS
|
2010-05-12 13:27:55 +00:00
|
|
|
|
|
|
|
# user configuration
|
2011-10-13 06:16:39 +00:00
|
|
|
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
|
|
|
|
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
2010-05-12 13:27:55 +00:00
|
|
|
|
|
|
|
# convenience
|
|
|
|
export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
|
|
|
|
export FOAM_UTILITIES=$FOAM_APP/utilities
|
|
|
|
export FOAM_SOLVERS=$FOAM_APP/solvers
|
|
|
|
export FOAM_RUN=$WM_PROJECT_USER_DIR/run
|
2015-09-15 21:24:30 +00:00
|
|
|
export FOAM_TEST_HARNESS_DIR=$WM_PROJECT_DIR/testHarness/foam-extend/$WM_PROJECT_VERSION
|
2010-05-12 13:27:55 +00:00
|
|
|
|
2015-04-23 12:51:07 +00:00
|
|
|
# add FOAM scripts and wmake to the path
|
2010-05-12 13:27:55 +00:00
|
|
|
export PATH=$WM_DIR:$WM_PROJECT_DIR/bin:$PATH
|
|
|
|
|
2010-05-17 13:51:21 +00:00
|
|
|
_foamAddPath $FOAM_APPBIN $FOAM_SITE_APPBIN $FOAM_USER_APPBIN
|
|
|
|
_foamAddLib $FOAM_LIBBIN $FOAM_SITE_LIBBIN $FOAM_USER_LIBBIN
|
2010-05-12 13:27:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Compiler settings
|
|
|
|
# ~~~~~~~~~~~~~~~~~
|
|
|
|
unset compilerBin compilerLib
|
|
|
|
|
|
|
|
# Select compiler installation
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2015-04-23 12:51:07 +00:00
|
|
|
# compilerInstall = FOAM | System
|
2013-07-03 13:51:19 +00:00
|
|
|
#
|
2011-05-09 02:48:26 +00:00
|
|
|
# We can override the value of compilerInstall from prefs.sh
|
|
|
|
: ${compilerInstall:=System}
|
|
|
|
|
|
|
|
# Or we can force it right here
|
2015-04-23 12:51:07 +00:00
|
|
|
#compilerInstall=FOAM
|
2011-05-09 02:48:26 +00:00
|
|
|
#compilerInstall=System
|
2010-05-12 13:27:55 +00:00
|
|
|
|
2015-04-23 12:51:07 +00:00
|
|
|
case "${compilerInstall}" in
|
|
|
|
FOAM)
|
2010-05-12 13:27:55 +00:00
|
|
|
case "$WM_COMPILER" in
|
|
|
|
Gcc)
|
2015-04-23 12:51:07 +00:00
|
|
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.6.4/platforms/$WM_OPTIONS
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.sh
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.sh
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.sh
|
2015-05-17 00:39:14 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.6.4/platforms/$WM_OPTIONS/etc/gcc-4.6.4.sh
|
2015-04-23 12:51:07 +00:00
|
|
|
;;
|
|
|
|
Gcc49)
|
|
|
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.9.2/platforms/$WM_OPTIONS
|
2015-05-17 00:39:14 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.9.2/platforms/$WM_OPTIONS/etc/gcc-4.9.2.sh
|
|
|
|
;;
|
|
|
|
Gcc48)
|
|
|
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.8.4/platforms/$WM_OPTIONS
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.8.4/platforms/$WM_OPTIONS/etc/gcc-4.8.4.sh
|
2015-04-23 12:51:07 +00:00
|
|
|
;;
|
|
|
|
Gcc47)
|
|
|
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.7.4/platforms/$WM_OPTIONS
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.1.2/platforms/$WM_OPTIONS/etc/gmp-5.1.2.sh
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.1.2/platforms/$WM_OPTIONS/etc/mpfr-3.1.2.sh
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpc-1.0.1/platforms/$WM_OPTIONS/etc/mpc-1.0.1.sh
|
2015-05-17 00:39:14 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.7.4/platforms/$WM_OPTIONS/etc/gcc-4.7.4.sh
|
2010-05-17 13:51:21 +00:00
|
|
|
;;
|
2012-06-11 01:27:30 +00:00
|
|
|
Gcc45)
|
|
|
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.5.1/platforms/$WM_OPTIONS
|
2015-04-23 12:51:07 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.sh
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.sh
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpc-0.8.2/platforms/$WM_OPTIONS/etc/mpc-0.8.2.sh
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.5.1/platforms/$WM_OPTIONS/etc/gcc-4.5.1.sh
|
|
|
|
;;
|
2011-05-09 02:48:26 +00:00
|
|
|
Gcc44)
|
2013-10-10 09:47:38 +00:00
|
|
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS
|
2015-04-23 12:51:07 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gmp-5.0.1/platforms/$WM_OPTIONS/etc/gmp-5.0.1.sh
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mpfr-3.0.1/platforms/$WM_OPTIONS/etc/mpfr-3.0.1.sh
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS/etc/gcc-4.4.5.sh
|
2010-05-12 13:27:55 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Check that the compiler directory can be found
|
|
|
|
if [ ! -d "$WM_COMPILER_DIR" ]
|
|
|
|
then
|
|
|
|
echo
|
|
|
|
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
|
|
|
echo " Cannot find $WM_COMPILER_DIR installation."
|
|
|
|
echo " Please install this compiler version or if you wish to use the system compiler,"
|
|
|
|
echo " change the 'compilerInstall' setting to 'System' in this file"
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
|
|
|
compilerBin=$WM_COMPILER_DIR/bin
|
|
|
|
compilerLib=$WM_COMPILER_DIR/lib$WM_COMPILER_LIB_ARCH:$WM_COMPILER_DIR/lib
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ -d "$compilerBin" ]
|
|
|
|
then
|
|
|
|
_foamAddPath $compilerBin
|
|
|
|
_foamAddLib $compilerLib
|
|
|
|
fi
|
|
|
|
|
|
|
|
unset compilerBin compilerLib compilerInstall
|
|
|
|
|
2010-08-30 17:57:22 +00:00
|
|
|
|
2013-07-11 22:58:42 +00:00
|
|
|
if [ -z "$WM_CC" ]
|
|
|
|
then
|
|
|
|
case "$WM_COMPILER" in
|
2015-05-15 18:07:49 +00:00
|
|
|
Gcc*)
|
|
|
|
export WM_CC='gcc'
|
|
|
|
export WM_CXX='g++'
|
|
|
|
;;
|
|
|
|
Icc)
|
|
|
|
export WM_CC='icc'
|
|
|
|
export WM_CXX='icpc'
|
|
|
|
;;
|
2013-07-11 22:58:42 +00:00
|
|
|
esac
|
|
|
|
fi
|
2010-08-30 17:57:22 +00:00
|
|
|
|
2010-05-12 13:27:55 +00:00
|
|
|
# Communications library
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
unset MPI_ARCH_PATH
|
2010-12-12 22:16:30 +00:00
|
|
|
mpi_version=unknown
|
2010-05-12 13:27:55 +00:00
|
|
|
case "$WM_MPLIB" in
|
|
|
|
OPENMPI)
|
2015-08-06 08:55:24 +00:00
|
|
|
if [ ! -z $WM_THIRD_PARTY_USE_OPENMPI_188 ] && [ -e $WM_THIRD_PARTY_DIR/packages/openmpi-1.8.8/platforms/$WM_OPTIONS ]
|
2015-05-15 12:48:09 +00:00
|
|
|
then
|
2015-08-06 08:55:24 +00:00
|
|
|
mpi_version=openmpi-1.8.8
|
2015-05-15 12:48:09 +00:00
|
|
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
|
|
|
then
|
2015-08-06 08:55:24 +00:00
|
|
|
echo "Using openmpi-1.8.8 from the ThirdParty package: $WM_THIRD_PARTY_DIR/packages/$mpi_version"
|
2015-05-15 12:48:09 +00:00
|
|
|
fi
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.sh
|
|
|
|
|
|
|
|
elif [ ! -z $WM_THIRD_PARTY_USE_OPENMPI_165 ] && [ -e $WM_THIRD_PARTY_DIR/packages/openmpi-1.6.5/platforms/$WM_OPTIONS ]
|
2013-07-04 14:43:58 +00:00
|
|
|
then
|
2013-10-23 15:22:29 +00:00
|
|
|
mpi_version=openmpi-1.6.5
|
2013-07-04 14:43:58 +00:00
|
|
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
|
|
|
then
|
2013-10-23 15:22:29 +00:00
|
|
|
echo "Using openmpi-1.6.5 from the ThirdParty package: $WM_THIRD_PARTY_DIR/packages/$mpi_version"
|
2013-07-04 14:43:58 +00:00
|
|
|
fi
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.sh
|
|
|
|
|
2015-05-15 12:48:09 +00:00
|
|
|
elif [ ! -z $WM_THIRD_PARTY_USE_OPENMPI_143 ] && [ -e $WM_THIRD_PARTY_DIR/packages/openmpi-1.4.3/platforms/$WM_OPTIONS ]
|
2010-11-24 05:49:05 +00:00
|
|
|
then
|
2010-12-09 02:28:32 +00:00
|
|
|
mpi_version=openmpi-1.4.3
|
2010-11-24 05:49:05 +00:00
|
|
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
|
|
|
then
|
2010-12-09 02:28:32 +00:00
|
|
|
echo "Using openmpi-1.4.3 from the ThirdParty package: $WM_THIRD_PARTY_DIR/packages/$mpi_version"
|
2010-11-24 05:49:05 +00:00
|
|
|
fi
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.sh
|
|
|
|
|
2015-05-15 12:48:09 +00:00
|
|
|
elif [ ! -z $WM_THIRD_PARTY_USE_OPENMPI_15 ] && [ -e $WM_THIRD_PARTY_DIR/packages/openmpi-1.5/platforms/$WM_OPTIONS ]
|
2010-11-24 05:49:05 +00:00
|
|
|
then
|
2010-12-09 02:28:32 +00:00
|
|
|
mpi_version=openmpi-1.5
|
2010-11-24 05:49:05 +00:00
|
|
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
|
|
|
then
|
2010-12-09 02:28:32 +00:00
|
|
|
echo "Using openmpi-1.5 from the ThirdParty package: $WM_THIRD_PARTY_DIR/packages/$mpi_version"
|
2010-11-24 05:49:05 +00:00
|
|
|
fi
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/$mpi_version/platforms/$WM_OPTIONS/etc/$mpi_version.sh
|
|
|
|
fi
|
2010-05-12 13:27:55 +00:00
|
|
|
|
2015-08-05 11:57:56 +00:00
|
|
|
# On Windows set mpi_version from value defined in bashrc.mingw:
|
2015-08-04 12:39:06 +00:00
|
|
|
if [ "$WM_ARCH_BASE" == "mingw" ]
|
|
|
|
then
|
2015-08-05 11:57:56 +00:00
|
|
|
mpi_version=$MPI_VERSION_MINGW
|
2015-08-04 12:39:06 +00:00
|
|
|
fi
|
|
|
|
|
2010-05-12 13:27:55 +00:00
|
|
|
unset mpi_version
|
|
|
|
;;
|
|
|
|
|
2013-07-11 23:12:50 +00:00
|
|
|
MACPORTOPENMPI)
|
2015-05-15 18:07:49 +00:00
|
|
|
unset OPAL_PREFIX
|
2013-07-11 23:12:50 +00:00
|
|
|
|
2015-05-15 18:07:49 +00:00
|
|
|
export FOAM_MPI=openmpi-macport-$WM_MACPORT_MPI_VERSION
|
2013-07-11 23:12:50 +00:00
|
|
|
|
2015-05-15 18:07:49 +00:00
|
|
|
# Currently not correctly working on MacPorts
|
|
|
|
# libDir=`mpicc-openmpi-$WM_MACPORT_MPI_VERSION --showme:libdirs`
|
|
|
|
libDir=/opt/local/lib/openmpi-$WM_MACPORT_MPI_VERSION
|
2013-07-11 23:12:50 +00:00
|
|
|
|
2015-05-15 18:07:49 +00:00
|
|
|
_foamAddLib $libDir
|
|
|
|
unset libDir
|
2014-05-29 16:09:23 +00:00
|
|
|
|
2015-05-15 18:07:49 +00:00
|
|
|
which mpirun >/dev/null
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
export WM_MPIRUN_PROG=mpirun-openmpi-$WM_MACPORT_MPI_VERSION
|
|
|
|
fi
|
|
|
|
;;
|
2013-12-23 10:18:25 +00:00
|
|
|
|
2014-02-20 18:23:16 +00:00
|
|
|
MACPORTMPICH)
|
|
|
|
export FOAM_MPI=mpich-macports-$WM_MACPORT_MPI_VERSION
|
|
|
|
export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI
|
|
|
|
|
|
|
|
libDir=/opt/local/lib/mpich-$WM_MACPORT_MPI_VERSION
|
|
|
|
|
|
|
|
_foamAddLib $libDir
|
|
|
|
unset libDir
|
|
|
|
|
2014-05-29 16:09:23 +00:00
|
|
|
which mpirun >/dev/null
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
2015-05-15 18:07:49 +00:00
|
|
|
export WM_MPIRUN_PROG=mpirun-mpich-$WM_MACPORT_MPI_VERSION
|
2014-05-29 16:09:23 +00:00
|
|
|
fi
|
2014-02-20 18:23:16 +00:00
|
|
|
;;
|
2013-07-11 23:12:50 +00:00
|
|
|
|
2010-05-17 13:51:21 +00:00
|
|
|
SYSTEMOPENMPI)
|
|
|
|
mpi_version=openmpi-system
|
|
|
|
|
2013-07-04 14:04:40 +00:00
|
|
|
# make sure not the "old" mpi is used
|
2010-12-09 02:28:32 +00:00
|
|
|
# Not sure if this is necessary anymore.
|
|
|
|
# export OPAL_PREFIX=
|
2010-10-05 19:56:55 +00:00
|
|
|
|
2010-12-09 02:28:32 +00:00
|
|
|
# Make sure OPENMPI_BIN_DIR is set and valid
|
2013-07-04 14:04:40 +00:00
|
|
|
if [ -n "${OPENMPI_BIN_DIR}" ] && [ -d "${OPENMPI_BIN_DIR}" ]
|
2010-12-09 02:28:32 +00:00
|
|
|
then
|
2013-07-18 01:43:15 +00:00
|
|
|
# User defined value specified for OPENMPI_BIN_DIR
|
|
|
|
#
|
|
|
|
# WARNING:
|
|
|
|
# We assume this path specified by $OPENMPI_BIN_DIR is valid
|
|
|
|
# We assume the command mpicc is located somewhere under this path
|
|
|
|
# We assume the file mpi.h is located somewhere under this path
|
|
|
|
#
|
|
|
|
# Otherwise, please double check your openmpi installation, you are
|
|
|
|
# probably missing the openmpi runtime and/or development packages
|
|
|
|
# available for your system.
|
|
|
|
#
|
|
|
|
_foamAddPath $OPENMPI_BIN_DIR
|
2010-12-09 02:28:32 +00:00
|
|
|
else
|
2013-07-18 01:43:15 +00:00
|
|
|
# Here, we assume your environment is already set for running
|
|
|
|
# and developping with openmpi.
|
|
|
|
#
|
|
|
|
# Initialize OPENMPI_BIN_DIR using the path to mpicc
|
|
|
|
export OPENMPI_BIN_DIR=$(dirname `which mpicc`)
|
2010-12-09 02:28:32 +00:00
|
|
|
fi
|
2010-05-17 13:51:21 +00:00
|
|
|
|
2010-12-09 02:28:32 +00:00
|
|
|
# Make sure OPENMPI_LIB_DIR is set
|
|
|
|
if [ ! -n "${OPENMPI_LIB_DIR}" ]
|
2010-05-17 13:51:21 +00:00
|
|
|
then
|
2013-07-18 01:43:15 +00:00
|
|
|
# Initialize OPENMPI_LIB_DIR using the path to mpicc
|
|
|
|
export OPENMPI_LIB_DIR="`mpicc --showme:libdirs`"
|
2010-05-17 13:51:21 +00:00
|
|
|
fi
|
|
|
|
|
2010-12-09 02:28:32 +00:00
|
|
|
# Make sure the dynamic libraries are accessible
|
|
|
|
[ -n "${OPENMPI_LIB_DIR}" ] && _foamAddLib $OPENMPI_LIB_DIR
|
2010-05-12 13:27:55 +00:00
|
|
|
|
2010-12-09 02:28:32 +00:00
|
|
|
export MPI_HOME=`dirname $OPENMPI_BIN_DIR`
|
|
|
|
export MPI_ARCH_PATH=$MPI_HOME
|
|
|
|
export OPAL_PREFIX=$MPI_ARCH_PATH
|
|
|
|
|
|
|
|
# We initialize the rest of the environment using mpicc --showme:
|
|
|
|
[ ! -n "${OPENMPI_INCLUDE_DIR}" ] && export OPENMPI_INCLUDE_DIR="`mpicc --showme:incdirs`"
|
|
|
|
[ ! -n "${OPENMPI_COMPILE_FLAGS}" ] && export OPENMPI_COMPILE_FLAGS="`mpicc --showme:compile`"
|
|
|
|
[ ! -n "${OPENMPI_LINK_FLAGS}" ] && export OPENMPI_LINK_FLAGS="`mpicc --showme:link`"
|
|
|
|
|
|
|
|
#
|
|
|
|
# WARNING: We assume the file mpi.h will be available under the directories identified
|
|
|
|
# by the variable $OPENMPI_INCLUDE_DIR. Otherwise, please double check your
|
|
|
|
# system openmpi installation.
|
|
|
|
|
|
|
|
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
|
2011-10-03 08:28:22 +00:00
|
|
|
export PINC="${OPENMPI_COMPILE_FLAGS}"
|
|
|
|
export PLIBS="${OPENMPI_LINK_FLAGS}"
|
2010-12-09 02:28:32 +00:00
|
|
|
|
|
|
|
# No longer needed, but we keep this as a reference, just in case...
|
|
|
|
#libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
|
|
|
#_foamAddLib $libDir
|
|
|
|
|
|
|
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
|
|
|
then
|
2011-05-09 02:48:26 +00:00
|
|
|
echo " Environment variables defined for OpenMPI:"
|
2010-12-09 02:28:32 +00:00
|
|
|
echo " OPENMPI_BIN_DIR : $OPENMPI_BIN_DIR"
|
|
|
|
echo " OPENMPI_LIB_DIR : $OPENMPI_LIB_DIR"
|
|
|
|
echo " OPENMPI_INCLUDE_DIR : $OPENMPI_INCLUDE_DIR"
|
|
|
|
echo " OPENMPI_COMPILE_FLAGS : $OPENMPI_COMPILE_FLAGS"
|
|
|
|
echo " OPENMPI_LINK_FLAGS : $OPENMPI_LINK_FLAGS"
|
|
|
|
echo ""
|
|
|
|
echo " MPI_HOME : $MPI_HOME"
|
|
|
|
echo " MPI_ARCH_PATH : $MPI_ARCH_PATH"
|
|
|
|
echo " OPAL_PREFIX : $OPAL_PREFIX"
|
|
|
|
echo " PINC : $PINC"
|
|
|
|
echo " PLIBS : $PLIBS"
|
|
|
|
fi
|
2010-05-12 13:27:55 +00:00
|
|
|
|
|
|
|
unset mpi_version
|
|
|
|
;;
|
|
|
|
|
2014-02-25 17:55:33 +00:00
|
|
|
MVAPICH2)
|
|
|
|
mpi_version=mvapich2
|
|
|
|
|
|
|
|
if [ -n "${MVAPICH2_BIN_DIR}" ] && [ -d "${MVAPICH2_BIN_DIR}" ]
|
|
|
|
then
|
|
|
|
_foamAddPath $MVAPICH2_BIN_DIR
|
|
|
|
else
|
|
|
|
MVAPICH2_BIN_DIR=$(dirname `which mpicc`)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if which mpicc >/dev/null
|
|
|
|
then
|
|
|
|
mpicc -v 2>/dev/null | grep -q "mpicc for MVAPICH2" ||
|
|
|
|
echo "Warning: `which mpicc` does not appear to be for MVAPICH2"
|
|
|
|
else
|
|
|
|
echo "Warning: mpicc not available"
|
|
|
|
fi
|
|
|
|
|
|
|
|
export MPI_HOME=`dirname $MVAPICH2_BIN_DIR`
|
|
|
|
export MPI_ARCH_PATH=$MPI_HOME
|
|
|
|
|
|
|
|
export PINC="`mpicc -show -cc= -nativelinking`"
|
|
|
|
export PLIBS="`mpicc -show -cc= | sed "s%$PINC%%"`"
|
|
|
|
|
|
|
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
|
|
|
then
|
|
|
|
echo " Environment variables defined for MVAPICH2:"
|
|
|
|
echo " MPI_ARCH_PATH : $MPI_ARCH_PATH"
|
|
|
|
echo " PINC : $PINC"
|
|
|
|
echo " PLIBS : $PLIBS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
unset mpi_version
|
|
|
|
;;
|
|
|
|
|
2010-05-12 13:27:55 +00:00
|
|
|
MPICH)
|
|
|
|
mpi_version=mpich-1.2.4
|
|
|
|
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
|
|
|
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
|
|
|
|
export MPICH_ROOT=$MPI_ARCH_PATH
|
|
|
|
|
|
|
|
_foamAddPath $MPI_ARCH_PATH/bin
|
|
|
|
_foamAddLib $MPI_ARCH_PATH/lib
|
|
|
|
|
|
|
|
unset mpi_version
|
|
|
|
;;
|
|
|
|
|
|
|
|
MPICH-GM)
|
|
|
|
export MPI_ARCH_PATH=/opt/mpi
|
|
|
|
export MPICH_PATH=$MPI_ARCH_PATH
|
|
|
|
export MPICH_ROOT=$MPI_ARCH_PATH
|
|
|
|
export GM_LIB_PATH=/opt/gm/lib64
|
|
|
|
|
|
|
|
_foamAddPath $MPI_ARCH_PATH/bin
|
|
|
|
_foamAddLib $MPI_ARCH_PATH/lib
|
|
|
|
_foamAddLib $GM_LIB_PATH
|
|
|
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
HPMPI)
|
|
|
|
export MPI_HOME=/opt/hpmpi
|
|
|
|
export MPI_ARCH_PATH=$MPI_HOME
|
|
|
|
export MPICH_ROOT=$MPI_ARCH_PATH
|
|
|
|
|
|
|
|
_foamAddPath $MPI_ARCH_PATH/bin
|
|
|
|
|
|
|
|
case `uname -m` in
|
|
|
|
i686)
|
|
|
|
_foamAddLib $MPI_ARCH_PATH/lib/linux_ia32
|
|
|
|
;;
|
|
|
|
|
|
|
|
x86_64)
|
|
|
|
_foamAddLib $MPI_ARCH_PATH/lib/linux_amd64
|
|
|
|
;;
|
|
|
|
ia64)
|
|
|
|
_foamAddLib $MPI_ARCH_PATH/lib/linux_ia64
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo Unknown processor type `uname -m` for Linux
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
GAMMA)
|
|
|
|
export MPI_ARCH_PATH=/usr
|
|
|
|
;;
|
|
|
|
|
|
|
|
MPI)
|
|
|
|
export MPI_ARCH_PATH=/opt/mpi
|
|
|
|
;;
|
|
|
|
|
|
|
|
FJMPI)
|
|
|
|
export MPI_ARCH_PATH=/opt/FJSVmpi2
|
|
|
|
|
|
|
|
_foamAddPath $MPI_ARCH_PATH/bin
|
|
|
|
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
|
|
|
|
_foamAddLib /opt/FSUNf90/lib/sparcv9
|
|
|
|
_foamAddLib /opt/FJSVpnidt/lib
|
|
|
|
;;
|
|
|
|
|
|
|
|
QSMPI)
|
|
|
|
export MPI_ARCH_PATH=/usr/lib/mpi
|
|
|
|
|
|
|
|
_foamAddPath $MPI_ARCH_PATH/bin
|
|
|
|
_foamAddLib $MPI_ARCH_PATH/lib
|
2015-08-10 15:11:10 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
SGIMPI)
|
|
|
|
# no trailing slash
|
|
|
|
[ "${MPI_ROOT%/}" = "${MPI_ROOT}" ] || MPI_ROOT="${MPI_ROOT%/}"
|
|
|
|
|
|
|
|
export FOAM_MPI="${MPI_ROOT##*/}"
|
|
|
|
export MPI_ARCH_PATH=$MPI_ROOT
|
|
|
|
|
|
|
|
if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
|
|
|
|
then
|
|
|
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
|
|
|
|
echo " MPI_ROOT not a valid mpt installation directory or ending" \
|
|
|
|
" in a '/'." 1>&2
|
|
|
|
echo " Please set MPI_ROOT to the mpt installation directory." 1>&2
|
|
|
|
echo " MPI_ROOT currently set to '$MPI_ROOT'" 1>&2
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
|
|
|
then
|
|
|
|
echo "Using SGI MPT:" 1>&2
|
|
|
|
echo " MPI_ROOT : $MPI_ROOT" 1>&2
|
|
|
|
echo " FOAM_MPI : $FOAM_MPI" 1>&2
|
|
|
|
fi
|
|
|
|
|
|
|
|
_foamAddPath $MPI_ARCH_PATH/bin
|
|
|
|
_foamAddLib $MPI_ARCH_PATH/lib
|
|
|
|
|
|
|
|
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/sgimpi
|
|
|
|
;;
|
|
|
|
|
|
|
|
INTELMPI)
|
|
|
|
# no trailing slash
|
|
|
|
[ "${MPI_ROOT%/}" = "${MPI_ROOT}" ] || MPI_ROOT="${MPI_ROOT%/}"
|
|
|
|
|
|
|
|
export FOAM_MPI="${MPI_ROOT##*/}"
|
|
|
|
export MPI_ARCH_PATH=$MPI_ROOT
|
|
|
|
|
|
|
|
if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
|
|
|
|
then
|
|
|
|
echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
|
|
|
|
echo " MPI_ROOT not a valid mpt installation directory or ending" \
|
|
|
|
" in a '/'." 1>&2
|
|
|
|
echo " Please set MPI_ROOT to the mpt installation directory." 1>&2
|
|
|
|
echo " MPI_ROOT currently set to '$MPI_ROOT'" 1>&2
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
|
|
|
then
|
|
|
|
echo "Using INTEL MPI:" 1>&2
|
|
|
|
echo " MPI_ROOT : $MPI_ROOT" 1>&2
|
|
|
|
echo " FOAM_MPI : $FOAM_MPI" 1>&2
|
|
|
|
fi
|
|
|
|
|
|
|
|
_foamAddPath $MPI_ARCH_PATH/intel64/bin
|
|
|
|
_foamAddLib $MPI_ARCH_PATH/intel64/lib
|
2010-05-12 13:27:55 +00:00
|
|
|
|
2015-08-10 15:11:10 +00:00
|
|
|
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/intelmpi
|
2010-05-12 13:27:55 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2015-08-10 09:21:03 +00:00
|
|
|
# Removed $FOAM_MPI_LIBBIN. HJ, 8/Aug/2015
|
2010-05-12 13:27:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
minBufferSize=20000000
|
|
|
|
|
|
|
|
if [ "${MPI_BUFFER_SIZE:=$minBufferSize}" -lt $minBufferSize ]
|
|
|
|
then
|
|
|
|
MPI_BUFFER_SIZE=$minBufferSize
|
|
|
|
fi
|
|
|
|
export MPI_BUFFER_SIZE
|
|
|
|
|
|
|
|
|
2013-10-11 13:12:56 +00:00
|
|
|
# CUDA if available
|
|
|
|
# ~~~~~~~~~~~~~~~~~
|
|
|
|
[ -z "$CUDA_SYSTEM" ] && [ -e /usr/local/cuda-5.5/bin/nvcc ] && {
|
|
|
|
export CUDA_DIR=/usr/local/cuda-5.5
|
|
|
|
export CUDA_BIN_DIR=$CUDA_DIR/bin
|
|
|
|
export CUDA_LIB_DIR=$CUDA_DIR/lib64
|
|
|
|
export CUDA_INCLUDE_DIR=$CUDA_DIR/include
|
|
|
|
}
|
|
|
|
|
|
|
|
[ -d "$CUDA_LIB_DIR" ] && _foamAddPath $CUDA_BIN_DIR && _foamAddLib $CUDA_LIB_DIR
|
|
|
|
|
|
|
|
|
2010-05-12 13:27:55 +00:00
|
|
|
# CGAL library if available
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
[ -d "$CGAL_LIB_DIR" ] && _foamAddLib $CGAL_LIB_DIR
|
|
|
|
|
|
|
|
|
|
|
|
# Switch on the hoard memory allocator if available
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2010-05-17 13:51:21 +00:00
|
|
|
#if [ -f $FOAM_LIBBIN/libhoard.so ]
|
|
|
|
#then
|
2010-05-12 13:27:55 +00:00
|
|
|
# export LD_PRELOAD=$FOAM_LIBBIN/libhoard.so:$LD_PRELOAD
|
|
|
|
#fi
|
|
|
|
|
2010-10-12 07:53:05 +00:00
|
|
|
# HOARD seems to crash Paraview on Mac OS X 10.6
|
|
|
|
#if [ -f $FOAM_LIBBIN/libhoard.dylib ]
|
|
|
|
#then
|
|
|
|
# if [ -z "$DYLD_INSERT_LIBRARIES" ]
|
|
|
|
# then
|
2013-07-18 01:43:15 +00:00
|
|
|
# export DYLD_INSERT_LIBRARIES=$FOAM_LIBBIN/libhoard.dylib
|
2010-10-12 07:53:05 +00:00
|
|
|
# else
|
2013-07-18 01:43:15 +00:00
|
|
|
# export DYLD_INSERT_LIBRARIES=$FOAM_LIBBIN/libhoard.dylib:$DYLD_INSERT_LIBRARIES
|
2010-10-12 07:53:05 +00:00
|
|
|
# fi
|
|
|
|
#fi
|
2010-05-12 13:27:55 +00:00
|
|
|
|
2010-11-24 05:49:05 +00:00
|
|
|
|
|
|
|
# Third party packages
|
|
|
|
#
|
|
|
|
# In order to use a pre-installed version of the ThirdParty packages, just set the
|
2010-12-09 02:28:32 +00:00
|
|
|
# appropriate XXX_SYSTEM environment variable for a given package in your prefs.sh
|
2015-05-26 04:59:43 +00:00
|
|
|
# file in order to disable the activation of the ThirdParty version of the same package.
|
2010-11-24 05:49:05 +00:00
|
|
|
|
2013-07-04 14:04:40 +00:00
|
|
|
# Load Mesquite library
|
2010-11-24 06:13:57 +00:00
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$MESQUITE_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_MESQUITE_212 ] && [ -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS ] && {
|
2010-11-24 06:13:57 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS/etc/mesquite-2.1.2.sh
|
|
|
|
}
|
2010-12-09 02:28:32 +00:00
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " MESQUITE_DIR is initialized to: $MESQUITE_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
|
|
|
|
2013-07-04 14:04:40 +00:00
|
|
|
# Load Metis library
|
2010-11-24 06:13:57 +00:00
|
|
|
# ~~~~~~~~~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$METIS_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_METIS_510 ] && [ -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ] && {
|
2013-11-26 12:00:51 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.sh
|
2010-11-24 06:13:57 +00:00
|
|
|
}
|
2010-12-09 02:28:32 +00:00
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " METIS_DIR is initialized to: $METIS_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
|
|
|
|
2010-11-24 06:13:57 +00:00
|
|
|
# Load ParMetis library
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$PARMETIS_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PARMETIS_403 ] && [ -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ] && {
|
2013-11-26 12:00:51 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.sh
|
2010-11-24 06:13:57 +00:00
|
|
|
}
|
2010-12-09 02:28:32 +00:00
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARMETIS_DIR is initialized to: $PARMETIS_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
|
|
|
|
2013-07-04 14:04:40 +00:00
|
|
|
# Load ParMGridGen library
|
2010-11-24 06:13:57 +00:00
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$PARMGRIDGEN_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PARMGRIDGEN_10 ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0/platforms/$WM_OPTIONS ] && {
|
2010-11-24 06:13:57 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0/platforms/$WM_OPTIONS/etc/ParMGridGen-1.0.sh
|
|
|
|
}
|
2013-12-11 09:25:19 +00:00
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARMGRIDGEN_DIR is initialized to: $PARMGRIDGEN_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
|
|
|
|
2013-07-04 14:04:40 +00:00
|
|
|
# Load Libccmio library
|
2010-12-20 03:22:59 +00:00
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$LIBCCMIO_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_LIBCCMIO_261 ] && [ -e $WM_THIRD_PARTY_DIR/packages/libccmio-2.6.1/platforms/$WM_OPTIONS ] && {
|
2010-12-20 03:22:59 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/libccmio-2.6.1/platforms/$WM_OPTIONS/etc/libccmio-2.6.1.sh
|
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " LIBCCMIO_DIR is initialized to: $LIBCCMIO_DIR"
|
|
|
|
|
|
|
|
|
2010-11-24 06:13:57 +00:00
|
|
|
# Load Scotch library
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~
|
2015-05-17 11:44:34 +00:00
|
|
|
[ -z "$SCOTCH_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_SCOTCH_604 ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.sh
|
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " SCOTCH_DIR is initialized to: $SCOTCH_DIR"
|
|
|
|
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$SCOTCH_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_SCOTCH_600 ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ] && {
|
2013-11-26 12:00:51 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS/etc/scotch-6.0.0.sh
|
2010-11-24 06:13:57 +00:00
|
|
|
}
|
2010-12-09 02:28:32 +00:00
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " SCOTCH_DIR is initialized to: $SCOTCH_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
|
|
|
|
2010-11-24 06:13:57 +00:00
|
|
|
# Load cmake
|
|
|
|
# ~~~~~~~~~~
|
2015-05-17 11:44:34 +00:00
|
|
|
[ -z "$CMAKE_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_CMAKE_322 ] && [ -e $WM_THIRD_PARTY_DIR/packages/cmake-3.2.2/platforms/$WM_OPTIONS ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-3.2.2/platforms/$WM_OPTIONS/etc/cmake-3.2.2.sh
|
|
|
|
}
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$CMAKE_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_CMAKE_2812 ] && [ -e $WM_THIRD_PARTY_DIR/packages/cmake-2.8.12/platforms/$WM_OPTIONS ] && {
|
2013-10-23 14:56:49 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.12/platforms/$WM_OPTIONS/etc/cmake-2.8.12.sh
|
2010-11-24 06:13:57 +00:00
|
|
|
}
|
2010-12-09 02:28:32 +00:00
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " CMAKE_DIR is initialized to: $CMAKE_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
2011-05-09 02:48:26 +00:00
|
|
|
# Load m4
|
|
|
|
# ~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$M4_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_M4_1416 ] && [ -e $WM_THIRD_PARTY_DIR/packages/m4-1.4.16/platforms/$WM_OPTIONS ] && {
|
2011-05-09 02:48:26 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/m4-1.4.16/platforms/$WM_OPTIONS/etc/m4-1.4.16.sh
|
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " M4_DIR is initialized to: $M4_DIR"
|
|
|
|
|
|
|
|
# Load bison
|
|
|
|
# ~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$BISON_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_BISON_27 ] && [ -e $WM_THIRD_PARTY_DIR/packages/bison-2.7/platforms/$WM_OPTIONS ] && {
|
2014-06-01 03:26:57 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/bison-2.7/platforms/$WM_OPTIONS/etc/bison-2.7.sh
|
2011-05-09 02:48:26 +00:00
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " BISON_DIR is initialized to: $BISON_DIR"
|
|
|
|
|
|
|
|
# Load flex
|
|
|
|
# ~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$FLEX_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_FLEX_2535 ] && [ -e $WM_THIRD_PARTY_DIR/packages/flex-2.5.35/platforms/$WM_OPTIONS ] && {
|
2011-05-09 02:48:26 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/flex-2.5.35/platforms/$WM_OPTIONS/etc/flex-2.5.35.sh
|
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " FLEX_DIR is initialized to: $FLEX_DIR"
|
|
|
|
|
|
|
|
|
|
|
|
# Load zoltan
|
|
|
|
# ~~~~~~~~~~
|
2015-05-26 04:59:43 +00:00
|
|
|
[ -z "$ZOLTAN_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_ZOLTAN_36 ] && [ -e $WM_THIRD_PARTY_DIR/packages/zoltan_3.6 ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/zoltan_3.6/platforms/$WM_OPTIONS/etc/zoltan_3.6.sh
|
2011-05-09 02:48:26 +00:00
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " ZOLTAN_DIR is initialized to: $ZOLTAN_DIR"
|
|
|
|
|
2010-11-24 05:49:05 +00:00
|
|
|
|
2010-11-24 06:13:57 +00:00
|
|
|
# Load Python
|
|
|
|
# ~~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$PYTHON_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PYTHON_27 ] && [ -e $WM_THIRD_PARTY_DIR/packages/Python-2.7/platforms/$WM_OPTIONS ] && {
|
2010-11-24 06:13:57 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/Python-2.7/platforms/$WM_OPTIONS/etc/Python-2.7.sh
|
|
|
|
}
|
2010-12-09 02:28:32 +00:00
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PYTHON_DIR is initialized to: $PYTHON_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
2012-04-11 04:03:09 +00:00
|
|
|
# Load PyFoam
|
|
|
|
# ~~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$PYFOAM_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PYFOAM_063 ] && [ -e $WM_THIRD_PARTY_DIR/packages/PyFoam-0.6.3/platforms/noarch ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/PyFoam-0.6.3/platforms/noarch/etc/PyFoam-0.6.3.sh
|
|
|
|
}
|
|
|
|
[ -z "$PYFOAM_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PYFOAM_064 ] && [ -e $WM_THIRD_PARTY_DIR/packages/PyFoam-0.6.4/platforms/noarch ] && {
|
2014-11-24 20:29:09 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/PyFoam-0.6.4/platforms/noarch/etc/PyFoam-0.6.4.sh
|
2012-04-11 04:03:09 +00:00
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PYFOAM_DIR is initialized to: $PYFOAM_DIR"
|
|
|
|
|
2014-11-24 14:15:37 +00:00
|
|
|
# Make sure that there is a special directory for special PyFoam-scripts
|
|
|
|
[ -z "$PYFOAM_SITE_DIR" ] && export PYFOAM_SITE_DIR=$WM_THIRD_PARTY_DIR/PyFoamSiteScripts
|
|
|
|
if [ -d $PYFOAM_SITE_DIR/bin ]
|
|
|
|
then
|
|
|
|
_foamAddPath $PYFOAM_SITE_DIR/bin
|
|
|
|
fi
|
|
|
|
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PYFOAM_SITE_DIR is initialized to: $PYFOAM_SITE_DIR"
|
|
|
|
|
2013-07-07 16:59:07 +00:00
|
|
|
# Load hwloc
|
|
|
|
# ~~~~~~~~~~~
|
2015-05-17 11:44:34 +00:00
|
|
|
[ -z "$HWLOC_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_HWLOC_1101 ] && [ -e $WM_THIRD_PARTY_DIR/packages/hwloc-1.10.1/platforms/$WM_OPTIONS ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/hwloc-1.10.1/platforms/$WM_OPTIONS/etc/hwloc-1.10.1.sh
|
|
|
|
}
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$HWLOC_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_HWLOC_172 ] && [ -e $WM_THIRD_PARTY_DIR/packages/hwloc-1.7.2/platforms/$WM_OPTIONS ] && {
|
2013-10-23 17:19:42 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/hwloc-1.7.2/platforms/$WM_OPTIONS/etc/hwloc-1.7.2.sh
|
2013-07-07 16:59:07 +00:00
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " HWLOC_DIR is initialized to: $HWLOC_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
2010-11-24 06:13:57 +00:00
|
|
|
# Load QT
|
|
|
|
# ~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ ! -z "$QT_THIRD_PARTY" ] && [ ! -z $WM_THIRD_PARTY_USE_QT_486 ] && [ -e $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.6/platforms/$WM_OPTIONS ] && {
|
2015-04-23 12:51:07 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.6/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.8.6.sh
|
2010-11-24 06:13:57 +00:00
|
|
|
}
|
2010-12-09 02:28:32 +00:00
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " QT_DIR is initialized to: $QT_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
|
|
|
|
2010-11-24 06:13:57 +00:00
|
|
|
# Load ParaView
|
|
|
|
# ~~~~~~~~~~~~~
|
2015-05-15 12:48:09 +00:00
|
|
|
[ -z "$PARAVIEW_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PARAVIEW_431 ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-4.3.1/platforms/$WM_OPTIONS ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.3.1/platforms/$WM_OPTIONS/etc/ParaView-4.3.1.sh
|
|
|
|
}
|
|
|
|
[ -z "$PARAVIEW_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PARAVIEW_410 ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-4.1.0/platforms/$WM_OPTIONS ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.1.0/platforms/$WM_OPTIONS/etc/ParaView-4.1.0.sh
|
|
|
|
}
|
|
|
|
[ -z "$PARAVIEW_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PARAVIEW_401 ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-4.0.1/platforms/$WM_OPTIONS ] && {
|
2013-12-11 09:25:19 +00:00
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-4.0.1/platforms/$WM_OPTIONS/etc/ParaView-4.0.1.sh
|
2015-05-15 12:48:09 +00:00
|
|
|
}
|
|
|
|
[ -z "$PARAVIEW_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PARAVIEW_3141 ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-3.14.1/platforms/$WM_OPTIONS ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.14.1/platforms/$WM_OPTIONS/etc/ParaView-3.14.1.sh
|
|
|
|
}
|
|
|
|
[ -z "$PARAVIEW_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PARAVIEW_381 ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS/etc/ParaView-3.8.1.sh
|
2010-11-24 06:13:57 +00:00
|
|
|
}
|
2010-12-09 02:28:32 +00:00
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARAVIEW_DIR is initialized to: $PARAVIEW_DIR"
|
2010-11-24 05:49:05 +00:00
|
|
|
|
|
|
|
|
2015-08-11 09:19:57 +00:00
|
|
|
# Load llvm
|
2015-05-15 12:48:09 +00:00
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
[ -z "$LLVM_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_LLVM_360 ] && [ -e $WM_THIRD_PARTY_DIR/packages/llvm-3.6.0/platforms/$WM_OPTIONS ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/llvm-3.6.0/platforms/$WM_OPTIONS/etc/llvm-3.6.0.sh
|
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " LLVM_DIR is initialized to: $LLVM_DIR"
|
|
|
|
|
2015-08-11 09:19:57 +00:00
|
|
|
# Load mesa
|
2015-05-15 12:48:09 +00:00
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
[ -z "$MESA_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_MESA_GIT ] && [ -e $WM_THIRD_PARTY_DIR/packages/mesa-git/platforms/$WM_OPTIONS ] && {
|
|
|
|
_foamSource $WM_THIRD_PARTY_DIR/packages/mesa-git/platforms/$WM_OPTIONS/etc/mesa-git.sh
|
|
|
|
}
|
|
|
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " MESA_DIR is initialized to: $MESA_DIR"
|
|
|
|
|
|
|
|
|
2010-05-12 13:27:55 +00:00
|
|
|
# cleanup environment:
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~
|
2010-05-17 13:51:21 +00:00
|
|
|
unset _foamAddPath _foamAddLib minBufferSize
|
2010-05-12 13:27:55 +00:00
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|