SGE-to-Slurm Quick Start Guide


Scope

Blueprints 24-04 and later have the option to use Slurm (instead of SGE) as the job scheduler for submitting jobs to the grid. This page provides information to help users move from SGE to Slurm.

External Resources

There are many resources available online, related to this topic. For more information, consider referencing:

  • Rosetta Stone of Workload Managers -- Lists the most common commands, environment variables, and job specification options used by SGE and Slurm, as well as other major workload management systems.
  • Summary Page of Slurm Commands -- Lists the most common commands and options used by Slurm, organized by task.
  • Slurm public documentation -- Comprehensive documentation for Slurm, including an archive with documentation of previous versions of Slurm.

Quick Start

Submitting NONMEM jobs with Slurm

bbr supports submitting NONMEM jobs with Slurm. This support was added in bbr 1.13.0 and bbi v3.4.0 (both released in January 2025).

Users can specify Slurm directly, via the .mode argument, like submit_model(..., .mode = "slurm"). Note that the .mode argument defaults to checking options("bbr.bbi_exe_mode"), so Slurm users may find it easiest to add the following line to their project's .Rprofile file, to avoid needing to specify .mode in each submit_model() call.

options("bbr.bbi_exe_mode" = "slurm")

PsN and Pirana also support submitting jobs via Slurm. Please consult the PsN and Pirana documentation for more detail.

Interacting directly with Slurm

This table contains several of the most common SGE commands, mapped to the analogous Slurm commands. We recommend referencing the Slurm documentation, linked above, for more detail on the options available for each of these commands.

Task SGE Slurm
Submit a job qsub sbatch
Delete a job qdel scancel
Queue status qstat squeue
Available nodes qstat -f sinfo

squeue options

The -o option for squeue can be used to format the output. Try the following command, for a view that is similar to qstat output that SGE users may be familiar with:

squeue -o "%.8i %.20j %.8u %.12T %.10M %.6C %.6D %R"

sbatch replacements for common qsub options

One often-used submission option is to request a certain number of CPU cores for a given job.

  • With SGE this is done with qsub -pe orte [CPU count] [script to submit]
  • With Slurm, instead use sbatch -n [CPU count] [script to submit]