[torqueusers] Torque versions and the "-v" argument

Edric Ellis Edric.Ellis at mathworks.co.uk
Wed Oct 3 09:08:10 MDT 2012


Hi there torqueusers,

I'm trying to write some scripts that can be used with multiple versions of Torque, and I'm having some trouble getting uniform support for "-v". What I have that works nicely with Torque 2.5.5 is to write a qsub line like this:

qsub -v VARNAME1,VARNAME2 ...

We've now got a Torque 4.1.2 cluster here, and that syntax doesn't appear to work (even though it is documented to work in the qsub man page). For example:

$ echo env | FOO1=foo1 FOO2=foo2 qsub -v FOO1,FOO2
# time passes
$ grep FOO STDIN.o401
# no matches

Whereas this syntax does work:

$ echo env | FOO1=foo1 FOO2=foo2 qsub -v FOO1 -v FOO2
# time passes
$ grep FOO STDIN.o402
FOO1=foo1
FOO2=foo2

Unfortunately, that second syntax doesn't work with Torque 2.5.5. The only syntax that appears to work correctly in both versions is this one:

qsub -v FOO1=foo1,FOO2=foo2

However I'd rather not do that if possible since that means firstly that the command line can get very long, and also that I'd have to worry about the contents of the environment variables (in case they need quoting etc.).

Is the behaviour of Torque 4.1.2 in the "-v VARNAME1,VARNAME2" variant a bug?

Cheers,

Edric.


More information about the torqueusers mailing list