#!/bin/sh
#set -x

#
# This program is a wrapper over lam's mpirun. It converts
# the mpich's mpirun formated command to lam's format.
# and invokes lam's mpirun with it.
#

if [ $1 !=  "-np" ]; then
echo "Error in  mpirun command"
exit 1
fi
shift
np=$1
shift
progname=$1
shift
options=$*
#
# Please modify the following path to point to the correct location of LAM's mpirun
#
lam_path=/home/petsc/soft/solaris-9-lam/lam-6.5.8/bin
#
# Now execute the mpirun comman
#
$lam_path/mpirun -w -c $np -s n0 $progname -- $options
$lam_path/lamclean
