aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2014-01-29 15:54:53 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2014-01-29 15:54:53 -0500
commit3e0f445a7643fcdd339069a08a4aa001ca061ee1 (patch)
treed8dcd35362f1c7991120813092c3a505b8805780
parentf21e72b2d22679154500e64bde37b83b3e587488 (diff)
Attach ideal end-to-end resp. time to pgmrt args
-rw-r--r--gen/generator.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/gen/generator.py b/gen/generator.py
index 682ea39..8b3a189 100644
--- a/gen/generator.py
+++ b/gen/generator.py
@@ -150,6 +150,7 @@ class Generator(object):
150 150
151 graph_desc_arg = [] 151 graph_desc_arg = []
152 rates_arg = [] 152 rates_arg = []
153 etoe_arg = []
153 exec_arg = [] 154 exec_arg = []
154 cluster_arg = [] 155 cluster_arg = []
155 clustersz_arg = [] 156 clustersz_arg = []
@@ -203,6 +204,7 @@ class Generator(object):
203 split_arg.append(split_arg_t) 204 split_arg.append(split_arg_t)
204 rates_arg.append(rates_arg_t) 205 rates_arg.append(rates_arg_t)
205 206
207
206 clustersz_arg.append(str(pgm_params['cpus'] / pgm_params['nr_clusters'])) 208 clustersz_arg.append(str(pgm_params['cpus'] / pgm_params['nr_clusters']))
207 209
208 # Use a wss cycle of 1.5x the graph depth to avoid cache 210 # Use a wss cycle of 1.5x the graph depth to avoid cache
@@ -211,6 +213,11 @@ class Generator(object):
211 # and later reused after processing by the last node. 213 # and later reused after processing by the last node.
212 wss_cycle_arg.append(str(int(math.ceil(g.depth * 1.5)))) 214 wss_cycle_arg.append(str(int(math.ceil(g.depth * 1.5))))
213 215
216 # get the ideal end-to-end response time
217 etoe = graph.compute_hrt_ideal_graph_latency(g)
218 etoe_arg.append(format(etoe/1000.0, '.4f').rstrip('0').rstrip('.'))
219
220
214 pgm_args = [] 221 pgm_args = []
215 for i in range(len(pgm_params['graphs'])): 222 for i in range(len(pgm_params['graphs'])):
216 pgm_args_t = ''; 223 pgm_args_t = '';
@@ -221,6 +228,8 @@ class Generator(object):
221 if len(wss_arg[i]) != 0: 228 if len(wss_arg[i]) != 0:
222 pgm_args_t += ' --wss ' + wss_arg[i] 229 pgm_args_t += ' --wss ' + wss_arg[i]
223 pgm_args_t += ' --wsCycle ' + wss_cycle_arg[i] 230 pgm_args_t += ' --wsCycle ' + wss_cycle_arg[i]
231 pgm_args_t += ' --etoe ' + etoe_arg[i]
232
224 233
225 # last argument must always be duration. actual duration given by run_exps.py 234 # last argument must always be duration. actual duration given by run_exps.py
226 pgm_args_t += ' --duration' 235 pgm_args_t += ' --duration'
@@ -490,9 +499,9 @@ class Generator(object):
490 # Write a sched.py and param.py for each partition method 499 # Write a sched.py and param.py for each partition method
491 ret = self._create_exp(_dp, ts, graphs, subts) 500 ret = self._create_exp(_dp, ts, graphs, subts)
492 if not ret: 501 if not ret:
493 print("Bin-packing fails for " + dir_leaf) 502 print(" Generated unschedulable ts for " + dir_leaf)
494 last_failed = dir_leaf 503 last_failed = dir_leaf
495 raise Exception("Failed to partition.") 504 raise Exception("Unschedulable.")
496 del(self.out_dir) 505 del(self.out_dir)
497 if PARAMS['trial'] in dp: 506 if PARAMS['trial'] in dp:
498 del dp[PARAMS['trial']] 507 del dp[PARAMS['trial']]