Add qdo options for setting the PBS job name and destination queue.

util/qdo:
    Add options for setting the PBS job name and destination queue.

--HG--
extra : convert_revision : dcb46a03b8fd7a93e2ba656a9e5c806e250f5ac9
This commit is contained in:
Steve Reinhardt 2005-10-20 13:25:43 -04:00
parent 8ab674582e
commit 9c68bde166

View file

@ -45,7 +45,11 @@ optparser.add_option('-o', dest='stdout_file',
help='command stdout output file')
optparser.add_option('-l', dest='save_log', action='store_true',
help='save qsub output log file')
optparser.add_option('-q', dest='qsub_timeout', type='int',
optparser.add_option('-N', dest='job_name',
help='qsub job name')
optparser.add_option('-q', dest='dest_queue',
help='qsub destination queue')
optparser.add_option('--qwait', dest='qsub_timeout', type='int',
help='qsub queue wait timeout', default=30*60)
optparser.add_option('-t', dest='cmd_timeout', type='int',
help='command execution timeout', default=600*60)
@ -56,6 +60,9 @@ if cmd == []:
print >>sys.stderr, "%s: missing command" % progname
sys.exit(1)
if not options.job_name:
options.job_name = cmd[0]
cwd = os.getcwd()
# Deal with systems where /n is a symlink to /.automount
@ -137,6 +144,9 @@ if False and len(cmd) > 50:
print "%s: running %s on poolfs" % (progname, cmd[0])
else:
shell_cmd = 'qsub -I -S /bin/sh'
shell_cmd += ' -N "%s"' % options.job_name
if options.dest_queue:
shell_cmd += ' -q ' + options.dest_queue
shell = Shell(shell_cmd)