aboutsummaryrefslogtreecommitdiffstats
path: root/run/experiment.py
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-04-10 15:32:39 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2013-04-10 15:32:39 -0400
commit384e322f974534c1c734db144633e3c3e002b1f8 (patch)
tree1637267cea4cb5166677f272e97b19ce8331a36c /run/experiment.py
parent4162cc0c57de22566efa6e2dab224909279f2a47 (diff)
Added option to send email when experiments complete.
Diffstat (limited to 'run/experiment.py')
-rw-r--r--run/experiment.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/run/experiment.py b/run/experiment.py
index 3dd4866..e5811f8 100644
--- a/run/experiment.py
+++ b/run/experiment.py
@@ -87,6 +87,10 @@ class Experiment(object):
87 def __run_tasks(self): 87 def __run_tasks(self):
88 already_waiting = lu.waiting_tasks() 88 already_waiting = lu.waiting_tasks()
89 89
90 if already_waiting:
91 self.log("Already %d tasks waiting for release!")
92 self.log("Experiment will fail if any of these tasks are released.")
93
90 self.log("Starting the programs") 94 self.log("Starting the programs")
91 for e in self.executables: 95 for e in self.executables:
92 try: 96 try:
@@ -115,7 +119,6 @@ class Experiment(object):
115 # Need to re-release non-released tasks before we can kill them though 119 # Need to re-release non-released tasks before we can kill them though
116 self.log("Failed to release {} tasks! Re-releasing and killing".format( 120 self.log("Failed to release {} tasks! Re-releasing and killing".format(
117 len(self.executables) - released, len(self.executables))) 121 len(self.executables) - released, len(self.executables)))
118
119 time.sleep(5) 122 time.sleep(5)
120 123
121 released = lu.release_tasks() 124 released = lu.release_tasks()
@@ -160,7 +163,10 @@ class Experiment(object):
160 self.teardown() 163 self.teardown()
161 finally: 164 finally:
162 self.log("Switching to Linux scheduler") 165 self.log("Switching to Linux scheduler")
163 lu.switch_scheduler("Linux") 166 try:
167 lu.switch_scheduler("Linux")
168 except:
169 self.log("Failed to switch back to Linux.")
164 170
165 if succ: 171 if succ:
166 self.__save_results() 172 self.__save_results()