Now I can't figure out how to hook basically employ an observer pattern so that only after each qsub job has finished, do I pool output and then iterate, without polling. Remember that qsub returns almost immediately after submitting the job (the job itself may not have finished). Here are some of the ideas so far: using qsub -sync, which will block until the qsubbed job is done..ok...so start a bunch of submission jobs in parallel, so open a process file handle for each submission process or something? I can't figure out where to keep a counter so that the iteration is triggered only after each job has finished. qsub -m e to get an email when the job is done...so I write my own smptd....*shudder*...but this is the right concept of what I need. The newest version of PBS has something called "job arrays" that might be the answer, but unfortunately we don't have the newest version here. I would think that there is some sort of obvious aspect of unix IPC that I am missing, but I can't get a handle on this. Any help would be most appreciated.for($i=0; $i<5; $i++) { for($j=0; j<60; $j++) { $output[$j]=system("qsub $input[$j]"); } #wait until each of the previous jobs finishes @input=pool_output(@output); }
In reply to Parallel batch process plumbing issues by gmol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |