[torqueusers] Run a job in foreground mode ?
Lennart.Karlsson at nsc.liu.se
Tue Aug 2 09:20:27 MDT 2005
Dear Mathieu Oudart,
To get your "foreground mode" I propose that you implement
a simple "qwait" command that waits for any job that you
give as a parameter to it.
E.g. if you want to run a job A, rename its output directory
and run a job B, you could make a script like this:
qsub A > A.jobname
qwait `cat A.jobname`
mv A.results B.input
qsub B > B.jobname
qwait `cat B.jobname`
It is the same way you construct depend chains, but allowing
other types of actions between.
The qwait command could easily be constructed as a script that
goes in a loop, mostly sleeping and now and then checking for completion
by using the "qstat" command.
I prefer this method compared to adding a waiting option to "qsub", because a
waiting option might make a system user believe that she/he could
abort the batch job by hitting a control-C on her/his keyboard, the way it
works with interactive jobs and the "qsub -I" command.
-- Lennart Karlsson <Lennart.Karlsson at nsc.liu.se>
National Supercomputer Centre in Linkoping, Sweden
> -----Original Message-----
> From: torqueusers-bounces at supercluster.org
> [mailto:torqueusers-bounces at supercluster.org] On Behalf Of
> Mathieu OUDART
> Sent: dinsdag 2 augustus 2005 9:34
> To: torqueusers at supercluster.org
> Subject: [torqueusers] Run a job in foreground mode ?
> Hi all,
> I'm actually testing Torque on a Linux cluster and I have a
> question to
> submit you :
> Is there a simple way to run a batch job in "foreground mode" ?
> for example, an option to "qsub" that makes it waiting for the job to
> complete before exiting.
> It would be useful for some scripts that launch batchs and other
> sequential opérations.
> I saw the extended attributes for qsub (-W depend=...) but it only
> synchronizes jobs between them.
> I'd prefer a blocking mecanism, so I could launch everything in a raw.
> Mathieu OUDART
More information about the torqueusers