问题
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?
回答1:
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
回答2:
With guidance from damienfrancois to exclude the brackets, I tried the following
sbatch --dependency=after:123456:+5 myjob.slurm
Which seems to work beautifully, listing it in the queue as dependent.
EDIT: This is for version 19.05.07
来源:https://stackoverflow.com/questions/64497802/queue-slurm-jobs-to-run-x-minutes-after-each-other