mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: set PINC, PLIBS in the rules (not the env) for system-openmpi
BUG: syntax error in settings.sh
This commit is contained in:
@ -137,8 +137,7 @@ case OpenFOAM:
|
|||||||
_foamAddPath $gccDir/bin
|
_foamAddPath $gccDir/bin
|
||||||
|
|
||||||
# 64-bit needs lib64, but 32-bit needs lib (not lib32)
|
# 64-bit needs lib64, but 32-bit needs lib (not lib32)
|
||||||
if ( "$WM_ARCH_OPTION" = 64 ) then
|
if ($WM_ARCH_OPTION == 64) then
|
||||||
then
|
|
||||||
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
|
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
|
||||||
else
|
else
|
||||||
_foamAddLib $gccDir/lib
|
_foamAddLib $gccDir/lib
|
||||||
@ -150,7 +149,6 @@ case OpenFOAM:
|
|||||||
|
|
||||||
# add in mpc libraries (not need for older gcc)
|
# add in mpc libraries (not need for older gcc)
|
||||||
if ( $?mpc_version ) then
|
if ( $?mpc_version ) then
|
||||||
then
|
|
||||||
_foamAddLib $mpcDir/lib
|
_foamAddLib $mpcDir/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -209,18 +207,14 @@ case OPENMPI:
|
|||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case SYSTEMOPENMPI:
|
case SYSTEMOPENMPI:
|
||||||
# This uses the installed openmpi. It needs mpicc installed!
|
# use the system installed openmpi, get library directory via mpicc
|
||||||
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 MPI:"
|
echo "Using system installed OpenMPI:"
|
||||||
echo " compile flags : $PINC"
|
echo " compile flags : `mpicc --showme:compile`"
|
||||||
echo " link flags : $PLIBS"
|
echo " link flags : `mpicc --showme:link`"
|
||||||
echo " libmpi dir : $libDir"
|
echo " libmpi dir : $libDir"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -235,19 +235,15 @@ OPENMPI)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
SYSTEMOPENMPI)
|
SYSTEMOPENMPI)
|
||||||
# This uses the installed openmpi. It needs mpicc installed!
|
# 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 MPI:"
|
echo "Using system installed OpenMPI:"
|
||||||
echo " compile flags : $PINC"
|
echo " compile flags : `mpicc --showme:compile`"
|
||||||
echo " link flags : $PLIBS"
|
echo " link flags : `mpicc --showme:link`"
|
||||||
echo " libmpi dir : $libDir"
|
echo " libmpi dir : $libDir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -1 +1,5 @@
|
|||||||
|
# use the system installed openmpi - mpicc must be installed
|
||||||
|
|
||||||
PFLAGS = -DOMPI_SKIP_MPICXX
|
PFLAGS = -DOMPI_SKIP_MPICXX
|
||||||
|
PINC = $(shell mpicc --showme:compile)
|
||||||
|
PLIBS = $(shell mpicc --showme:link)
|
||||||
|
|||||||
Reference in New Issue
Block a user