[GE users] -b yes and extra arguments in 6.0u1

Beth Meyer beth at wildbrain.com
Tue Nov 30 21:49:30 GMT 2004

I've been trying to set up an epilog script and having the worst time. 
I've finally tracked it to having "-b yes" in my qsub command. It seems 
that in addition to prepending a "-c" to the argument 
list;(http://gridengine.sunsource.net/issues/show_bug.cgi?id=1337) it 
also doubles up all of the arguments to the command you are running on 
the queue.
My starter script can be trained to ignore the extra arguments, as 
suggested for the workaround in issue 1337; but all the extra arguments 
are getting passed as arguments to my epilog script, seemingly as 
arguments to the initial tcsh command(#!/bin/tcsh). This, of course, 
causes the epilog script to fail as tcsh has no idea what to do with 
these arguments.

I have verified that without the "-b yes" the extra arguments do not get 
appended. Not using the -b flag is not an option because without it, I 
seem to be required to use the full path for every command.  It would 
cause me far more pain than it's worth to force my artists to always use 
full paths instead of the aliases they are comfortable with.

I do have a workaround which is to enclose the entire command in quotes, 
arguments and all. This is going to require escaping the quotes for 
arguments to the command; but unless someone out there with more 
experience has another suggestion (is there a setting which would let me 
drop the -b without using full paths?), this seems to be my best option.

I tested it by running this shell script


for arg
   echo $arg

on the farm with some dummy arguments. I added a line to my python job 
starter script to print sys.argv into the output log. And it came up with
qsub -b yes -cwd -r yes -V -w e -j yes -o 
'/wb/people/beth/.queue/LOG_argTest_jobS_withb_noepi' -p 30 -N argTest 
-P miscellaneous -A default -l h_rt=01:00:00,arch=lx24-x86 argTest -arg1 
-arg2 -arg3 echoes
Your job 236 ("argTest") has been submitted.

cat LOG_argTest_jobS_withb_noepi
Entering Job Starter
'argTest', '-arg1', '-arg2', '-arg3', 'echoes', '-arg1', '-arg2', 
'-arg3', 'echoes']
 >>> jobStarter: jobCmd == argTest -arg1 -arg2 -arg3 echoes -arg1 -arg2 
-arg3 echoes
 >>> Executing command : argTest -arg1 -arg2 -arg3 echoes -arg1 -arg2 
-arg3 echoes
Exiting 0 from job

Just to be sure that my python script was not causing the problem I 
replaced it with

echo $*
exec ${*#-c} #removes the prepended -c from the command

and ran the same command, which produced this output
 > cat LOG_argTest_fakeStart
-c argTest -arg1 -arg2 -arg3 echoes -arg1 -arg2 -arg3 echoes

To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net

More information about the gridengine-users mailing list