aboutsummaryrefslogtreecommitdiffstats
path: root/run_exps.py
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-03-18 13:15:42 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2013-03-18 13:15:42 -0400
commit16dfc8df20c6befeed423217a2e0f5ae59b5a04d (patch)
tree722ff18b111f6ab2fc11fffa46e78889bd2d5708 /run_exps.py
parent652a57b5a53e41e585c7e0d10601c807ba08c36f (diff)
Use smarter defaults which can handle data from Bjorns scripts.
Diffstat (limited to 'run_exps.py')
-rwxr-xr-xrun_exps.py9
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 @@
2from __future__ import print_function 2from __future__ import print_function
3 3
4import config.config as conf 4import config.config as conf
5import run.litmus_util as lu
6import os 5import os
7import re 6import re
8import shutil 7import shutil
9import traceback 8import traceback
10 9
11from common import load_params,get_executable 10from common import load_params,get_executable,uname_matches,ft_freq
12from optparse import OptionParser 11from optparse import OptionParser
13from run.executable.executable import Executable 12from run.executable.executable import Executable
14from run.experiment import Experiment,ExperimentDone 13from 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)]