ENH: Have new WM_MPLIB message passing library : SYSTEMOPENMPI
It uses mpicc to find out where the installed libraries are.
This commit is contained in:
parent
85a481906a
commit
5ef1bac786
@ -147,6 +147,30 @@ case OPENMPI:
|
||||
unset mpi_version
|
||||
breaksw
|
||||
|
||||
case SYSTEMOPENMPI:
|
||||
|
||||
# This uses the installed openmpi. It needs mpicc installed!
|
||||
|
||||
set mpi_version=openmpi-system
|
||||
|
||||
# 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
|
||||
echo "Using system installed MPI:"
|
||||
echo " compile flags : $PINC"
|
||||
echo " link flags : $PLIBS"
|
||||
echo " libmpi dir : $libDir"
|
||||
endif
|
||||
|
||||
_foamAddLib $libDir
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version libDir
|
||||
breaksw
|
||||
|
||||
case MPICH:
|
||||
set mpi_version=mpich2-1.1.1p1
|
||||
setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
|
||||
|
@ -183,6 +183,28 @@ OPENMPI)
|
||||
unset mpi_version
|
||||
;;
|
||||
|
||||
SYSTEMOPENMPI)
|
||||
mpi_version=openmpi-system
|
||||
|
||||
# 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" ]
|
||||
then
|
||||
echo "Using system installed MPI:"
|
||||
echo " compile flags : $PINC"
|
||||
echo " link flags : $PLIBS"
|
||||
echo " libmpi dir : $libDir"
|
||||
fi
|
||||
|
||||
_foamAddLib $libDir
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version libDir
|
||||
;;
|
||||
|
||||
MPICH)
|
||||
mpi_version=mpich2-1.1.1p1
|
||||
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
||||
|
Loading…
Reference in New Issue
Block a user