Error · SLURM · 3 min read
OUT_OF_MEMORY: Some of the step tasks have been OOM Killed
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?
-
Confirm it and see how much the job used. After it ends:
Examplesacct -j 123456 --format=JobID,State,ReqMem,MaxRSS,Elapsed123456is an example job id.StatereadsOUT_OF_MEMORY;ReqMemis what the job asked for;MaxRSSis the largest resident memory of its tasks. While a job is still running,sstat -j 123456 --format=JobID,MaxRSSreads the same figure for a running step. -
Ask for more memory. This is the fix the
sbatchpage 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 addK,M,GorT, and the two options cannot be combined.scontrol show configshows the cluster's defaults and maxima (DefMemPerNode,MaxMemPerNode,DefMemPerCPU,MaxMemPerCPU) where they are set;--mem=0is a special case that gives the job all the memory on each node. -
Use more nodes.
--memis per node, so the same request on more nodes gives the job more memory in total. -
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.