[torqueusers] specify job id

Hakeem Almabrazi halmabrazi at idtdna.com
Wed Jan 25 15:18:41 MST 2012


Thank you everyone for helping me with this.

The only reason why I want to do that is to be able to track that job specifically.  I am building a service to submit jobs to Torque.  The same service will have to wait till the job is done and return the results back to the call.  So the service need to know when the job is completed to load back the results.  I thought, the best way is for that service to keep asking the Torque on the status of the submitted job rather than looking up file(s) in the file system.

So the service has to assign a number to the job and then force Torque to use that number.  Now if the service wants to know the status of that job, it can asks the Torque server using the same job number.  It might be over kill way of doing things but that is the requirement.   Now there might be a better way of doing that.  I would love to hear it if someone else has better approach than this.

Thanks

.



From: torqueusers-bounces at supercluster.org [mailto:torqueusers-bounces at supercluster.org] On Behalf Of Coyle, James J [ITACD]
Sent: Tuesday, January 24, 2012 1:37 PM
To: Torque Users Mailing List
Subject: Re: [torqueusers] specify job id

Hakeem,

Is there a reason you want the jobid to be something specific?
The only thing that I can think of is to use this after the fact to pick up the
output filenames when you have not used -e and -o
(or to keep track of it for issuing later Torque commands like
qdel or qstat. )

This can be done for a jobscript myjob (in sh , ksh  or bash) via:

qsub myjob
QSUB_RC=$?
JID=`echo ${QSUB_RC} | sed -e 's/\.*$//' `


Then  ${JID}  can be used later.

E.g.
if you had not use -e and -o to name STDERR and STDOUT filenames, these output should be in

myjob.e${JID}
and
myjob.o${JID}


-          Jim


James Coyle, PhD
High Performance Computing Group
 Iowa State Univ.
web: http://jjc.public.iastate.edu/<http://www.public.iastate.edu/~jjc>

From: torqueusers-bounces at supercluster.org [mailto:torqueusers-bounces at supercluster.org] On Behalf Of Hakeem Almabrazi
Sent: Tuesday, January 24, 2012 10:08 AM
To: torqueusers at supercluster.org
Subject: [torqueusers] specify job id

Hi,

Is there a way to specify job id when request a job?

Thanks





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torqueusers/attachments/20120125/1f94ac25/attachment-0001.html 


More information about the torqueusers mailing list