11.5 Job Dependencies

11.5.1 Basic Job Dependency Support

By default, basic single step job dependencies are supported through completed/failed step evaluation. Basic dependency support does not require special configuration and is activated by default. Dependent jobs are only supported through a resource manager and therefore submission methods depend upon the specific resource manager being used. For TORQUE's qsub and the Moab msub command, the semantics listed in the section below can be used with the -W x=depend:<STRING> flag. For other resource managers, consult the resource manager specific documentation.

11.5.1.1 Job Dependency Syntax

Dependency Format Description
after:<job>[:<job>]... Job may start at any time after specified jobs have started execution.
afterany:<job>[:<job>]... Job may start at any time after all specified jobs have completed regardless of completion status.
afterok:<job>[:<job>]... Job may start at any time after all specified jobs have successfully completed.
afternotok:<job>[:<job>]... Job may start at any time after all specified jobs have completed unsuccessfully.
before:<job>[:<job>]... Job may start at any time before specified jobs have started execution.
beforeany:<job>[:<job>]... Job may start at any time before all specified jobs have completed regardless of completion status.
beforeok:<job>[:<job>]... Job may start at any time before all specified jobs have successfully completed.
beforenotok:<job>[:<job>]... Job may start at any time before any specified jobs have completed unsuccessfully.
on:<count> Job may start after <count> dependencies on other jobs have been satisfied.
Note synccount and syncwith are not currently supported by Moab.
Note <job>={jobname|jobid}
Note The before dependencies do not work with jobs submitted with msub; they work only with qsub.

Any of the dependencies containing "before" must be used in conjunction with the "on" dependency. So, if job A must run before job B, job B must be submitted with depend=on:1, as well as job A having depend=before:A. This means job B cannot run until one dependency of another job on job B has been fulfilled. This prevents job B from running until job A can be successfully submitted.

See Also

Copyright © 2012 Adaptive Computing Enterprises, Inc.®