When a job goes wrong
This page explains how to find out why a job failed, or why it has not started.
Find out what happened
Once a job has finished, sacct shows how it ended:
sacct -j JOBID -o JobID,JobName,State,ExitCode,Elapsed,MaxRSS,ReqMem
MaxRSS is the most memory that the job used. It is shown on the .batch line, not the top line. Add -X to show only the top line.
The seff command is not installed on COSMA.
State |
Exit code |
What happened |
What to do |
|---|---|---|---|
|
|
The script finished without an error |
If the results are still wrong, read the output files |
|
e.g. |
The script ended with an error |
Read the |
|
|
The job used more memory than it requested |
Request more with |
|
|
The job reached its time limit |
Request more time with |
|
|
The job was cancelled, for example with |
Check who cancelled it: |
|
A node failed |
Resubmit the job, and contact us if it keeps happening |
The exit code has two parts, the exit code of the script and the number of the signal that stopped it. Note that a batch script reports the exit code of its last command. To stop at the first failure, put set -e near the top of your script.
Messages in the output
If a job runs out of memory, the output contains:
slurm_script: line 2: 270858 Killed python3 myprogram.py
error: Detected 1 oom_kill event in StepId=12263076.batch. Some of the step tasks have been OOM Killed.
Files in /dev/shm count towards your job’s memory.
If a job reaches its time limit, the output contains:
error: *** JOB 12263077 ON m8525 CANCELLED AT 2026-11-02T21:44:42 DUE TO TIME LIMIT ***
Slurm stops the job when it reaches its time limit, with no extra time. To save your work first, see saving work before the time limit.
If you see this line, your job started in the wrong directory:
error: couldn't chdir to `/cosma8/data/dp004/USERNAME': No such file or directory: going to /tmp instead
Your job was submitted from a directory that does not exist on its compute node. Not all file systems are available everywhere, so see mounted file systems.
Errors when submitting a job
Message |
Cause |
|---|---|
|
Add |
|
Add a time limit with |
|
Add a queue with |
|
Check the project name, using |
|
Your project cannot use this queue |
|
Check the queue name, using |
|
The time limit is too long for the queue, which is usually 3 days |
|
No node on this queue can satisfy the request, for example too many CPUs or too much memory on one node |
You can check a job script without submitting it, using sbatch --test-only myscript.sh.
Why has my job not started?
For a pending job, squeue --me shows the reason in brackets at the end of the line:
Reason |
Meaning |
|---|---|
|
Other jobs have a higher priority |
|
Your job is next, and is waiting for nodes to become free |
|
Your job is waiting for another job to finish |
|
A job that yours depends on failed, so it will never start. Cancel it with |
|
Your job is on hold, so use |
|
A node that your job needs is not available, for example because it is reserved |
Useful commands are:
squeue --me --startshows an estimate of when your job will start.scontrol show job JOBIDshows everything about a job.sprio -j JOBIDshows how its priority is calculated.
Shorter jobs can often start sooner, by using backfill. Queue priorities are described in the scheduling overview.
Compute nodes cannot reach the internet
Login nodes can reach the internet, but compute nodes cannot. In a job, commands such as pip install, git clone and wget will hang or time out.
Download what you need on a login node before submitting your job.
Getting help
If you need to contact support, please include your job number, the job script, and the output of the sacct command above.