Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
doku:job_chains [2014/06/03 13:18] irdoku:job_chains [2014/06/05 12:56] – [Solution II] ir
Line 5: Line 5:
 There are several ways how to create job chains and we will discuss three different solutions below: There are several ways how to create job chains and we will discuss three different solutions below:
 ==== Solution I ===== ==== Solution I =====
-Create one single job script and list several different jobs inside it. E.g.:+Create one single job script, e.g., named //allInOne.sge// and list several different jobs inside it:
 <code> <code>
-user@l01 $ cat allInOne.sge 
 #$ -N allInOne #$ -N allInOne
  
Line 14: Line 13:
 ./doJob3 ./doJob3
 </code> </code>
 +job submission
 <code> <code>
 user@l01 $ qsub allInOne.sge user@l01 $ qsub allInOne.sge
Line 20: Line 19:
 </code> </code>
  
 +This solution is suitable if the jobs are small and the whole job finishes within the maximum run time. For larger jobs, solution II is more convenient.
  
 ==== Solution II ==== ==== Solution II ====
-In order to realize interdependencies of submitted jobs, qsub allows for the following options +qsub allows also for the following options 
-*[-hold_jid job_identifier_list]          define jobnet interdependencies +  * [-hold_jid job_identifier_list]          define jobnet interdependencies 
-*[-hold_jid_ad job_identifier_list]       define jobnet array interdependencies+  * [-hold_jid_ad job_identifier_list]       define jobnet array interdependencies 
 +The job identifier may be the **job id** or the **job name**. 
  
--hold_jid <job id|job name>.+The script of the first job is called //holdJob.sge//:
  
 <code> <code>
-user@l01 $ cat holdJob.sge 
 #$ -N holdJob #$ -N holdJob
  
 ./doJob1 ./doJob1
 </code> </code>
 +The script of the interdependent second job is called //Job2.sge//:
 <code> <code>
-user@l01 $ cat Job2.sge 
 #$ -N Job2 #$ -N Job2
 #$ -hold_jid holdJob #$ -hold_jid holdJob
Line 41: Line 41:
 ./doJob2 ./doJob2
 </code> </code>
-...+job submission:
 <code> <code>
 user@l01 $ qsub holdJob.sge user@l01 $ qsub holdJob.sge