# ### Example PBS script file ### Provided to show useful options when creating a PBS job script ### ### Submit jobs with 'qsub jobfilename' ### ### ### Job name #PBS -N jobname ### Declare job non-rerunable #PBS -r n ### Output files #PBS -e jobname.err #PBS -o jobname.log ### Mail directives ### -m send mail on (a)bort (b)egin (e)nd #PBS -m abe #PBS -M username@physics.purdue.edu ### Queue name (always default) #PBS -q default ### Number of nodes (want 6 nodes, 2 processors per node) #PBS -l nodes=6:ppn=2 ### I specify qos=1, and PBS will pick something available #PBS -W qos=1 # export all my environment variables to the job #PBS -V # # PBS_NODEFILE the name of the file contain the list of nodes assigned # to the job (for parallel and cluster systems). ### # Change to working directory cd $HOME/working_directory # Create scratch directory on the execution node mkdir /scratch/$PBS_JOBID # Copy data files into scratch directory cp $HOME/working_directory/data_files/* /scratch/$PBS_JOBID # cd into the /scratch directory cd /scratch/$PBS_JOBID # Run your executable. Use -machinefile $PBS_NODEFILE to tell mpirun # to use the nodes that PBS has assigned to the job mpirun -np 12 -machinefile $PBS_NODEFILE parallel-exe # Copy files back home and cleanup cp * $HOME/working_directory/output