#! /bin/sh
if [ "$MPIR_HOME" = "" ] ; then 
    MPIR_HOME=#MPIR_HOME#
fi
if [ "$MPIR_HOME" = "#""MPIR_HOME""#" ] ; then
    MPIR_HOME=`pwd`/..
fi
if [ "#MPIRUN_BIN#" = "#""MPIRUN_BIN""#" ] ; then 
    MPIRUN_HOME=$MPIR_HOME/bin
else
    MPIRUN_HOME=$MPIR_HOME/#MPIRUN_BIN#
fi
if [ "$argsset" = "" ] ; then
   . $MPIRUN_HOME/mpirun.args
   argsset=1
fi

if [ -z "$p4pgfile" ] ; then
    np=`expr $np - 1`
    p4pgfile="$PWD_TRIAL/PI$$"
    $Show echo "local $np $progname" >  "$p4pgfile"
    np=`expr $np + 1`
fi
$Show $progname $cmdLineArgs -p4pg "$p4pgfile"
if [ $leavePGFile = 1 ] ; then
  echo "P4 procgroup file is $p4pgfile"
else
  $Show /bin/rm "$p4pgfile"
fi
