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

reuti reuti at staff.uni-marburg.de
Thu Mar 25 19:25:01 GMT 2010


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

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].



More information about the gridengine-users mailing list