diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-11-20 16:02:40 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-11-20 16:02:40 -0500 |
commit | 41c867480f1e20bd3b168258ed71450499ea6ccf (patch) | |
tree | b47963b417ba9bdd53f03d5c621b72bcca297ef6 /parse_exps.py | |
parent | 1abea5f67c2c70053af0a59db715a210df2e0bef (diff) |
Removed 2-step parse for overheads.
Diffstat (limited to 'parse_exps.py')
-rwxr-xr-x | parse_exps.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/parse_exps.py b/parse_exps.py index 24bdb85..d932b0d 100755 --- a/parse_exps.py +++ b/parse_exps.py | |||
@@ -42,7 +42,7 @@ def parse_args(): | |||
42 | return parser.parse_args() | 42 | return parser.parse_args() |
43 | 43 | ||
44 | ExpData = namedtuple('ExpData', ['name', 'params', 'data_files', 'is_base']) | 44 | ExpData = namedtuple('ExpData', ['name', 'params', 'data_files', 'is_base']) |
45 | DataFiles = namedtuple('DataFiles', ['ft','st']) | 45 | DataFiles = namedtuple('DataFiles', ['st']) |
46 | 46 | ||
47 | def get_exp_params(data_dir, col_map): | 47 | def get_exp_params(data_dir, col_map): |
48 | param_file = "%s/%s" % (data_dir, conf.DEFAULTS['params_file']) | 48 | param_file = "%s/%s" % (data_dir, conf.DEFAULTS['params_file']) |
@@ -82,10 +82,7 @@ def gen_exp_data(exp_dirs, base_conf, col_map, force): | |||
82 | 82 | ||
83 | # Read and translate exp output files | 83 | # Read and translate exp output files |
84 | params = get_exp_params(data_dir, col_map) | 84 | params = get_exp_params(data_dir, col_map) |
85 | cycles = int(params[conf.PARAMS['cycles']]) | ||
86 | st_output = st.get_st_output(data_dir, tmp_dir, force) | 85 | st_output = st.get_st_output(data_dir, tmp_dir, force) |
87 | ft_output = ft.get_ft_output(data_dir, cycles, tmp_dir, force) | ||
88 | |||
89 | 86 | ||
90 | if base_conf and base_conf.viewitems() & params.viewitems(): | 87 | if base_conf and base_conf.viewitems() & params.viewitems(): |
91 | if not st_output: | 88 | if not st_output: |
@@ -97,14 +94,14 @@ def gen_exp_data(exp_dirs, base_conf, col_map, force): | |||
97 | base_params.pop(base_conf.keys()[0]) | 94 | base_params.pop(base_conf.keys()[0]) |
98 | 95 | ||
99 | base_exp = ExpData(data_dir, base_params, | 96 | base_exp = ExpData(data_dir, base_params, |
100 | DataFiles(ft_output, st_output), True) | 97 | DataFiles(st_output), True) |
101 | scaling_bases += [base_exp] | 98 | scaling_bases += [base_exp] |
102 | else: | 99 | else: |
103 | is_base = False | 100 | is_base = False |
104 | 101 | ||
105 | # Create experiment named after the data dir | 102 | # Create experiment named after the data dir |
106 | exp_data = ExpData(data_dir, params, | 103 | exp_data = ExpData(data_dir, params, |
107 | DataFiles(ft_output, st_output), is_base) | 104 | DataFiles(st_output), is_base) |
108 | 105 | ||
109 | plain_exps += [exp_data] | 106 | plain_exps += [exp_data] |
110 | 107 | ||
@@ -142,13 +139,20 @@ def main(): | |||
142 | base_table.add_exp(base.params, base) | 139 | base_table.add_exp(base.params, base) |
143 | 140 | ||
144 | sys.stderr.write("Parsing data...\n") | 141 | sys.stderr.write("Parsing data...\n") |
142 | for exp in args: | ||
143 | result = ExpPoint(exp) | ||
144 | params = get_exp_params(exp, col_map) | ||
145 | # Write overheads into result | ||
146 | ft.extract_ft_data(result, exp, | ||
147 | params[conf.PARAMS['cycles']], | ||
148 | exp + "/tmp") | ||
149 | |||
150 | if opts.verbose: | ||
151 | print(result) | ||
152 | |||
145 | for i,exp in enumerate(plain_exps): | 153 | for i,exp in enumerate(plain_exps): |
146 | result = ExpPoint(exp.name) | 154 | result = ExpPoint(exp.name) |
147 | 155 | ||
148 | if exp.data_files.ft: | ||
149 | # Write overheads into result | ||
150 | ft.extract_ft_data(exp.data_files.ft, result, conf.BASE_EVENTS) | ||
151 | |||
152 | if exp.data_files.st: | 156 | if exp.data_files.st: |
153 | base = None | 157 | base = None |
154 | if base_conf and not exp.is_base: | 158 | if base_conf and not exp.is_base: |