Error · SLURM · 3 min read

OUT_OF_MEMORY: Some of the step tasks have been OOM Killed

Example
slurmstepd: error: Detected 1 oom_kill event in StepId=123456.batch. Some of the step tasks have been OOM Killed.

That is the line SLURM writes into the job's output when the cluster enforces memory limits through cgroups (the wording is from SLURM's source code; the job id and the count are an example). sacct and squeue then show the job's state as OUT_OF_MEMORY (short form OOM).

Checked against the docs · SLURM 26.05 · Last checked 11 November 2026 · Spot a mistake? Tell us

Short answer

The job used more memory than it was allowed, and SLURM stopped it. Compare what it used (MaxRSS in sacct) with what it asked for (ReqMem), then ask for more memory with --mem or --mem-per-cpu in the job script.

What does this error mean?

Every SLURM job asks for an amount of memory, either per node (--mem) or per CPU it is given (--mem-per-cpu). If you ask for nothing, the cluster's default applies (DefMemPerNode or DefMemPerCPU, set by the administrators). The SLURM documentation describes the state OUT_OF_MEMORY as "Job experienced out of memory error": the job used more than its share, and SLURM stopped it.

Two notes from the sbatch page explain surprises:

  • Memory requests are enforced only if the cluster is configured to enforce them, so the same job may die on one cluster and survive on another.
  • The memory of SLURM's own helper process on each node (slurmstepd, typically 20 to 200 MiB) counts toward the job's total.

What usually causes it?

  • A request too small for the calculation, often because none was given and the cluster's default is low.
  • A per-CPU request that does not fit the job. With --mem-per-cpu, the job's total is that value times the CPUs it is given; a job whose memory does not divide evenly across its CPUs can still run out.

What should I try, in order?

  1. Confirm it and see how much the job used. After it ends:

    Example
    sacct -j 123456 --format=JobID,State,ReqMem,MaxRSS,Elapsed

    123456 is an example job id. State reads OUT_OF_MEMORY; ReqMem is what the job asked for; MaxRSS is the largest resident memory of its tasks. While a job is still running, sstat -j 123456 --format=JobID,MaxRSS reads the same figure for a running step.

  2. Ask for more memory. This is the fix the sbatch page describes: raise --mem (per node) or --mem-per-cpu (per CPU) in the job script, for example #SBATCH --mem=64G. The unit is MiB unless you add K, M, G or T, and the two options cannot be combined. scontrol show config shows the cluster's defaults and maxima (DefMemPerNode, MaxMemPerNode, DefMemPerCPU, MaxMemPerCPU) where they are set; --mem=0 is a special case that gives the job all the memory on each node.

  3. Use more nodes. --mem is per node, so the same request on more nodes gives the job more memory in total.

  4. Make the calculation smaller in memory: the settings that set its size, such as the cutoff and the k-point mesh for VASP. See Fix a job that ran out of memory or walltime and Use your cores well.

Verlet recognizes an out-of-memory end in the job's output and shows it in Analyze; everything on this page works without it.

Updated
12 November 2026
Applies to
SLURM 26.05
Source check
Checked against the docs, 11 November 2026

Where can I read more?

The SLURM documentation (version 26.05):

  • sbatch: --mem, --mem-per-cpu and their defaults
  • sacct: the State, ReqMem and MaxRSS fields
  • sstat: memory of a running job step
  • Job State Codes: OUT_OF_MEMORY and the other end states
  • slurm.conf: DefMemPerCPU, MaxMemPerNode and how memory limits are enforced

What was this page checked against?

Checked against SLURM 26.05, 11 November 2026; sbatch re-read 12 November 2026. Every statement about SLURM was read against these pages (the version is from each page's header): sbatch, sacct, sstat, Job State Codes and slurm.conf. The log line's wording was read in SLURM's source code on the 26.05 branch (task_cgroup_memory.c). Every link on this page was opened.