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:
parent
93f583fd97
commit
a4c378a31f
3 changed files with 30 additions and 0 deletions
13
etc/bashrc
13
etc/bashrc
|
@ -275,6 +275,19 @@ Darwin)
|
|||
|
||||
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" ]
|
||||
then
|
||||
# Use Mac-Ports-Compiler instead of Apple-gcc-4.2
|
||||
|
|
|
@ -240,6 +240,20 @@ OPENMPI)
|
|||
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)
|
||||
mpi_version=openmpi-system
|
||||
|
||||
|
|
3
wmake/rules/darwinIntel64/mplibMACPORTOPENMPI
Normal file
3
wmake/rules/darwinIntel64/mplibMACPORTOPENMPI
Normal file
|
@ -0,0 +1,3 @@
|
|||
PFLAGS = -DOMPI_SKIP_MPICXX
|
||||
PINC = -I$(MPI_ARCH_PATH)/include/openmpi
|
||||
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi
|
Reference in a new issue