Converting PBS/Torque options to Slurm¶
This is preliminary documentation for the pilot users. It will be further refined as the pilot progresses.
See also the Slurm Rosetta Stone of Workload Managers (PDF document).
Common tasks in Torque/Moab and Slurm¶
Task |
Torque/Moab |
Slurm equivalent |
---|---|---|
Submit a job |
qsub |
sbatch |
Cancel a job |
qdel |
scancel |
List jobs in the queue |
qstat, showq |
squeue |
#PBS / qsub command line options¶
When specified in a Torque job script, the line specifying the option should start with #PBS
.
In Slurm, such lines start with #SBATCH
.
PBS/Torque |
Slurm equivalent |
---|---|
-L tasks=<X>:lprocs=<Y> |
--ntasks=<X> --cpus-per-task=<Y> |
-l walltime=<time> |
-t <time>, --time=<time> |
-N <jobname> |
-J <jobname>, --job-name=<jobname> |
-o <file> |
-o <file template>, --output=<file template> |
-e <file> |
-e <file template>, --error=<file template>, default is sending stderr to stdout |
-m abe |
--mail-type=FAIL,BEGIN,END |
-M <mailaddress> |
--mail-user=<mailaddress> |
-v <variable list> |
--export=<variable list> |
Environment variables¶
PBS variable |
Slurm variable |
---|---|
PBS_JOBID |
SLURM_JOB_ID |
PBS_JOBNAME |
SLURM_JOB_NAME |
PBS_NODENUM |
|
PBS_NODEFILE |
Replaced by a variable specifying the nodes rather than a node file: SLURM_JOB_NODELIST, SLURM_NODELIST (for backward compatibility) |
PBS_NUM_NODES |
SLURM_JOB_NUM_NODES |
PBS_NUM_PPN |
|
PBS_NP |
|
PBS_O_WORKDIR |
SLURM_SUBMIT_DIR |
PBS_WALLTIME |
No equivalent. |