[GE users] qsub doesn't flush the standard output in the piple

fansn fansn at hotmail.com
Fri Mar 26 10:24:55 GMT 2010


    [ The following text is in the "gb2312" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Hi Daniel,

That's exactly what I'm after. Thank you!

Yours sincerely,


Sinong Fan

<mailto:fansn at hotmail.com>




> Date: Thu, 25 Mar 2010 21:53:17 -0700
> From: daniel.templeton at oracle.com
> To: users at gridengine.sunsource.net
> CC: fansn at hotmail.com
> Subject: Re: [GE users] qsub doesn't flush the standard output in the piple
>
> Is there a reason you don't want to use qrsh?
>
> Daniel
>
> On 3/25/10 1:30 PM, fansn wrote:
> > Hi Reuti,
> >
> > I'm writing a wapper script for qsub, and the script will wait until the job finishes, therefore I'm using -sync yes. I have a forked sub process tailing the output(XXX.o<jobid>), as if the command was running on a local machine. So I must get the job id immediately after the job is submitted into the grid. Currently I used DRMAA to implement the functions of qsub, and it works fine(I put $|=1 in the script), but I would like to use qsub to simplify the script. Seems qsub won't flush the pipe until the pipe is closed(job finished).
> >
> > Yours sincerely,
> >
> >
> > Sinong Fan
> >
> >
> >
> > -----Original Message-----
> > From: reuti [mailto:reuti at staff.uni-marburg.de]
> > Sent: 25 March 2010 19:25
> > To: users at gridengine.sunsource.net
> > Subject: Re: [GE users] qsub doesn't flush the standard output in the piple
> >
> > Hi,
> >
> > Am 25.03.2010 um 15:36 schrieb fansn:
> >
> >
> >> I wrote a script calling qsub and getting the the job id back using pipe, but it won't work. It seems qsub won't flush the standard output until the job finished.
> >>
> >> Here's the code I wrote for testing:
> >>
> >> #!/usr/bin/perl
> >> use warnings;
> >> use strict;
> >>
> >> open (TEST, "qsub -sync yes sleep.sh |");
> >>
> > why are you using -sync here, is it the same w/o?
> >
> > -- Reuti
> >
> >
> >
> >> while (<TEST>)
> >> {
> >> print $_;
> >> }
> >> close TEST;
> >>
> >> Only when the job finishes, the job number will be printed out, together with the exit information:
> >>
> >> Your job 284190 ("sleep.sh") has been submitted
> >> Job 284190 exited with exit code 0.
> >>
> >> I also wrote a DRMAA version of qsub_perl, using perl DRMAA binding. In the script I add "$|=1". Then I use the above script to call my qsub_perl, I can successfully get the job number.
> >>
> >> Can anyone give me some suggestion? Thanks.
> >>
> >> Yours sincerely,
> >>
> >> Sinong Fan
> >>
> >> Hotmail: ???????????????? ?????
> >>
> > ------------------------------------------------------
> > http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=251358
> >
> > To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].
> >
> > ------------------------------------------------------
> > http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=251362
> >
> > To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].
> >
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=251399
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].

________________________________
Hotmail?Microsoft ?????????????????????????? ?????<https://signup.live.com/signup.aspx?id=60969>



More information about the gridengine-users mailing list