#!/bin/sh ###PBS -o inferno.rice.edu:/data/josef/output.log #PBS -l nodes=2 ###PBS -e inferno.rice.edu:/data/josef/output.err #PBS -m ae #PBS -q default@inferno.rice.edu ###PBS -N MPItest #PBS -r n #!/bin/sh ### Job name ### Declare job-non-rerunable ### output files ### Mail to user ### Queue name ### Number of nodes # 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 Directory is `pwd` echo This job runs on the following processors: echo `cat $PBS_NODEFILE` #Define number of processors NPROCS=`wc -l < $PBS_NODEFILE` echo This job has allocated $NPROCS nodes # Run the parallel MPI executable "cpi" /usr/local/mpich/bin/mpirun -v -np $NPROCS ./a.out