Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
doku:job_chains [2014/06/03 13:18] – ir | doku:job_chains [2021/05/13 17:45] (current) – removed goldenberg | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Job chains ====== | ||
- | |||
- | Job chains are sets of consecutive **interdependent** jobs. | ||
- | |||
- | There are several ways how to create job chains and we will discuss three different solutions below: | ||
- | ==== Solution I ===== | ||
- | Create one single job script and list several different jobs inside it. E.g.: | ||
- | < | ||
- | user@l01 $ cat allInOne.sge | ||
- | #$ -N allInOne | ||
- | |||
- | ./doJob1 | ||
- | ./doJob2 | ||
- | ./doJob3 | ||
- | </ | ||
- | |||
- | < | ||
- | user@l01 $ qsub allInOne.sge | ||
- | Your job 10411 (" | ||
- | </ | ||
- | |||
- | |||
- | ==== Solution II ==== | ||
- | In order to realize interdependencies of submitted jobs, qsub allows for the following options | ||
- | *[-hold_jid job_identifier_list] | ||
- | *[-hold_jid_ad job_identifier_list] | ||
- | |||
- | -hold_jid <job id|job name>. | ||
- | |||
- | < | ||
- | user@l01 $ cat holdJob.sge | ||
- | #$ -N holdJob | ||
- | |||
- | ./doJob1 | ||
- | </ | ||
- | < | ||
- | user@l01 $ cat Job2.sge | ||
- | #$ -N Job2 | ||
- | #$ -hold_jid holdJob | ||
- | |||
- | ./doJob2 | ||
- | </ | ||
- | ... | ||
- | < | ||
- | user@l01 $ qsub holdJob.sge | ||
- | Your job 10451 (" | ||
- | user@l01 $ qsub Job2.sge | ||
- | Your job 10452 (" | ||
- | user@l01 $ qsub Job3.sge | ||
- | Your job 10453 (" | ||
- | </ | ||
- | ' | ||
- | | ||
- | | ||