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
doku:job_chains [2014/06/05 12:55] – [Solution II] irdoku: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, e.g., named //allInOne.sge// and list several different jobs inside it: 
-<code> 
-#$ -N allInOne 
- 
-./doJob1 
-./doJob2 
-./doJob3 
-</code> 
-job submission 
-<code> 
-user@l01 $ qsub allInOne.sge 
-Your job 10411 ("allInOne") has been submitted. 
-</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 ==== 
-qsub allows also for the following options 
-  * [-hold_jid job_identifier_list]          define jobnet interdependencies 
-  * [-hold_jid_ad job_identifier_list]       define jobnet array interdependencies 
-The job identifier may be the **job id** or the **job name**.  
- 
-The script of the first job is called //holdJob.sge//: 
- 
-<code> 
-#$ -N holdJob 
- 
-./doJob1 
-</code> 
-The script of the interdependent second job is called Job2.sge: 
-<code> 
-user@l01 $ cat Job2.sge 
-#$ -N Job2 
-#$ -hold_jid holdJob 
- 
-./doJob2 
-</code> 
-... 
-<code> 
-user@l01 $ qsub holdJob.sge 
-Your job 10451 ("holdJob") has been submitted. 
-user@l01 $ qsub Job2.sge 
-Your job 10452 ("Job2") has been submitted. 
-user@l01 $ qsub Job3.sge 
-Your job 10453 ("Job3") has been submitted. 
-</code> 
-'Job2' waits and starts only after 'holdJob' has finished. If you have another 'Job3' it waits until 'Job2' has finished and so on ... . 
-   *Advantage: accumulates ”waiting time” 
-   *Note: -hold_jid <job_name> can only be used to reference jobs of the same user (-hold_jid <job_id> can be used to reference any job) 
  
  • doku/job_chains.1401972920.txt.gz
  • Last modified: 2014/06/05 12:55
  • by ir