This lesson is being piloted (Beta version)

Independent Tasks and Job Schedulers

Overview

Teaching: 5 min
Exercises: 5 min
Questions
  • How to run several independent jobs in parallel?

Objectives
  • Be able to identify a problem of independent tasks

  • Use a scheduler like SLURM to submit an array job

Independent tasks in your field?

Can you think of a problem in your field that can be formulated as a set of independent tasks?

An example of a submission script for an array job with the SLURM scheduler.

#!/bin/bash
#SBATCH --account=sponsor0
#SBATCH --array=1-100
#SBATCH --time=0-00:01:00

echo "This is task $SLURM_ARRAY_TASK_ID on $(hostname) at $(date)"

If the above is saved into a script called array_job_submit.sh and sponsor0 with your sponsor’s CC account it can be submitted to the SLURM schedular with:

$ sbatch array_job_submit.sh

Key Points