Dartmouth Research Computing & Data (RCD) logo
  • Home 
  • HPC 
  • AI 
  • Services 
  • Status 
  • About Us 

  •   Search this site
  •  
  1.   HPC
  1. Home
  2. HPC
  3. Torque & Slurm Equivalent Commands

Torque & Slurm Equivalent Commands

  • Environment Variables
  • Job Directives
  • User Commands

Environment Variables  

Option MOAB Torque command (mksub) Slurm command (sbatch)
Job Name $PBS_JOBNAME $SLURM_JOB_NAME
Job ID $PBS_JOBID $SLURM_JOB_ID
Submit directory $PBS_O_WORKDIR $SLURM_SUBMIT_DIR
Submit host $PBS_O_HOST $SLURM_SUBMIT_HOST
Node list $PBS_NODEFILE $SLURM_JOB_NODELIST
Queue name $PBS_QUEUE $SLURM_JOB_PARTITION
Allocated nodes $PBS_NUM_NODES $SLURM_JOB_NUM_NODES
Number of processes $PBS_NP $SLURM_NTASKS
Number of processes per node $PBS_NUM_PPN $SLURM_TASKS_PER_NODE
Array ID $PBS_ARRAYID $SLURM_ARRAY_TASK_ID

Job Directives  

Option MOAB Torque command (mksub) Slurm command (sbatch)
Job Name -N <name> --job-name=<name>
Account -a <account> --account=<account>
Queue -q <queue> --partition=<name>
Node Count nodes=<number of nodes> --nodes=<count>
Process count per node ppn=<number of cores> --ntasks-per-node=<count>
Core Count (per process) --cpus-per-task=<cores>
Wall time limit walltime=<hh:mm:ss> --time=<hh:mm:ss>
GPU request -gpus=<count> --gres=gpu:<count>
Memory limit --mem=<limit> (in MB)
Standard output file -o=<file path> --output=<file path>
Standard error file -e=<file path> --error=<file path>
Combine stdout/stderr to stdout -j oe --output=<combined out and err file path>
Job array -t <number of array indices> --array=<array indices>
Copy environment --export=ALL
(default --export=NONE, no export)
Job dependency --dependency=after:jobID[:jobID...]
--dependency=afterok:jobID[:jobID...]
--dependency=afternotok:jobID[:jobID...]
--dependency=afterany:jobID[:jobID...]
Job status notification -m bea --mail-type=BEGIN,END,FAIL
Email address -M <email address> --mail-user=<email address>
Append to job file --open-mode=append
Specify a compute node hostlist=<name of compute node> --nodelist=<name of compute node>
Email before job termination qnotify; #SBATCH --signal=B:USR1@70;

User Commands  

Option MOAB Torque command (mksub) Slurm command (sbatch)
Job Submission mksub <file name> sbatch <file name>
Job Deletion qdel / mjobctl -c scancel
Job Status showq / qstat squeue
Detailed job info checkjob <job id> scontrol show job <job id>
Interactive job mksub -I srun --pty /bin/bash
Queue/Partition pbsnodes sinfo
 SRUN
Investing in Discovery 
Copyright © 2025 Dartmouth Research Computing & Data | Powered by Hinode.
Dartmouth Research Computing & Data (RCD)
Code copied to clipboard