How to submit a slurm job s.t. it only starts when another job with given ID has finished?
- User
How to submit a slurm job s.t. it only starts when another job with given ID has finished?
- Assistant
To submit a Slurm job that starts only after another job with a given ID has finished, you can use job dependencies. Slurm provides the
--dependencyoption to specify the dependency condition for a job.Here's an example of how you can submit a job that depends on the completion of another job:
bashsbatch --dependency=afterok:<job_id> job_script.shIn this command:
--dependencyis the option to specify the dependency condition.afterokis the dependency type, which means the current job will start only after the specified job has completed successfully.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.