diff --git a/etc/settings.csh b/etc/settings.csh index 4e5677e3d9..487d4c0a7f 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -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" diff --git a/etc/settings.sh b/etc/settings.sh index d7fcf2e254..252ae72b29 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -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:"