1. dalma-run_job_dependencies
  2. Dalma Manual
  3. dalma-run_job_dependencies

Job Dependency

SYNOPSIS

You want to submit several jobs that have dependencies, to create a workflow. E.g., Job B will only start after Job A is finished. Job C will only start after Job B is finished. And so on.

DESCRIPTION

SLURM provide powerful mechanism to define job dependencies, by the job submission command sbatch -d type:id. The keyword id could be job id or job array id. There are 4 available type :

EXAMPLES

You want to submit a job that will start after another job is terminated

Let say you first submitted a job. You run this in terminal, and the job id shows in the screen.


sbatch job1.sh
Submitted batch job 123456

Then you have a second job. You want to make sure the second job could only start running after the first job is successfully terminated. You could run this in the terminal. Notice that in the real case, you have to replace 123456 to your actual job id.


sbatch -d afterok:123456 job2.sh
or
sbatch --dependency=afterok:123456 job2.sh

Alternatively, you could have the second job ready to start after the first job is terminated, whether sucessfully or not. The command will be:


sbatch -d afterany:123456 job2.sh
or
sbatch --dependency=afterany:123456 job2.sh

You could also specify multiple job depencencies on 1 job. E.g., if you want job3 starts only after job1 and job2 are successfully finished, the command will be:


sbatch -d afterok:<jobid-of-job1>:<jobid-of-job2> job3.sh

AUTHORS

NYUAD HPC Apps Team:
 --------------------
     - Benoit Marchand
     - Guowei He
     - Jorge Naranjo

SEE ALSO

Please refer to the online documentation available here

  1. NYUAD
  2. February 2017
  3. dalma-run_job_dependencies