Snowpatch QuickStart Guide | WestGrid: "Here is an example of a script to run an MPI program, pn, using 6 processors (3 nodes with 2 processors per node). If the script file is named pn.pbs, submit the job with qsub pn.pbs.
#PBS -l procs=6
# Script for running MPI sample program pn on SnowPatch
echo "Current working directory is `pwd`"
echo "Running on hosts:"
echo "Starting run at: `date`"
mpiexec -n $PBS_NCPUS ./pn
echo "Job finished at: `date`"
'via Blog this'