From: Nathan Binkert Date: Thu, 24 Mar 2005 17:25:34 +0000 (-0500) Subject: Improvements to send.py to allow the user to specify the jobfile X-Git-Tag: m5_1.0_tutorial~67^2~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c5b63bc4c16a973ceb3595284433f1a300d93c89;p=gem5.git Improvements to send.py to allow the user to specify the jobfile util/pbs/send.py: Allow the user to specify the jobfile --HG-- extra : convert_revision : 0e21d2b03355bb7e8938c828bbaa441dc51afd1a --- diff --git a/util/pbs/send.py b/util/pbs/send.py index b796cadbd..f8ca5209c 100755 --- a/util/pbs/send.py +++ b/util/pbs/send.py @@ -45,14 +45,16 @@ progpath = nfspath(sys.path[0]) progname = basename(sys.argv[0]) usage = """\ Usage: - %(progname)s [-c] [-e] [-f] [-q queue] [-v] + %(progname)s [-c] [-e] [-f] [-j ] [-q queue] [-v] -c clean directory if job can be run -e only echo pbs command info, don't actually send the job -f force the job to run regardless of state -q submit job to the named queue + -j specify the jobfile (default is /test.py) -v be verbose - %(progname)s -l [-v] + %(progname)s [-j ] -l [-v] + -j specify the jobfile (default is /test.py) -l list job names, don't submit -v be verbose (list job parameters) @@ -62,7 +64,7 @@ Usage: try: import getopt - opts, args = getopt.getopt(sys.argv[1:], '-cd:efhlq:v') + opts, args = getopt.getopt(sys.argv[1:], '-cd:efhj:lq:v') except getopt.GetoptError: sys.exit(usage) @@ -74,6 +76,7 @@ listonly = False queue = '' verbose = False rootdir = nfspath(os.getcwd()) +jfile = 'test.py' for opt,arg in opts: if opt == '-c': clean = True @@ -86,6 +89,8 @@ for opt,arg in opts: if opt == '-h': print usage sys.exit(0) + if opt == '-j': + jfile = arg if opt == '-l': listonly = True if opt == '-q': @@ -115,7 +120,7 @@ if not listonly and not onlyecho and isdir(linkdir): import job, jobfile, pbs -test = jobfile.JobFile(joinpath(basedir, 'test.py')) +test = jobfile.JobFile(joinpath(basedir, jfile)) joblist = [] for jobname in test.jobs: