#!/bin/csh # First Line must be the Shell used. # Modify: qsub cpgm1.job; execute in batch on TCS; generic C source: cpgm.c # Job script cpgm1.job must be executable: use chmod 755 cpgm1.job # also needs cdata input and send output to cpgm1.output using 1 processor # # These first few lines setPortable Batch System (PBS) scheduler directives. # set h:mm:ss #PBS -l walltime=1:00 # set number nodes:procs: 1:1,1:4,2:16,...,nodes:procs #PBS -l rmsnodes=1:1 # set project-name for MCS572S03 #PBS -l rmsproject=sc70jjp # set file names for standard error and output #PBS -e cpgm1.error #PBS -o cpgm1.output # # turn on echo set echo # # This job requires the program source cpgm.c and data file cdata in $LOCAL # copy source to $LOCAL cp ${SCRATCH}/cpgm.c . # copy cdata to $LOCAL cp ${SCRATCH}/cdata . # # Compile the program: compiles and links cpgm cc -lmpi -lelan -arch ev67 -o cpgm cpgm.c # # runs executable called cpgm prun -N ${RMS_NODES} -n ${RMS_PROCS} ./cpgm < cdata # within mpprun environment and full path "./cpgm" is needed. # output should be in ${SCRATCH}/cgpm1.output where qsub run #