mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: etc/settings.*sh : make SYSTEMOPENMPI work with multiple paths
This commit is contained in:
@ -82,7 +82,7 @@ unsetenv MPFR_ARCH_PATH
|
|||||||
# Select compiler installation
|
# Select compiler installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# compilerInstall = OpenFOAM | system
|
# compilerInstall = OpenFOAM | system
|
||||||
if ( ! $?compilerInstall ) set compilerInstall=OpenFOAM
|
if ( ! $?compilerInstall ) set compilerInstall=system
|
||||||
|
|
||||||
switch ("$compilerInstall")
|
switch ("$compilerInstall")
|
||||||
case OpenFOAM:
|
case OpenFOAM:
|
||||||
@ -209,14 +209,20 @@ case OPENMPI:
|
|||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case SYSTEMOPENMPI:
|
case SYSTEMOPENMPI:
|
||||||
# use the system installed openmpi, get library directory via mpicc
|
|
||||||
|
# This uses the installed openmpi. It needs mpicc installed!
|
||||||
|
|
||||||
set mpi_version=openmpi-system
|
set mpi_version=openmpi-system
|
||||||
set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
|
||||||
|
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
|
||||||
|
setenv PINC "`mpicc --showme:compile`"
|
||||||
|
setenv PLIBS "`mpicc --showme:link`"
|
||||||
|
set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
||||||
|
|
||||||
if ($?FOAM_VERBOSE && $?prompt) then
|
if ($?FOAM_VERBOSE && $?prompt) then
|
||||||
echo "Using system installed OpenMPI:"
|
echo "Using system installed MPI:"
|
||||||
echo " compile flags : `mpicc --showme:compile`"
|
echo " compile flags : $PINC"
|
||||||
echo " link flags : `mpicc --showme:link`"
|
echo " link flags : $PLIBS"
|
||||||
echo " libmpi dir : $libDir"
|
echo " libmpi dir : $libDir"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -105,7 +105,7 @@ unset MPFR_ARCH_PATH
|
|||||||
# Select compiler installation
|
# Select compiler installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# compilerInstall = OpenFOAM | system
|
# compilerInstall = OpenFOAM | system
|
||||||
: ${compilerInstall:=OpenFOAM}
|
: ${compilerInstall:=system}
|
||||||
|
|
||||||
case "${compilerInstall:-OpenFOAM}" in
|
case "${compilerInstall:-OpenFOAM}" in
|
||||||
OpenFOAM)
|
OpenFOAM)
|
||||||
@ -237,13 +237,17 @@ OPENMPI)
|
|||||||
SYSTEMOPENMPI)
|
SYSTEMOPENMPI)
|
||||||
# use the system installed openmpi, get library directory via mpicc
|
# use the system installed openmpi, get library directory via mpicc
|
||||||
mpi_version=openmpi-system
|
mpi_version=openmpi-system
|
||||||
libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
|
||||||
|
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
|
||||||
|
export PINC="`mpicc --showme:compile`"
|
||||||
|
export PLIBS="`mpicc --showme:link`"
|
||||||
|
libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
||||||
|
|
||||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||||
then
|
then
|
||||||
echo "Using system installed OpenMPI:"
|
echo "Using system installed MPI:"
|
||||||
echo " compile flags : `mpicc --showme:compile`"
|
echo " compile flags : $PINC"
|
||||||
echo " link flags : `mpicc --showme:link`"
|
echo " link flags : $PLIBS"
|
||||||
echo " libmpi dir : $libDir"
|
echo " libmpi dir : $libDir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user