Slurm Command Reference¶
Quick-reference tables of common Slurm commands and #SBATCH directives for Ngarrgu Tindebeek (NT), OzSTAR, and Trevor.
Common Slurm commands¶
Command |
Purpose |
Example |
|---|---|---|
|
Submit a batch script to the queue |
|
|
Open an interactive shell on a compute node |
|
|
Cancel one, pending, or all of your jobs |
|
|
List queued and running jobs (use |
|
|
Show cluster resource allocation status (detailed or summary) |
|
|
List available backfill slots |
|
|
Inspect partition summary, node states, CPUs, RAM, and GPUs |
|
|
Display detailed metadata and status for an active or recent job |
|
|
Print a CPU, memory, and efficiency summary for a job |
|
|
Query accounting history for completed or failed jobs |
|
Note
Do not poll squeue in tight loops such as watch squeue; use the Web Job Monitor for live updates. Note also that scontrol update is disabled for user jobs — cancel and resubmit to change pending job options.
Common #SBATCH directives¶
Place #SBATCH directives immediately after the shebang line (#!/bin/bash) at the top of your batch script (see Requesting Resources and Interactive Jobs).
Short |
Long |
Description |
|---|---|---|
|
|
Allocate |
|
|
Request |
— |
|
Place |
|
|
Allocate |
|
|
Maximum walltime (always specify explicitly; check live partition limits with |
— |
|
Maximum total RAM per node (default units MiB; |
— |
|
Maximum RAM per allocated core (always specify explicitly; excessive per-core values are rejected). |
— |
|
Request node-local scratch at |
— |
|
Request |
|
|
Charge usage to |
|
|
Set a short job name shown in queue listings and the Web Job Monitor. |
|
|
Write standard output (and standard error unless |
|
|
Write standard error to a separate |
|
|
Set the working directory before running the batch script. |
|
|
Submit a job array (for example, |
— |
|
Email notifications on state changes (for example, |
— |
|
(Optional) Override the recipient email address for |
— |
|
Attach a metadata tag to the job (mandatory for LIGO accounting; see Tracking LIGO Job Usage). |
For the complete list of directives and filename replacement symbols, run man sbatch on a login node or consult the Slurm sbatch documentation.
Next steps¶
Creating and Submitting Jobs — write and submit your first batch script.
Requesting Resources and Interactive Jobs — memory ceilings, core-multiple rules, GPUs, and interactive limits.
Job Script Examples — complete scripts combining these directives for common workflows.