Job Failures
How to investigate job errors
Exceeding Resource Limits
Each partition limits the maximal allowed runtime of a job and provides default values for the estimated job runtime and memory usage per core. A job should request appropriate values for those resources using the --time
and --mem-per-core
(or --mem
if deviating from the partition defaults) options. A job is killed if one of these limits is exceeded. In both cases, the error file provides appropriate information:
Time limit:
Memory limit:
In addition sacct
will display an informative State
string. The error code is 1 for whole job. Jobstep error code will depend on the jobscript and application handling this situation.
Software Errors
The exit code of a job is captured by SLURM and saved as part of the job record. For sbatch
jobs the exit code of the batch script is captured. For srun
or jobs steps, the exit code will be the return value of the executed command. Any non-zero exit code is considered a job failure, and results in job state of FAILED. When a signal was responsible for a job/step termination, the signal number will also be captured, and displayed after the exit code (separated by a colon).
Depending on the execution order of the commands in the batch script, it is possible that a specific command fails but the batch script will return 0
indicating success. Consider the following simplified example (note for non-R users: sq
does not exist without loading a library which provides it):
We submit this job:
The exit code and state wrongly indicates that the job finished successfully:
There are several solutions to this problem:
- The preferred solution is to create genuine job steps wherewould becomeThe output will be a lot more informative:
- In the case where batch shall handle all job steps (only sensible, if confined to a single node), you could set your own error codes:which now translates into a batch script failure
- Finally, it is possible to trigger a script exit with every error (e. g. in bash
set -e
). This, however, is only recommended if you know how to script well.
Hardware Errors
Sometimes you might experience node failures or network issues (particularly with very big jobs). In such cases, you job might get aborted with weird messages, e.g. from MPI. If you re-submit SLURM will schedule your new job with a great probability on those nodes where your previous job tried to compute - with the same consequence.
We try our best to detect hardware issues with scripts prior to the execution of a job, but sometimes a glitch passes undetected with the consequences described above.
If this happens, please notify us.
Also, when resubmitting you can exclude nodes where failed jobs did run. First you ask SLURM where your previous jobs run:
and then with the copied nodelist for the job(s) in question – without modifying your jobscript: