slurm

Queue SLURM jobs to run X minutes after each other


I have been trying to search around for an example of how to use the following option for job dependencies, -d, --dependency=<dependency_list>.

In the documentation, the syntax is shown to be after:job_id[[+time][:jobid[+time]...]] But I am unable to find any examples of this, and to be honest I find the presentation of the syntax confusing.

I have tried sbatch --dependency=after:123456[+5] myjob.slurm and sbatch --dependency=after:123456+5 myjob.slurm, but this yields the error

sbatch: error: Batch job submission failed: Job dependency problem.

How can I add a dependency to Job B so that it starts X minutes after Job A starts?


Solution

  • The square brackets [...] indicate an optional parameter value and should not appear in the actual parameter value. Try with

    sbatch --dependency=after:123456:+5 myjob.slurm