SGE Job Dependencies

From: https://wiki.duke.edu/display/SCSC/SGE+Job+Dependencies

SGE can hold jobs until certain job-dependencies are met – i.e. it will not start a job until it knows that its predecessor has completed. Thus, you can submit two jobs, job1 and job2, telling SGE to hold job2 until job1 is complete.

To do this at the command line, use:

qsub -hold_jid <<job-number>>

alternately, if you have named the previous job using the -N option, then you can place a subsequent hold using that name:

qsub -hold_jid <<job-name>>

Note that you can put the same name on several jobs (with the -N option), in which case the held job will wait for all of the named jobs to complete.

In the case of SGE array jobs, the hold will not be released until all array-tasks have been completed (see [SGE Array Jobs] for more info).

 

This entry was posted in HPC. Bookmark the permalink.

Leave a comment