Controlling job arrays

About this task

You can control the whole array, all the jobs submitted from the job array, with a single command. LSF also provides the ability to control individual jobs and groups of jobs submitted from a job array. When issuing commands against a job array, use the job array job ID instead of the job array name. Job names are not unique in LSF, and issuing a command using a job array name may result in unpredictable behavior.

Most LSF commands allow operation on both the whole job array, individual jobs, and groups of jobs. These commands include bkill, bstop, bresume, and bmod.

Some commands only allow operation on individual jobs submitted from a job array. These commands include btop, bbot, and bswitch.

Procedure

  • Control a whole array
  • Control individual jobs
  • Control groups of jobs

Control a whole array

Procedure

To control the whole job array, specify the command as you would for a single job using only the job ID.
For example, to kill a job array with job ID 123:
bkill 123

Control individual jobs

Procedure

To control an individual job submitted from a job array, specify the command using the job ID of the job array and the index value of the corresponding job. The job ID and index value must be enclosed in quotes.
For example, to kill the 5th job in a job array with job ID 123:
bkill "123[5]"

Control groups of jobs

Procedure

To control a group of jobs submitted from a job array, specify the command as you would for an individual job and use indexList syntax to indicate the jobs.
For example, to kill jobs 1-5, 239, and 487 in a job array with job ID 123:
bkill "123[1-5, 239, 487]"