This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
quick:pbspro [2014/01/06 12:10] andyr |
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. | ||
| - | The following must be **plain text** files, as created by unix programs like '' | + | =====Common PBS commands===== |
| - | Example 1 : Gaussian | + | * '' |
| - | < | + | |
| - | #PBS -N eric.job | + | |
| - | #PBS -l select=8: | + | |
| - | #PBS -l select=1: | + | * '' |
| - | #PBS -l walltime=1: | + | |
| - | #PBS -q workq | + | |
| - | #PBS -m be | + | |
| - | #PBS -o / | + | |
| - | #PBS -e / | + | |
| - | #PBS | + | |
| - | cd $PBS_O_WORKDIR | ||
| - | source / | ||
| - | module add gaussian/ | ||
| - | g09 < eric.com > sibusiso.log | ||
| - | </ | ||
| - | Example 2 : Amber job | + | ====How to submit a batch job==== |
| - | < | + | Use the '' |
| - | #PBS -N eric.job | + | |
| - | #PBS -l select=1: | + | |
| - | #PBS -l walltime=1: | + | |
| - | #PBS -q kepla_k20 | + | |
| - | #PBS -m be | + | |
| - | #PBS -o /export/home/embele/amber/ | + | |
| - | #PBS -e / | + | |
| - | #PBS | + | |
| - | cd $PBS_O_WORKDIR | + | |
| - | exe=/ | + | |
| - | ### | + | |
| - | source / | + | |
| - | module add intel-XE/ | + | |
| - | module add intel-XE/ | + | |
| - | nproc=`cat $PBS_NODEFILE|wc -l` | + | |
| - | time mpirun -np $nproc -machinefile $PBS_NODEFILE $exe -O -i mdin -o mdout -p prmtop -c inpcrd | + | |
| - | </ | + | |
| + | See the '' | ||
| - | Example 3 : empty job | + | The first line of a script file may specify the interpreter, |
| + | |||
| + | 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 '' | ||
| + | |||
| + | |||
| + | ====How to start an interactive job on a compute node==== | ||
| + | |||
| + | '' | ||
| + | |||
| + | to start an interactive session, retaining all environment variables. | ||
| + | |||
| + | |||
| + | ====How to monitor job submissions to the queue==== | ||
| + | |||
| + | The job number will be returned if the job has been accepted by the scheduler. Use this | ||
| + | number to check on the progress of a specific job: | ||
| + | |||
| + | '' | ||
| + | |||
| + | To inspect jobs that have already finished: | ||
| + | |||
| + | '' | ||
| + | |||
| + | or | ||
| + | |||
| + | '' | ||
| + | |||
| + | ====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 | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | |||
| + | =====PBS-Pro Job Exit Codes ===== | ||
| + | |||
| + | ====Job Exit Codes Between 0 and 128 (or 256)==== | ||
| + | This is the exit value of the top process in the job, typically the shell. This may be the exit value of the last command executed in the shell or the .logout script if the user has such a script (csh). | ||
| + | |||
| + | ====Job Exit Codes >= 128 (or 256)==== | ||
| + | This means the job was killed by the PBS scheduler by sending it a signal. | ||
| + | |||
| + | The **modulo** or **remainder** operator [[http:// | ||
| + | |||
| + | |||
| + | The signal is given by X modulo 128 (or 256). An exit value of 137 means the job's top process was killed with signal 9 because '' | ||
| + | |||
| + | Depending on the system, a value greater than 128 or 256, see '' | ||
| + | |||
| + | Exit code 271 means that the job exceeded the limit requested at submission, eg. walltime or cpu usage, and was killed. | ||
| + | |||
| + | See '' | ||
| + | ====Terminate a job by signal==== | ||
| + | Send a signal to the job | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | ===== Examples: PBS-Pro job submission scripts ===== | ||
| + | |||
| + | [[howto: | ||
| + | |||
| + | ===== Examples: Gaussian jobs ===== | ||
| + | |||
| + | |||
| + | [[howto: | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Examples: Amber jobs ===== | ||
| + | |||
| + | |||
| + | [[howto: | ||
| + | |||
| + | |||
| + | |||
| + | ===== Example: Quantum Espresso ===== | ||
| + | |||
| + | |||
| + | [[howto: | ||
| + | |||
| + | |||
| + | ===== Example 4 : empty job ===== | ||
| < | < | ||
| + | #! /bin/sh | ||
| #PBS -N < | #PBS -N < | ||
| - | #PBS -l select=<totalcores>:ncpus=1:select=<hosts>: | + | #PBS -l select=<numberofnodes>: |
| #PBS -l walltime=< | #PBS -l walltime=< | ||
| #PBS -q < | #PBS -q < | ||
| Line 59: | Line 133: | ||
| #PBS -o <path to your output file> | #PBS -o <path to your output file> | ||
| #PBS -e <path to your error file> | #PBS -e <path to your error file> | ||
| - | Where | + | source / |
| - | < | + | cd $PBS_O_WORKDIR |
| - | < | + | |
| - | < | + | #Where |
| - | < | + | #< |
| - | < | + | #< |
| + | #< | ||
| + | #< | ||
| + | #< | ||
| + | #< | ||
| + | |||
| + | mpirun -np < | ||
| </ | </ | ||
| - | i | ||
| - | Note that the M9000 sparc queue is called ' | ||
| + | |||
| + | |||
| + | ===== Example 5 : MPI example ===== | ||
| + | |||
| + | Syntax | ||
| + | < | ||
| + | ... | ||
| + | #PBS -l walltime=$HOURS: | ||
| + | #PBS -l select=${NO_OF_HOSTs}: | ||
| + | #PBS -q $QUEUE | ||
| + | ... | ||
| + | </ | ||
| + | ===== Further examples ===== | ||
| + | * Various [[howto: | ||
| + | * This [[howto: | ||