diff options
author | Nathan Binkert <binkertn@umich.edu> | 2005-10-18 15:05:01 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2005-10-18 15:05:01 -0400 |
commit | 357ee7a845eac0bd903ed31e31eec993d54a698c (patch) | |
tree | 0b3ac21b162ca117367d76bedf444c33948eec37 /util/pbs/pbs.py | |
parent | 31d13e9a9b2a9624eec4e5bca6069f9779def3cf (diff) | |
download | gem5-357ee7a845eac0bd903ed31e31eec993d54a698c.tar.xz |
Better pool job handling
util/pbs/job.py:
the default jobfile is now Test.py in the root of the jobs directory
util/pbs/pbs.py:
Clean up the qsub options handling and add job dependencies
util/pbs/send.py:
the default jobfile is now Test.py in the root of the jobs directory
add a flag to depend on your checkpoint
add a flag to specify your node type
create the base directory if it doesn't exist
--HG--
extra : convert_revision : dfffa4a5b0e68b2550a28fbb06b9d6a208ea1f2e
Diffstat (limited to 'util/pbs/pbs.py')
-rwxr-xr-x | util/pbs/pbs.py | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/util/pbs/pbs.py b/util/pbs/pbs.py index ecacbeba2..292ddf1f9 100755 --- a/util/pbs/pbs.py +++ b/util/pbs/pbs.py @@ -91,19 +91,20 @@ class MyPOpen(object): class qsub: def __init__(self): + self.afterok = None self.hold = False self.join = False self.keep_stdout = False self.keep_stderr = False - self.node_type = '' + self.node_type = None self.mail_abort = False self.mail_begin = False self.mail_end = False - self.name = '' - self.stdout = '' - self.priority = 0 - self.queue = '' - self.pbshost = '' + self.name = None + self.stdout = None + self.priority = None + self.queue = None + self.pbshost = None self.qsub = 'qsub' self.env = {} @@ -118,7 +119,7 @@ class qsub: if self.hold: self.cmd.append('-h') - if len(self.stdout): + if self.stdout: self.cmd.append('-olocalhost:' + self.stdout) if self.keep_stdout and self.keep_stderr: @@ -133,7 +134,7 @@ class qsub: if self.join: self.cmd.append('-joe') - if len(self.node_type): + if self.node_type: self.cmd.append('-lnodes=' + self.node_type) if self.mail_abort or self.mail_begin or self.mail_end: @@ -147,15 +148,18 @@ class qsub: if len(flags): self.cmd.append('-m ' + flags) - if len(self.name): + if self.name: self.cmd.append("-N%s" % self.name) - if self.priority != 0: + if self.priority: self.cmd.append('-p' + self.priority) - if len(self.queue): + if self.queue: self.cmd.append('-q' + self.queue) + if self.afterok: + self.cmd.append('-Wdepend=afterok:%s' % self.after) + self.cmd.extend(args) self.script = script self.command = ' '.join(self.cmd + [ self.script ]) |