From 22e752d3481153d2f3d5c49dfe7ba8b8e0c9f60f Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 5 Apr 2011 11:49:45 +0100 Subject: [PATCH] ENH: etc/settings: define MPI_ARCH_PATH for systemopenmpi --- etc/settings.csh | 4 ++++ etc/settings.sh | 4 ++++ 2 files changed, 8 insertions(+) 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:"