Warm tip: This article is reproduced from serverfault.com, please click

is it possible to run sbatch in blocking mode?

发布于 2020-12-03 13:17:48

Is it possible to run sbatch in input blocking mode? I have sbatch called via another controller script. Before going to the next step in the controller script I want to make sure the submitted job is completed and the results of the job are available. What alternatives could be considered? Thank you!

Questioner
hamid attar
Viewed
0
damienfrancois 2020-12-03 21:31:12

The sbatch command has the -W option. From the sbatch manpage:

-W, --wait Do not exit until the submitted job terminates.

Otherwise, you can use job dependencies. You can submit a job, and then submit another one with --dependency=after_ok:<the job id of the first job> so Slurm will only start the second one after the first one has run properly.

That process can be automated with a workflow management system. See this for more information.