Submit a job


Charlie uses a job submission engine called PBS Pro. To submit jobs to a node on Charlie, use the qsub command (/opt/pbs/bin/qsub). Upon successful submission of a job, you will receive a job id, a unique 6 or 7 digit number. Job id's are issued in sequential order and can be used to look up your job using qstat.

Submit a job from the command line

To submit a job from the command line, use the qsub command followed by the arguments/options (below).

Start an interactive session (i.e. log into a node through PBS):

qsub -I -N jobname -l ncpus=12,mem=20GB

Start a script:

qsub -N jobname -l ncpus=12,mem=20GB -- /bin/sh /mnt/dir/

Submit a job from a script

To submit a job using a shell script, include the arguments/options (below) at the beginning of the script, using the #PBS prefix. Normally in a shell script, anything after a hash (#) is a comment, however #PBS is a special operator that specifies PBS options. To run your script (example below) use qsub /path/to/


#PBS -N jobname # name
#PBS -q route # use the default route queue
#PBS -V # copy environment variables

#PBS -l ncpus=1,mem=1gb # request 1 cpu and 1GB of memory
#PBS -l walltime=00:10:00 # request 10 minutes of runtime (HH:MM:SS)

# Load modules
module use /mod/bigelow # use the default bigelow modules
module load R # load the R module
# etc...


Use the following options when using qsub to customize the job parameters and select resources to request.





Start time ([[[[CC]YY]MM]DD]hhmm[.SS] where CC=century, YY=year, MM=month, DD=day of the month, hh=hour, mm=minute, SS=seconds)

qsub -a 201901201000


Error directories

qsub -e /home/<username>/error



qsub -I


Range of job array (start-end[:step])

qsub -J 2-8:2


Request options (more below)

qsub -l ncpus=2,mem=4GB


Email job status (b=begin, e=end, a=abort)

qsub -m bea


Name of job

qsub -N Example


Output directories

qsub -o /home/<username>/out


Queue (see queue list)

qsub -q low


Pass environment variables with job

qsub -V


Use X-Window for GUI applications (should be used with interactive jobs; -I)

qsub -X -I

List of job requirements (-l)





Number of CPU nodes

qsub -l ncpus=2


Number of GPUs

qsub -l ngpus=1


Amount of memory (RAM)

qsub -l mem-4GB


Model (e.g. c1, c2, c3)

qsub -l model=c1


Specific node (e.g. c3-20)

qsub -l vnode=c4-2


Walltime (HH:MM:SS)

qsub -l walltime=05:00:00


Nodes (see below)

qsub -l select=1

Resource requests can be combined using commas between. You can use any combination as long as it starts with a select.

E.g. Start a job with 2 cpus and 4GB memory (RAM) that will run on a node in the c3 cluster in under 5 hours:

qsub -l ncpus=2,mem=4GB,walltime=05:00:00,model=c3


c1 and c2 are shared memory systems, so you do not need to use the select argument. c3 is a cluster of nodes with 24 cpus and 32GB of memory each. To use more than one node on c3, use the select argument. Note that parameters are separated with colons instead of commas.

E.g. to request 3 nodes, each with 24 CPUs and 30GB of memory:

qsub -l select=3:ncpus=24,mem=30GB

A note on job arrays (-J)

Job arrays are a way to efficiently organize and submit multiple similar jobs. The PBS scheduler treats each sub-job in the job array as an individual job in the queue specified by the job array. Since job arrays are often large and can take up a significant amount of resources, we recommend submitting them to the low priority queue, so that other individual jobs can still be scheduled in the meantime.


# Request interactive job
qsub -I -l ncpus=1,mem=1gb

# Request interactive job on c4
qsub -I -l ncpus=1,mem=1gb,model=c4

# Request interactive job on c4-2
qsub -I -l ncpus=1,mem=1gb,model=c4-2

# Request interactive job with a GPU
qsub -I -q gpu -l ncpus=1,ngpus=1,mem=1gb

# Request interactive job with X Window (GUI) support
qsub -I -X -l ncpus=1,mem=1gb

# Run command using high priority queue
qsub -q high -l ncpus=1,mem=1gb -- /mnt/dir/command

# Run PBS submission script
qsub /path/to/

Still need help? Submit a ticket.

How did we do?

Job status (qstat)

Powered by HelpDocs (opens in a new tab)