diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions index d1a4007c4752afc9f8622d11db77ae595ea7cd37..12f0265c2fb0c39b0f3c744947c054fcc6edac9a 100644 --- a/bin/tools/RunFunctions +++ b/bin/tools/RunFunctions @@ -241,6 +241,12 @@ runParallel() # Any additional parsed arguments (eg, decomposeParDict) local appArgs="-parallel" + local mpirun="mpirun" + if [ "$FOAM_MPI" = msmpi ] + then + mpirun="mpiexec" + fi + # Parse options until executable is encountered while [ $# -gt 0 -a -z "$appRun" ] do @@ -287,11 +293,11 @@ runParallel() if [ "$logMode" = append ] then ( - mpirun -np $nProcs $appRun $appArgs "$@" </dev/null >> $logFile 2>&1 + $mpirun -np $nProcs $appRun $appArgs "$@" </dev/null >> $logFile 2>&1 ) else ( - mpirun -np $nProcs $appRun $appArgs "$@" </dev/null > $logFile 2>&1 + $mpirun -np $nProcs $appRun $appArgs "$@" </dev/null > $logFile 2>&1 ) fi fi