Skip to end of metadata
Go to start of metadata

 

Quick Guide to translating features from Torque/MOAB to SLURM

User CommandsPBS/TorqueSlurm
Job submissionqsub [script_file]sbatch [script_file]
Job deletionqdel [job_id]scancel [job_id]
Job status (by job)qstat [job_id]squeue [job_id]
Job status (by user)qstat -u [user_name]squeue --user=[user_name]
Job holdqhold [job_id]scontrol hold [job_id]
Job releaseqrls [job_id]scontrol release [job_id]
Queue listqstat -Qsqueue
Node listpbsnodes -lsinfo --Node OR scontrol show nodes
Cluster statusqstat -asinfo

Environment Variables

 
Job ID$PBS_JOBID$SLURM_JOBID
Submit Directory$PBS_O_WORKDIR$SLURM_SUBMIT_DIR
Submit Host$PBS_O_HOST$SLURM_SUBMIT_HOST
Node List$PBS_NODEFILE$SLURM_JOB_NODELIST
Job Array Index$PBS_ARRAYID$SLURM_ARRAY_TASK_ID
Job Specification 
Script directive#PBS#SBATCH
Queue-q [queue]--partition=[queue]
Node Count-l nodes=[count]--nodes=[min[-max]]
CPU Count-l ppn=[count]--ntasks-per-node=[count]
Wall Clock Limit-l walltime=[hh:mm:ss]--time=[min] OR --time=[days-hh:mm:ss]
Standard Output FIle-o [file_name]--output=[file_name]
Standard Error File-e [file_name]--error=[file_name]
Combine stdout/err-j oe (both to stdout) OR -j eo (both to stderr)(Default if you don't specify --error)
Copy Environment-V--export=[ALL | NONE | variables]
Event Notification-m abe--mail-type=[events]
Email Address-M [address]--mail-user=[address]
Job Name-N [name]--job-name=[name]
Job Restart-r [y|n]--requeue OR –no-requeue
Working DirectoryN/A (always current working directory)--workdir=[dir_name]
Resource Sharing-l naccesspolicy=singlejob--exclusive OR--shared
Memory Size-l mem=[MB]--mem=[mem][M|G|T] OR –mem-per-cpu=[mem][M|G|T]
Account to charge-W group_list=[account]--account=[account]
Tasks Per Node-l mppnppn [PEs_per_node]--tasks-per-node=[count]
CPUs Per Task --cpus-per-task=[count]
Job Dependency-d [job_id]--depend=[state:job_id]
Job Project --wckey=[name]
Job host preference --nodelist=[nodes] AND/OR –exclude=[nodes]
Quality Of Service-l qos=[name]--qos=[name]
Job Arrays-t [array_spec]--array=[array_spec]
Generic Resources-l other=[resource_spec]--gres=[resource_spec]
Licenses --licenses=[license_spec]
Begin Time-A "YYYY-MM-DD HH:MM:SS”--begin=YYYY-MM-DD[THH:MM[:SS]]

Long options are being shown here for clarity. Most long options have shorthand available (e.g. "--partition=commons" becomes "-p commons") Check the online manual for details and for options not mentioned here (man sbatch or sbatch --help)

 

Printable version

http://slurm.schedmd.com/rosetta.html