PBS to Slurm Conversion

The Cheat Sheet for converting from PBS to Slurm

This page is provided to help convert old (pre-2020) MSI job scripts from PBS format to Slurm format. New job scripts should be written for the Slurm scheduler.

The following tabs lists common commands and terms used with the TORQUE/PBS scheduler and the corresponding commands and terms used under the Slurm scheduler. These sheets can be used to assist in translating your existing PBS scripts into Slurm scripts to be read by the new scheduler, or as a reference when creating new Slurm job scripts. 

User Commands

User Commands



Submit job

qsub [script_file]

sbatch [script_file]

Cancel job

qdel [job_id]

scancel [job_id]

View job status (by job)

qstat [job_id]

squeue [job_id]

View job status (by user)

qstat -u [user_name]

squeue -u [user_name]

Hold job

qhold [job_id]

scontrol hold [job_id]

Release job hold

qrls [job_id]

scontrol release [job_id]

View available partitions 

qstat -Q


View available nodes 

pbsnodes -l

sinfo -N OR scontrol show nodes

View cluster status

qstat -a


Environment Variables




Job ID



Submit Directory



Submit Host



Node List



Job Array Index



Resource Request Specifications

Job Specification



Directive prefix#PBS#SBATCH
Queue/Partition-q [name]-p [name]

Node Count

-l nodes=[count]

-N [min[-max]]     *Autocalculates this if just task # is given

Total Task Count

-l ppn=[count] OR -l mppwidth=[PE_count]

-n OR --ntasks=ntasks

Wall Clock Limit

-l walltime=[hh:mm:ss]

-t [min] OR -t [days-hh:mm:ss]

Standard Output File

-o [file_name]

-o [file_name]

Standard Error File

-e [file_name]

-e [file_name]

Combine stdout/err

-j oe (both to stdout) OR -j eo (both to stderr)

(use -o without -e)

Copy Environment


--export=[ALL | NONE | variables]

Event Notification

-m abe


Email Address

-M [address]


Job Name

-N [name]


Job Restart

-r [y | n]

--requeue OR --no-requeue

Resource (Node) Sharing

-l naccesspolicy=singlejob

--exclusive OR --shared

Memory (RAM) Size

-l mem=[MB]

--mem=[mem][M | G | T] OR --mem-per-cpu=[mem][M | G | T]

Accounts to charge

-A OR -W group_list=[account]

--account=[account] OR -A

Tasks Per Node

-l mppnppn [PEs_per_node]


CPUs Per Task



Job Dependency

-d [job_id]


Quality of Service

-l qos=[name]

--qos=[normal | high]

Job Arrays

-t [array_spec]


Generic Resources

-l other=[resource_spec]


Job Enqueue Time



Discover Advanced Computing and Data Solutions at MSI

Our Services