[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: launching jobs in a combined serial parallel way



Douglas A. Tutty wrote:

> On Mon, Jun 22, 2009 at 08:17:44PM -0400, Kamaraju S Kusumanchi wrote:
>  
>> Currently I have a shell script that works as below.
>> 1) launch proga, progb in the background using nohup.
>> 2) Ask proga, progb to write a file when they finish.
>> 3) Every five minutes check if these files are present. If they are
>> present, launch progc.
>> 
>> This gets me going for now. But it looks terribly inefficient. I would
>> appreciate if someone can provide a better solution.
> 
> While you may think its terribly inefficient, it isn't really.  A fancy
> "wait" function is just polling anyway, you're just making it overt.
> You also have the ability to have proga and progb only touch the file if
> they complete successfully.  If you merely wait until their ps
> disappears, you don't know if they crashed or properly completed.
> 
> Doug.

Good point. I'll have to think about corner cases like these furthermore.
The scenario you portray does sometimes occur. The suggestions I got in
this thread are very helpful. Thanks guys.

raju
-- 
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/


Reply to: