[torqueusers] qsub patch for job script arguments.

Daniel Coimbra danielfcoimbra at gmail.com
Mon Aug 29 13:00:32 MDT 2011


I believe a reasonable alternative would be to be able to repeat the
option for every argument, as follows:
qsub -F arg1 -F arg2 -N test -F arg3 run.sh -F arg4

In this way, each occurrence could be considered a separate argument as if:
run.sh "arg1" "arg2" "arg3" "arg4"

This would facilitate a lot in scripting. Just a users suggestion.

2011/8/29 Ken Nielson <knielson at adaptivecomputing.com>:
> ----- 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
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers
>



-- 
Daniel Fernando Coimbra
Grupo de Estrutura Eletrônica Molecular
Departamento de Química
Universidade Federal de Santa Catarina


More information about the torqueusers mailing list