#!/bin/sh #PBS -V ### Job name #PBS -N MyMPIJobName ### Output files #PBS -j oe ### Mail to user #PBS -m ae ### Mail address for user #PBS -M Your-email-Address ### Queue name #PBS -q hydra ### Number of nodes #PBS -l nodes=X:ppn=2,walltime=HH:MM:SS # Calculate the number of processors to be used NP=$(wc -l $PBS_NODEFILE | awk '{print $1}') # This job's working directory echo Working directory is $PBS_O_WORKDIR cd $PBS_O_WORKDIR echo Running on host `hostname` echo Time is `date` echo Using nodes cat $PBS_NODEFILE # Run the executable mpiexec -n $NP MyProgram+Arguments