[torqueusers] qsub patch for job script arguments.

Gareth.Williams at csiro.au Gareth.Williams at csiro.au
Fri Sep 2 21:28:13 MDT 2011

> -----Original Message-----
> From: Michael Jennings [mailto:mej at lbl.gov]
> Sent: Tuesday, 30 August 2011 8:47 AM
> To: torqueusers at supercluster.org
> Subject: Re: [torqueusers] qsub patch for job script arguments.
> On Tuesday, 30 August 2011, at 08:43:09 (+1000),
> Gareth.Williams at csiro.au wrote:
> > 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.
> That doesn't work.  The job script is an argument to qsub.  The
> convention is that -- halts option parsing; the command is supposed to
> ignore anything that comes after --.  If qsub ignores the jobscript
> name, not much will get done.  ;-)
> Using -- is by far the simplest and most standard approach IMHO.
> Either that, or just ignore everything after the jobscript name.

Hi Michael,

I've always read information about -- usage as halting 'option' parsing, as you say, but I guess I assumed there is usually a different between 'options' (and their associated required/optional arguments) and other arguments. Eg. In the man page for (gnu) time:

time [options] command [arguments...]
   GNU Standard Options
       --     Terminate option list.

ie. '--' is the last 'option', so that 'command' and [arguments...] get used without being further interpreted by the argument parsing.

I think in this case, qsub [options] [script [script_args...]]
Is more intuitive than, qsub [options] [script  [-- script_args...]]

Indeed -- need not be necessary unless qsub can't recognise which option is the script and aggressively swallows up args after the script. (compare: 'ls / -l', 'ls -- / -l' and 'ls -l /')


> --
> Michael Jennings <mej at lbl.gov>
> Linux Systems and Cluster Engineer
> High-Performance Computing Services
> Bldg 50B-3209E      W: 510-495-2687
> MS 050C-3396        F: 510-486-8615

More information about the torqueusers mailing list