This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
quick:pbspro [2015/06/11 09:34] ischeepers [Job Exit Codes >= 128 (or 256)] |
quick:pbspro [2025/09/22 17:47] (current) kevin [Example 4 : empty job] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Job submission using PBSPro ====== | ====== Job submission using PBSPro ====== | ||
| - | As of January 2014, CHPC has a new scheduler - PBSPro. | + | The CHPC system uses the PBSPro |
| - | Main user documentation can be found at http://resources.altair.com/ | + | Main user documentation can be found at [[https://www.altair.com/ |
| But here is a summary of how to submit jobs at CHPC. | But here is a summary of how to submit jobs at CHPC. | ||
| Line 26: | Line 26: | ||
| A script can include just about anything which you could do during a terminal session such as set environment variables, change directories, | A script can include just about anything which you could do during a terminal session such as set environment variables, change directories, | ||
| - | '' | + | > Job script files can be named to anything allowed for a regular file, but it is strongly recommended that you use '' |
| Line 50: | Line 50: | ||
| '' | '' | ||
| + | |||
| + | ====How to monitor job arrays==== | ||
| + | |||
| + | To see the array job status on the queue, postfix the | ||
| + | jobnumber with empty square brackets: | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | To look at one specific job in the array, add '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | eg | ||
| + | |||
| + | '' | ||
| + | |||
| Line 91: | Line 109: | ||
| - | ===== Example 2 (a) : Amber job on GPU nodes (NB: For other executables e.g. python and sender, see example 2(b)) ===== | + | ===== Examples: Amber jobs ===== |
| - | < | ||
| - | #!/bin/sh | ||
| - | #PBS -N eric.job | ||
| - | #PBS -l select=1: | ||
| - | #PBS -l walltime=1: | ||
| - | #PBS -q kepla_k20 | ||
| - | #PBS -m be | ||
| - | #PBS -o / | ||
| - | #PBS -e / | ||
| - | #PBS -M email@mail.com | ||
| - | cd $PBS_O_WORKDIR | + | [[howto: |
| - | pwd | ||
| - | echo "My job starts here" | ||
| - | date | ||
| - | source / | ||
| - | module add intel-XE/ | ||
| - | module add amber/k20 | ||
| - | exe=pmemd.cuda.MPI | ||
| - | nproc=`cat $PBS_NODEFILE|wc -l` | ||
| - | time mpirun -np $nproc -machinefile $exe -O -i mdin -o mdout -p prmtop -c inpcrd | ||
| - | echo "My job ends here" | ||
| - | date | ||
| - | </ | ||
| - | ===== Example | + | ===== Example: |
| - | < | ||
| - | #!/bin/sh | ||
| - | #PBS -N eric.job | ||
| - | #PBS -l select=1: | ||
| - | #PBS -l walltime=1: | ||
| - | #PBS -q workq | ||
| - | #PBS -m abe | ||
| - | #PBS -o / | ||
| - | #PBS -e / | ||
| - | #PBS -M email@mail.com | ||
| - | cd $PBS_O_WORKDIR | + | [[howto: |
| - | pwd | ||
| - | |||
| - | source / | ||
| - | module add intel-XE/ | ||
| - | |||
| - | echo "My job starts here" | ||
| - | date | ||
| - | |||
| - | exe=sander.MPI | ||
| - | |||
| - | nproc=`cat $PBS_NODEFILE|wc -l` | ||
| - | time mpirun -np $nproc -machinefile $exe -O -i mdin -o mdout -p prmtop -c inpcrd | ||
| - | echo "My job ends here" | ||
| - | date | ||
| - | </ | ||
| - | |||
| - | ===== Example 3 : Quantum Espresso job ===== | ||
| - | |||
| - | < | ||
| - | #!/bin/sh | ||
| - | ###These lines are for PBSpro | ||
| - | #PBS -N QEspresso | ||
| - | #PBS -l select=2: | ||
| - | #PBS -l walltime=24: | ||
| - | #PBS -q workq | ||
| - | #PBS -m be | ||
| - | #PBS -o stdout | ||
| - | #PBS -e stderr | ||
| - | ##### Environment Settings | ||
| - | source / | ||
| - | module add intel-XE/ | ||
| - | module add QEspresso/ | ||
| - | ##### Running commands | ||
| - | NP=`cat $PBS_NODEFILE | wc -l` | ||
| - | cd $PBS_O_WORKDIR | ||
| - | mpirun -f $PBS_NODEFILE -r ssh -ib -env I_MPI_DEBUG 2 -np $NP pw.x -npool 3 -inp inputfile.inp | ||
| - | </ | ||
| ===== Example 4 : empty job ===== | ===== Example 4 : empty job ===== | ||
| Line 192: | Line 141: | ||
| #< | #< | ||
| #< | #< | ||
| - | #< | + | #< |
| #< | #< | ||
| Line 199: | Line 148: | ||
| </ | </ | ||
| - | //Note that the M9000 sparc queue is called ' | + | |
| ===== Example 5 : MPI example ===== | ===== Example 5 : MPI example ===== | ||
| Line 211: | Line 160: | ||
| ... | ... | ||
| </ | </ | ||
| - | |||
| - | ===== Example 6 : job array ===== | ||
| - | See [[howto: | ||
| - | <file bash simple_job_array.pbs> | ||
| - | #! /bin/bash | ||
| - | #PBS -l select=1: | ||
| - | #PBS -l walltime=00: | ||
| - | #PBS -o / | ||
| - | #PBS -e / | ||
| - | #PBS -M youremail@address.com | ||
| - | #PBS -m abe | ||
| - | #PBS -N J_example | ||
| - | #PBS -J 1-24 | ||
| - | |||
| - | |||
| - | # Make sure we're in the right working directory | ||
| - | cd / | ||
| - | |||
| - | #sleep a random number of seconds (<10) | ||
| - | sleep $[ ( $RANDOM % 10 ) + 1 ]s | ||
| - | |||
| - | #see what happens when we write to a file... | ||
| - | echo " | ||
| - | echo " | ||
| - | echo " | ||
| - | </ | ||
| - | |||
| - | Thing to note: the stdout and stderr outputs do not all get joined together as they might with an mpi job. | ||
| - | |||
| ===== Further examples ===== | ===== Further examples ===== | ||
| * Various [[howto: | * Various [[howto: | ||
| * This [[howto: | * This [[howto: | ||