From: Steve Reinhardt Date: Thu, 20 Oct 2005 17:25:43 +0000 (-0400) Subject: Add qdo options for setting the PBS job name and destination queue. X-Git-Tag: m5_2.0_beta1~310^2~11 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9c68bde1667f9eaf9eb8ec62adc305e4573bfd3b;p=gem5.git 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 --- diff --git a/util/qdo b/util/qdo index 3a475b420..9593ed5ed 100755 --- a/util/qdo +++ b/util/qdo @@ -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)