diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-03-18 13:15:42 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-03-18 13:15:42 -0400 |
commit | 16dfc8df20c6befeed423217a2e0f5ae59b5a04d (patch) | |
tree | 722ff18b111f6ab2fc11fffa46e78889bd2d5708 /run_exps.py | |
parent | 652a57b5a53e41e585c7e0d10601c807ba08c36f (diff) |
Use smarter defaults which can handle data from Bjorns scripts.
Diffstat (limited to 'run_exps.py')
-rwxr-xr-x | run_exps.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/run_exps.py b/run_exps.py index 195d3f8..a05ff93 100755 --- a/run_exps.py +++ b/run_exps.py | |||
@@ -2,13 +2,12 @@ | |||
2 | from __future__ import print_function | 2 | from __future__ import print_function |
3 | 3 | ||
4 | import config.config as conf | 4 | import config.config as conf |
5 | import run.litmus_util as lu | ||
6 | import os | 5 | import os |
7 | import re | 6 | import re |
8 | import shutil | 7 | import shutil |
9 | import traceback | 8 | import traceback |
10 | 9 | ||
11 | from common import load_params,get_executable | 10 | from common import load_params,get_executable,uname_matches,ft_freq |
12 | from optparse import OptionParser | 11 | from optparse import OptionParser |
13 | from run.executable.executable import Executable | 12 | from run.executable.executable import Executable |
14 | from run.experiment import Experiment,ExperimentDone | 13 | from run.experiment import Experiment,ExperimentDone |
@@ -125,7 +124,7 @@ def load_experiment(sched_file, scheduler, duration, param_file, out_dir): | |||
125 | (conf.PARAMS['dur'], duration)]) | 124 | (conf.PARAMS['dur'], duration)]) |
126 | 125 | ||
127 | # Feather-trace clock frequency saved for accurate overhead parsing | 126 | # Feather-trace clock frequency saved for accurate overhead parsing |
128 | ft_freq = lu.ft_freq() | 127 | ft_freq = ft_freq() |
129 | if ft_freq: | 128 | if ft_freq: |
130 | out_params[conf.PARAMS['cycles']] = ft_freq | 129 | out_params[conf.PARAMS['cycles']] = ft_freq |
131 | 130 | ||
@@ -146,7 +145,7 @@ def run_exp(name, schedule, scheduler, kernel, duration, work_dir, out_dir): | |||
146 | proc_entries = [] | 145 | proc_entries = [] |
147 | executables = [] | 146 | executables = [] |
148 | 147 | ||
149 | if kernel and not lu.uname_matches(kernel): | 148 | if kernel and not uname_matches(kernel): |
150 | raise InvalidKernel(kernel) | 149 | raise InvalidKernel(kernel) |
151 | 150 | ||
152 | # Parse values for proc entries | 151 | # Parse values for proc entries |
@@ -178,7 +177,7 @@ def run_exp(name, schedule, scheduler, kernel, duration, work_dir, out_dir): | |||
178 | if re.match(".*spin", real_spin): | 177 | if re.match(".*spin", real_spin): |
179 | real_args = ['-w'] + real_args + [duration] | 178 | real_args = ['-w'] + real_args + [duration] |
180 | 179 | ||
181 | if not lu.is_executable(real_spin): | 180 | if not is_executable(real_spin): |
182 | raise OSError("Cannot run spin %s: %s" % (real_spin, name)) | 181 | raise OSError("Cannot run spin %s: %s" % (real_spin, name)) |
183 | 182 | ||
184 | executables += [Executable(real_spin, real_args)] | 183 | executables += [Executable(real_spin, real_args)] |