Allow specification of different mpirun to be used by the RunFunctions - Used on Mac but may be beneficial for other systems too

This commit is contained in:
Bernhard F.W. Gschaider 2014-05-29 18:09:23 +02:00
parent d868141816
commit 1cb3e1f77a
2 changed files with 20 additions and 2 deletions

View file

@ -75,7 +75,14 @@ runParallel ()
echo "$APP_NAME already run on $PWD: remove log file to run"
else
echo "Running $APP_NAME in parallel on $PWD using $1 processes"
( mpirun -np $1 $APP_RUN -parallel < /dev/null > $LOG_NAME 2>&1 )
if [ -z "$WM_MPIRUN_PROG" ]
then
mpirunProg=mpirun
else
# Allow exceentric systems to override the hardcoded mpirun
mpirunProg=$WM_MPIRUN_PROG
fi
( $mpirunProg -np $1 $APP_RUN -parallel < /dev/null > $LOG_NAME 2>&1 )
fi
}

View file

@ -248,6 +248,12 @@ MACPORTOPENMPI)
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$FOAM_MPI
_foamAddLib $libDir
unset libDir
which mpirun >/dev/null
if [ $? -ne 0 ]
then
export WM_MPIRUN_PROG=mpirun-openmpi-$WM_MACPORT_MPI_VERSION
fi
;;
MACPORTMPICH)
@ -260,6 +266,11 @@ MACPORTMPICH)
_foamAddLib $libDir
unset libDir
which mpirun >/dev/null
if [ $? -ne 0 ]
then
export WM_MPIRUN_PROG=mpirun-mpich-$WM_MACPORT_MPI_VERSION
fi
;;
SYSTEMOPENMPI)