#!/bin/csh # resources: 5 minutes total cpu time #PBS -l cput=05:00 # mail options (a=abort b=begin e=end n=none) #PBS -m abe # first move to the directory where we submitted the job! cd $PBS_O_WORKDIR set path=(/bin /usr/bin /usr/local/bin .) # count on how many nodes we are running set nodect=`wc -l $PBS_NODEFILE | cut -c 0-7` echo "mpich running on " `hostname` echo "running on $nodect nodes" echo "list of machines: " `cat $PBS_NODEFILE` echo "path is" `set | grep path` # now run in parallel the program "hello" with one argument mpirun \ -nolocal \ -machinefile $PBS_NODEFILE \ -np $nodect \ hello "Hello World"