[torqueusers] qsub patch for job script arguments.

Gareth.Williams at csiro.au Gareth.Williams at csiro.au
Mon Aug 29 16:43:09 MDT 2011


> -----Original Message-----
> From: Ken Nielson [mailto:knielson at adaptivecomputing.com]
> Sent: Tuesday, 30 August 2011 12:00 AM
> To: Torque Users Mailing List
> Subject: Re: [torqueusers] qsub patch for job script arguments.
> 
> ----- Original Message -----
> > From: "Roy Dragseth" <roy.dragseth at cc.uit.no>
> > To: "Torque Users Mailing List" <torqueusers at supercluster.org>
> > Sent: Saturday, August 27, 2011 2:46:53 PM
> > Subject: [torqueusers] qsub patch for job script arguments.
> >
> > I just discovered the -F option implemented in v3.0.2 and thought it
> > was a
> > very nice idea.  Soon I discovered the awkwardness imposed by the
> > need for
> > quotes around the argument.  In my experience it is very hard to
> > explain to
> > users the difference between single and double quotes and so on.
> >  Maybe a
> > better way to solve this is to make everything between a "--" flag
> > and end of
> > line become job script arguments.  This is the way getopt suggests to
> > do these
> > kind of things.
> >
> > Attached is a patch that implements the idea above.
> >
> > qsub run.sh -- arg1 arg2
> >
> > will start
> >
> > run.sh arg1 arg2
> >
> > The equivalent would be
> >
> > qsub -F"arg1 arg2" run.sh
> >
> > but no need for quotes.
> >
> >  Anyway, just a suggestion.
> >
> > Regards,
> > r.
> > --
> >
> >   The Computer Center, University of Tromsø, N-9037 TROMSØ Norway.
> > 	      phone:+47 77 64 41 07, fax:+47 77 64 41 00
> >         Roy Dragseth, Team Leader, High Performance Computing
> > 	 Direct call: +47 77 64 62 56. email: roy.dragseth at uit.no
> >
> Roy,
> 
> Thanks for the patch.
> 
> I think the -F option will cause some confusion for everyone at first
> because it is a different syntax than what people are used to. The way
> Maui and Moab interpret the command line is also a factor in this. Both
> programs would need to know the -F meant everything else following are
> arguments.
> 
> Even so I am open to better practices. What does everyone else think.
> 
> Regards
> 
> Ken

I like the -- idea, but I think it is more natural to have (or at least allow) -- before the job script:
qsub -- run.sh arg1 arg2
Before is better to signify that qsub options are complete and the rest of the line is the job script and its options.  After still signifies this but splits the job script and its options unnecessarily.

Gareth


More information about the torqueusers mailing list