massive-website-banner

Handle Job Dependencies

A job can be given the constraint that it only starts after another job has finished.

In the following example, we have two Jobs, A and B. We want Job B to start after Job A has successfully completed.

First, submit Job A

sbatch jobA.script

You will be given a ID of Job A.

Waiting for JOBID 333234 to start

 

Now we can:

Submit Job B and tell Slurm: Run Job B when Job A completes

sbatch --dependency=afterok:333234 jobB.script

 

Submit Job B and tell Slurm: Run Job B whatever Job A completes or fails

sbatch --dependency=afterany:333234 jobB.script

Copyright © 2016 MASSIVE. All Rights Reserved.