From 3e0f445a7643fcdd339069a08a4aa001ca061ee1 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Wed, 29 Jan 2014 15:54:53 -0500 Subject: Attach ideal end-to-end resp. time to pgmrt args --- gen/generator.py | 13 +++++++++++-- 1 file 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): graph_desc_arg = [] rates_arg = [] + etoe_arg = [] exec_arg = [] cluster_arg = [] clustersz_arg = [] @@ -203,6 +204,7 @@ class Generator(object): split_arg.append(split_arg_t) rates_arg.append(rates_arg_t) + clustersz_arg.append(str(pgm_params['cpus'] / pgm_params['nr_clusters'])) # Use a wss cycle of 1.5x the graph depth to avoid cache @@ -211,6 +213,11 @@ class Generator(object): # and later reused after processing by the last node. wss_cycle_arg.append(str(int(math.ceil(g.depth * 1.5)))) + # get the ideal end-to-end response time + etoe = graph.compute_hrt_ideal_graph_latency(g) + etoe_arg.append(format(etoe/1000.0, '.4f').rstrip('0').rstrip('.')) + + pgm_args = [] for i in range(len(pgm_params['graphs'])): pgm_args_t = ''; @@ -221,6 +228,8 @@ class Generator(object): if len(wss_arg[i]) != 0: pgm_args_t += ' --wss ' + wss_arg[i] pgm_args_t += ' --wsCycle ' + wss_cycle_arg[i] + pgm_args_t += ' --etoe ' + etoe_arg[i] + # last argument must always be duration. actual duration given by run_exps.py pgm_args_t += ' --duration' @@ -490,9 +499,9 @@ class Generator(object): # Write a sched.py and param.py for each partition method ret = self._create_exp(_dp, ts, graphs, subts) if not ret: - print("Bin-packing fails for " + dir_leaf) + print(" Generated unschedulable ts for " + dir_leaf) last_failed = dir_leaf - raise Exception("Failed to partition.") + raise Exception("Unschedulable.") del(self.out_dir) if PARAMS['trial'] in dp: del dp[PARAMS['trial']] -- cgit v1.2.2