On Mac: asume that we want to use the OpenMPI from MacPorts if it is present and the user doesn't say otherwise

--HG--
branch : bgschaid/minorAdditionsBranch
This commit is contained in:
Bernhard F.W. Gschaider 2013-07-12 01:12:50 +02:00
parent 93f583fd97
commit a4c378a31f
3 changed files with 30 additions and 0 deletions

View file

@ -275,6 +275,19 @@ Darwin)
export WM_USE_MACPORT=1 export WM_USE_MACPORT=1
if [ -e '/opt/local/bin/openmpicc' ]
then
export WM_MPLIB=MACPORTOPENMPI
else
if [ -z "$WM_CHOSEN_MAC_MPI" ]
then
echo "WM_CHOSEN_MAC_MPI unset. Using OPENMPI"
export WM_MPLIB=OPENMPI
else
export WM_MPLIB=$WM_CHOSEN_MAC_MPI
fi
fi
if [ "$compilerInstall" == "System" ] if [ "$compilerInstall" == "System" ]
then then
# Use Mac-Ports-Compiler instead of Apple-gcc-4.2 # Use Mac-Ports-Compiler instead of Apple-gcc-4.2

View file

@ -240,6 +240,20 @@ OPENMPI)
unset mpi_version unset mpi_version
;; ;;
MACPORTOPENMPI)
unset OPAL_PREFIX
export FOAM_MPI=openmpi-macport
libDir=`openmpicc --showme:link | 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%/*}"
_foamAddLib $libDir
unset libDir
;;
SYSTEMOPENMPI) SYSTEMOPENMPI)
mpi_version=openmpi-system mpi_version=openmpi-system

View file

@ -0,0 +1,3 @@
PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include/openmpi
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi