Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


labelPBS Directives

The filenames, paths, email addresses, and some values below are things you will probably need to change. In some cases, values/names have been used to demonstrate possibilities that you could employ (in a slightly different way). Apart from the -l options, no option should appear on multiple lines.


Description of purpose

#PBS -c n
#PBS -c s
#PBS -c enabled

No checkpointing to be performed.
Checkpointing is to be done on a job at pbs_mom shutdown.
Checkpointing is allowed but must be explicitly invoked by a qhold or qchkpt command.

#PBS -d /fast/jc123456

Defines the working directory path to be used for the job.

#PBS -j oe
#PBS -o /tmp/output.$PBS_O_JOBID

Merge standard output and standard error streams into the named file.

#PBS -l pmem=8gb
#PBS -l nodes=1:ppn=2
#PBS -l walltime=24:00:00

Request that 4GB of memory be reserved for the batch job.
Request that 2 CPU cores on 1 host be reserved for the batch job.
Advise the scheduler that this job will have completed within 24 hours.

#PBS -l nodes=2 -I -X

Request 2 CPU cores that can be used for interactive job(s).
Note: Our 2 login nodes each provide 18 CPU cores and 64GB of memory for running interactive jobs (without qsub).

#PBS -m ae

Send mail at batch job abort/exit to the Email address provided.

#PBS -N job_name

Assign a name (job_name) to the batch job

#PBS -q normal
#PBS -q bigmem

Specify the queue into which your job will be placed.
Note: The bigmem queue targets two nodes only, long delays can be experienced before your job is run.


Export environment variables to the batch job

While defaults exist for many options, HPC staff ask researchers to specify CPU core, memory, and walltime requirements as accurately as possible.

A -W option can be used for more complicated tasks such as job dependencies, stage-in and stage-out. Researchers may wish to consult with HPC staff with regard to use of the -W options. A man qsub will provide more information and more options than provided above.

labelPBS Variables

The variables listed in the table below are commonly used within a PBS script file.




Job name specified by the user


Working directory from which the job was submitted


Home directory of user submitting the job


Name of user submitting the job


Script shell


Unique PBS job id


Host on which job script is running


Name of the job queue


File containing line delimited list on nodes allocated to the job


Path variable used to locate executables within the job script

Note: On multi-core systems, a node (line in PBS_NODEFILE) will identify the hostname and a CPU core.