ENH: etc/settings: define MPI_ARCH_PATH for systemopenmpi

This commit is contained in:
mattijs 2011-04-05 11:49:45 +01:00
parent c610ea8fc3
commit 22e752d348
2 changed files with 8 additions and 0 deletions

View File

@ -381,6 +381,10 @@ case SYSTEMOPENMPI:
setenv PLIBS "`mpicc --showme:link`"
set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
# include files and libraries.
setenv MPI_ARCH_PATH "${libDir:h}"
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using system installed MPI:"
echo " compile flags : $PINC"

View File

@ -402,6 +402,10 @@ SYSTEMOPENMPI)
export PLIBS="`mpicc --showme:link`"
libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
# include files and libraries.
export MPI_ARCH_PATH="${libDir%/*}"
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using system installed MPI:"