From 38524b6334a2396a4011473ab4c803c687677611 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Mon, 27 Jan 2014 13:18:28 -0500 Subject: Write graphs to .dot files. --- gen/generator.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gen/generator.py b/gen/generator.py index 7a994e9..682ea39 100644 --- a/gen/generator.py +++ b/gen/generator.py @@ -136,6 +136,11 @@ class Generator(object): with open(sched_file, 'wa') as f: f.write(str(Template(self.template, searchList=[params]))) + def _write_graph(self, graph, pgm_params): + graph_file = self.out_dir + ("/graph_%d.dot" % graph.id) + with open(graph_file, 'w') as f: + f.write(graph.dot()) + def _write_pgm_schedule(self, pgm_params): '''Write schedule file using current template for @params.''' # make pgmrt arguments using graphs and tasks. @@ -152,6 +157,9 @@ class Generator(object): wss_cycle_arg = [] split_arg = [] for g in pgm_params['graphs']: + + self._write_graph(g, pgm_params) + cluster_arg_t = [] graph_desc_arg_t = [] exec_arg_t = [] -- cgit v1.2.2