diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-12-19 14:10:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-12-19 14:10:55 -0500 |
commit | 64e7516c91d9f2f7ca86928f8db00ca29f3eb544 (patch) | |
tree | b2eacbb36292918b48252b3ae69b7322272590ee /run_exps.py | |
parent | 8a5da068956f9f428ed138d2cabbc712918d52e6 (diff) |
Bug fix
Diffstat (limited to 'run_exps.py')
-rwxr-xr-x | run_exps.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/run_exps.py b/run_exps.py index 43de422..cc348ec 100755 --- a/run_exps.py +++ b/run_exps.py | |||
@@ -8,7 +8,7 @@ import re | |||
8 | import shutil | 8 | import shutil |
9 | import traceback | 9 | import traceback |
10 | 10 | ||
11 | from common import load_params | 11 | from common import load_params,get_executable |
12 | from optparse import OptionParser | 12 | from optparse import OptionParser |
13 | from run.executable.executable import Executable | 13 | from run.executable.executable import Executable |
14 | from run.experiment import Experiment,ExperimentDone | 14 | from run.experiment import Experiment,ExperimentDone |
@@ -46,7 +46,7 @@ def convert_data(data): | |||
46 | r"(?P<ENTRY>[\w\-\/]+)" | 46 | r"(?P<ENTRY>[\w\-\/]+)" |
47 | r"\s*{\s*(?P<CONTENT>.*?)\s*?}$)|" | 47 | r"\s*{\s*(?P<CONTENT>.*?)\s*?}$)|" |
48 | r"(?P<SPIN>^" | 48 | r"(?P<SPIN>^" |
49 | r"(?P<TYPE>\w+?spin)?\s*" | 49 | r"(?:(?P<TYPE>\w+) )?\s*" |
50 | r"(?P<ARGS>[\w\-_\d\. \=]+)\s*$)", | 50 | r"(?P<ARGS>[\w\-_\d\. \=]+)\s*$)", |
51 | re.S|re.I|re.M) | 51 | re.S|re.I|re.M) |
52 | 52 | ||
@@ -164,7 +164,9 @@ def run_exp(name, schedule, scheduler, kernel, duration, work_dir, out_dir): | |||
164 | # raise IndexError("No knowledge of program %s: %s" % (spin, name)) | 164 | # raise IndexError("No knowledge of program %s: %s" % (spin, name)) |
165 | 165 | ||
166 | real_spin = get_executable(spin, "") | 166 | real_spin = get_executable(spin, "") |
167 | real_args = ['-w'] + args.split() + [duration] | 167 | real_args = args.split() |
168 | if re.match(".*spin", real_spin): | ||
169 | real_args = ['-w'] + real_args + [duration] | ||
168 | 170 | ||
169 | if not lu.is_executable(real_spin): | 171 | if not lu.is_executable(real_spin): |
170 | raise OSError("Cannot run spin %s: %s" % (real_spin, name)) | 172 | raise OSError("Cannot run spin %s: %s" % (real_spin, name)) |