[slurm-users] Aborting a job from inside the prolog
g.s at arcor.de
Tue Jun 20 15:43:31 UTC 2023
Alexander Grund wrote:
> Although it may be better to not drain it, I'm a bit nervous with "exit
> 0" as it is very important that the job does not start/continue, i.e.
> the user code (sbatch script/srun) is never executed in that case.
> So I want to be sure that an `scancel` on the job in its prolog is
> actually always preventing the job from running.
Just return the exit code of scancel, then. If it failed, the prolog
failed and the job gets re-queued. If it didn't, the job was cancelled.
More information about the slurm-users