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

2009-06-26 Thread Micha Feigin
On Wed, 24 Jun 2009 21:28:53 -0400 Johan Kullstam kullstj...@comcast.net wrote: Kamaraju S Kusumanchi raju.mailingli...@gmail.com writes: I have three programs - say proga, progb, progc. proga, progb are completely independent. They take couple of hours to finish. The time to complete

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

2009-06-26 Thread Micha Feigin
On Fri, 26 Jun 2009 18:52:47 +0300 Micha Feigin mi...@post.tau.ac.il wrote: On Wed, 24 Jun 2009 21:28:53 -0400 Johan Kullstam kullstj...@comcast.net wrote: Kamaraju S Kusumanchi raju.mailingli...@gmail.com writes: I have three programs - say proga, progb, progc. proga, progb are

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

2009-06-25 Thread Douglas A. Tutty
On Wed, Jun 24, 2009 at 10:05:20PM -0400, Scott Gifford wrote: Douglas A. Tutty dtu...@vianet.ca writes: On Mon, Jun 22, 2009 at 08:17:44PM -0400, Kamaraju S Kusumanchi wrote: While you may think its terribly inefficient, it isn't really. A fancy wait function is just polling anyway,

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

2009-06-25 Thread Scott Gifford
Douglas A. Tutty dtu...@vianet.ca writes: On Wed, Jun 24, 2009 at 10:05:20PM -0400, Scott Gifford wrote: Douglas A. Tutty dtu...@vianet.ca writes: On Mon, Jun 22, 2009 at 08:17:44PM -0400, Kamaraju S Kusumanchi wrote: While you may think its terribly inefficient, it isn't really. A fancy

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

2009-06-25 Thread Boyd Stephen Smith Jr.
In 20090625143028.ga7...@blitz.hooton, Douglas A. Tutty wrote: On Wed, Jun 24, 2009 at 10:05:20PM -0400, Scott Gifford wrote: Douglas A. Tutty dtu...@vianet.ca writes: While you may think its terribly inefficient, it isn't really. A fancy wait function is just polling anyway, you're just

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

2009-06-25 Thread Napoleon
Douglas A. Tutty wrote: On Wed, Jun 24, 2009 at 10:05:20PM -0400, Scott Gifford wrote: Douglas A. Tutty dtu...@vianet.ca writes: On Mon, Jun 22, 2009 at 08:17:44PM -0400, Kamaraju S Kusumanchi wrote: While you may think its terribly inefficient, it isn't really. A fancy wait function is

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

2009-06-24 Thread Douglas A. Tutty
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

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

2009-06-24 Thread John Hasler
Doug writes: 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. Have each of them check for a

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

2009-06-24 Thread Eric De Mund
Hello, 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

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

2009-06-24 Thread Mike Castle
On Mon, Jun 22, 2009 at 5:17 PM, Kamaraju S Kusumanchiraju.mailingli...@gmail.com wrote: proga, progb are completely independent. They take couple of hours to finish. The time to complete proga, progb are not same. progc should to be launched only after both proga, progb are finished. progc

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

2009-06-24 Thread Mike Castle
On Wed, Jun 24, 2009 at 4:46 PM, Mike Castledalgoda+deb...@gmail.com wrote: I've taken to using flock for such things if I'm launching them from other scripts. I forget which package and I can't look right now (my machine died this morning). To clarify, I meant to say: I've taken to using

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

2009-06-24 Thread Johan Kullstam
Kamaraju S Kusumanchi raju.mailingli...@gmail.com writes: I have three programs - say proga, progb, progc. proga, progb are completely independent. They take couple of hours to finish. The time to complete proga, progb are not same. progc should to be launched only after both proga, progb

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

2009-06-24 Thread Scott Gifford
Douglas A. Tutty dtu...@vianet.ca writes: 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

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

2009-06-24 Thread Kamaraju S Kusumanchi
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

OT: launching jobs in a combined serial parallel way

2009-06-22 Thread Kamaraju S Kusumanchi
I have three programs - say proga, progb, progc. proga, progb are completely independent. They take couple of hours to finish. The time to complete proga, progb are not same. progc should to be launched only after both proga, progb are finished. progc takes another couple of hours to finish.

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

2009-06-22 Thread me
Hi, I didn't test that script, just writing it from memory, but maybe that gives you some ideas: #!/bin/bash prog1 prog2 while [ $(ps -A | grep -E 'prog1|prog2') == 0 ] do sleep 5 done prog3 more or less like that greetings, vitaminx 2009/6/23 Kamaraju S Kusumanchi

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

2009-06-22 Thread ghe
On 6/22/09 6:32 PM, me wrote: 2009/6/23 Kamaraju S Kusumanchiraju.mailingli...@gmail.com I have three programs - say proga, progb, progc. proga, progb are completely independent. They take couple of hours to finish. The time to complete proga, progb are not same. progc should to be launched

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

2009-06-22 Thread Scott Gifford
Kamaraju S Kusumanchi raju.mailingli...@gmail.com writes: [...] progc should to be launched only after both proga, progb are finished. progc takes another couple of hours to finish. What is good way to automate this problem (that is no manual interaction)? In a shell script, run proga and

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

2009-06-22 Thread Kamaraju S Kusumanchi
Scott Gifford wrote: Kamaraju S Kusumanchi raju.mailingli...@gmail.com writes: [...] progc should to be launched only after both proga, progb are finished. progc takes another couple of hours to finish. What is good way to automate this problem (that is no manual interaction)? In a

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

2009-06-22 Thread Kamaraju S Kusumanchi
Are progs ab yours? Yes. They are mine. If so, how about having each one check ps for the other one as part of it's exit. If the other one isn't running, start progc before exit. That is a nice idea. I have not thought about it. For now, I will go with Gifford's tip of using the shell's

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

2009-06-22 Thread Kamaraju S Kusumanchi
me wrote: #!/bin/bash prog1 prog2 while [ $(ps -A | grep -E 'prog1|prog2') == 0 ] do sleep 5 done prog3 more or less like that You know, I actually started out with something similar. But it has limitations. Let's say you want to launch two sets of (proga, progb,