Skip to content
Contact Support

Tutorial

Splitting and Chaining Jobs

45 Minutes

Objectives

  • Split a job into parts that each request only the resources they need.
  • Make a job wait for another job with --dependency.
  • Queue a whole workflow from one submission script.

Prerequisite

Skipped ahead? Set up here

Split by resource needs

Read and write less

Make a job wait for another

#

Dependencies

Job 1001 is running and job 1002 has failed. Which of these jobs can start once their dependency is checked?

Queue a whole workflow

Why queue every stage at once?

Solution

Keypoints

  • Split a job where its parts need different resources.
  • --dependency afterok:JOB_ID makes a job wait for another to finish successfully.
  • sbatch --parsable gives the job ID, so a script can queue a whole workflow.

What next