aboutsummaryrefslogtreecommitdiff
path: root/steuermann/run_all.py
diff options
context:
space:
mode:
authorcslocum <cslocum@d34015c8-bcbb-4646-8ac8-8ba5febf221d>2012-12-20 13:32:14 -0500
committercslocum <cslocum@d34015c8-bcbb-4646-8ac8-8ba5febf221d>2012-12-20 13:32:14 -0500
commitaf21e87b9460dc695b5a45733199d1981f2e653a (patch)
tree7adc8828a86ce074426b1a23cd3338e363780931 /steuermann/run_all.py
parent620f7f512533a8e642e9fdfdcbf70a69da57d4aa (diff)
downloadsteuermann-af21e87b9460dc695b5a45733199d1981f2e653a.tar.gz
fix but related to how run_step tracks resources
git-svn-id: https://svn.stsci.edu/svn/ssb/etal/steuermann/trunk@911 d34015c8-bcbb-4646-8ac8-8ba5febf221d
Diffstat (limited to 'steuermann/run_all.py')
-rw-r--r--steuermann/run_all.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/steuermann/run_all.py b/steuermann/run_all.py
index 1a64a5b..288b9ee 100644
--- a/steuermann/run_all.py
+++ b/steuermann/run_all.py
@@ -500,9 +500,6 @@ def run_step( runner, xnodes, run_name, db ) :
enough = False
break
- if enough:
- x.used_resources[res] = amount
-
if not enough:
continue
@@ -547,7 +544,11 @@ def run_step( runner, xnodes, run_name, db ) :
# allocate common resources
for res, amount in x.resources.items():
if res in common_resources_avail.keys():
- amount = x.used_resources[res]
+ if amount == 'all':
+ amount = common_resources[res]
+ elif amount == 'available':
+ if avail > 0:
+ amount = avail
common_resources_avail[res] -= amount
tmp = runner.run(x, run_name, no_run=no_run, logfile_name = make_log_file_name(run_name, host, table, cmd) )
@@ -577,7 +578,8 @@ def run_step( runner, xnodes, run_name, db ) :
print "WARNING: runner.run() returned unknown code %s"%str(tmp)
db.commit()
-
+
+
# if anything has exited, we process it and update the status in the database
while 1 :
@@ -599,7 +601,11 @@ def run_step( runner, xnodes, run_name, db ) :
# de-allocate common resources
for res, amount in x.resources.items():
if res in common_resources_avail.keys():
- amount = x.used_resources[res]
+ if amount == 'all':
+ amount = common_resources[res]
+ elif amount == 'available':
+ if avail > 0:
+ amount = avail
common_resources_avail[res] += amount