Batch Job Translation Guide
Translation Tables
User Commands
The table below contains command translation that would be run from the login nodes of the cluster for job control and monitoring purposes.
User Commands | LSF | Slurm | PBS/Torque |
---|---|---|---|
Job submission | bsub [script_file] | sbatch [script_file] | qsub [script_file] |
Job deletion | bkill [job_id] | scancel [job_id] | qdel [job_id] |
Job status (by job) | bjobs [job_id] | squeue --job [job_id] | qstat [job_id] |
Job status (by user) | bjobs -u [user_name] | squeue -u [user_name] | qstat -u [user_name] |
Queue list | bqueues | squeue | qstat -Q |
Environment Variables
The table below lists environment variables translations that can be useful in a job file.
Environment Variables | LSF | Slurm | PBS/Torque |
---|---|---|---|
Job ID | $LSB_JOBID | $SLURM_JOBID | $PBS_JOBID |
Submit Directory | $LSB_SUBCWD | SLURM_SUBMIT_DIR | $PBS_O_WORKDIR |
Job Specifications
The table below lists translations for various directives that set characteristics and resources requirements for jobs.
Job Specification |
LSF |
Slurm |
PBS/Torque |
---|---|---|---|
Script directive |
#BSUB |
#SBATCH |
#PBS |
Node Count |
N/A |
-N [min[-max]] |
-l nodes=[count] |
CPUs Per Node |
-R "span[ptile=count]" |
--ntasks-per-node=[count] |
-l ppn=[count] |
CPU Count |
-n [count] |
-n [count] |
N/A |
Wall Clock Limit |
-W [hh:mm] |
-t [min] or -t[days-hh:mm:ss] |
-l walltime=[hh:mm:ss] |
Memory Per Core |
-M [mm] AND |
--mem-per-cpu=mem[M/G/T] |
-l mem=[mm] |
Standard Output File |
-o [file_name] |
-o [file_name] |
-o [file_name] |
Standard Error File |
-e [file_name] |
-e [file_name] |
-e [file_name] |
Combine stdout/err |
(use -o without -e) |
(use -o without -e) |
-j oe (both to stdout) OR -j eo (both to stderr) |
Event Notification |
-B and/or -N |
--mail-type=[ALL/END] |
-m [a/b/e] |
Email Address |
-u [address] |
--mail-user=[address] |
-M [address] |
Job Name |
-J [name] |
--job-name=[name] |
-N [name] |
Account to charge |
-P [account] |
-account=[account] |
-l billto=[account] |
Queue |
-q [queue] |
-q [queue] |
-p [queue] |
Advanced Documentation
This guide only covers the most commonly used options and useful commands.
For more information on Slurm batch options: Official Slurm Documentation
For more information on LSF batch options: Official LSF Documentation
For more information on PBS batch options: Official Altair Documentation