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
You can use the
waitcommand in Slurm to make sure that a job only starts when another job with a specific ID has finished. Thewaitcommand will wait for a specific job or a group of jobs to complete before starting the new job. Here is an example of how you can use thewaitcommand to submit a job that starts when another job with a specific ID has finished:# submit the new job sbatch myjob # wait for the other job to finish scontrol --wait=123456789In this example,
sbatch myjobwill submit the new job andscontrol --wait=123456789will wait for a job with the ID123456789to finish before starting the new job. You can replace123456789with the actual ID of the job that you want to wait for.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.