[GE users] How do I know when an array has finished?

Andreas.Haas at Sun.COM Andreas.Haas at Sun.COM
Wed Oct 4 09:20:07 BST 2006


Hi Michael,

what you ask for is not available in regular Grid Engine CLI. 
I recommend you consider use of DRMAA as it gives you all 
operations required to implement your qcheck below.

DRMAA language bindings exist for C/Java/Perl/Python/Ruby.

If you're looking for samples that illustrate how to accomplish 
things like qcheck (array jobs, polling, etc) have a look into

    http://gridengine.sunsource.net/files/documents/7/90/drmaa_ruby.tar.gz

as a matter of course the same can be done in other languages.

Regards,
Andreas

On Wed, 4 Oct 2006, Michael James wrote:

> Does SGE provide a way to know when an array of jobs has finished?
>
> That is, apart from polling  "qstat"  repeatedly.
> Or building the joblets to empty the input directory.
>
> What I think I'm asking for, would be a call,
>
> qcheck  -N Job-name  -w time-to-wait-before-returning)
>
> It can return 3 values:
> 	0  finished
> 	1  running
> 	2  ?Que?  (never seen it)
>
> So it could be polled by setting  "time-to-wait" to 0.
>
> Or it could be added to a mother-script to collate results.
>
> qsub -N $jobname  -t 1-$jobcount
> if    qcheck -N $jobname  -w 604800
> then
> 	collate-results
> else
> 	echo "It didn't finish in a week"
> fi
>
> Perl and java wrappers would be good too.
>
> michaelj
>
> PS: We eventually managed to wrap  "qstat"  to sort of do this,
> qstat ? sleep...  qstat ?  sleep...  etc.
> but had some ugliness when the machine filled up with  qstat  jobs
> that refused to finish, waiting on some other mythical grid... ?
>
> -- 
> Michael James                         michael.james at csiro.au
> System Administrator                    voice:  02 6246 5040
> CSIRO Bioinformatics Facility             fax:  02 6246 5166
>
> No matter how much you pay for software,
> you always get less than you hoped.
> Unless you pay nothing, then you get more.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list