#!/bin/bash ### The lines that started with #PBS will be ### considered as submission options. They are ### not comments. ### SEE "man qsub" for details about the default ### variables and #PBS directives ### Set the job name (if your job is jobname.com then ### set this to jobname for your convenience) #PBS -N test ### The following .err and .out files are stored ### on the front end after your job is finished. ### Set the name of file to which stderr will be ### redirected (if your job is jobname.com then ### set this to jobname.err for your convenience) #PBS -e test.err ### Set the name of file to which stdout will be ### redirected (if your job is jobname.com then ### set this to jobname.out for your convenience) #PBS -o test.out ### Set the mail options to send mail when job is ### started execution("b") and terminated("e") or ### interrupted by the shell("a") #PBS -m aeb ### Set the mail receivers (change this to your own address) #PBS -M nobody@asma.cmpe.boun.edu.tr ### Set the queue to submit this job. There is only ### one queue on ASMA, namely "dque". Therefore, leave ### this directive unchanged. #PBS -q dque ### Set the number of nodes that will be used. Ensure ### that the number "nodes" matches with the need of your job #PBS -l nodes=4:linda ### The following lines are executed on the master node ### of the allocated nodes. That is, if the allocated nodes ### are u108,u103,u106 and u110, the master node will be the ### first of these nodes, namely u108. The stdout and stderr ### of u108 are redirected to .out and .err files (defined above) ### locally on u108. After the job finishes, these two will be ### rcopied back to the front end (u0 or asma) ### The allocated nodes are listed in a file. The name of the ### node file is stored in the variable $PBS_NODEFILE ### The following echo lines are just for informational purposes ### --------------------------------------- ### BEGINNING OF EXECUTION ### --------------------------------------- MASTER=`hostname` echo The master node of this job is $MASTER echo The working directory is `echo $PBS_O_WORKDIR` echo This job runs on the following nodes: echo `cat $PBS_NODEFILE` NPROCS=`wc -l < $PBS_NODEFILE` echo This job has allocated $NPROCS nodes ### end of information preample ### $NODELIST is used by Gaussian98 NODELIST=`xargs echo < $PBS_NODEFILE` ### $GAUSS_FLAGS must be set and exported with -nodelist ### flag for proper Gaussian job execution. You may play ### with other flags at your will. GAUSS_LFLAGS="-kaon -kainterval 100 -nodelist '$NODELIST'" export GAUSS_LFLAGS ### set $JOBFILE to the name of your Gaussian input file JOBFILE=test.com ### Move the job file to the master node of the allocated nodes rcp u0:/home/youraccount/$JOBFILE $PBS_O_WORKDIR/$JOBFILE ### The job itself /usr/bin/time $g98root/g98/g98 < $JOBFILE