aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2014-01-27 13:18:28 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2014-01-27 13:18:28 -0500
commit38524b6334a2396a4011473ab4c803c687677611 (patch)
treedc3e1efc02dc2113cd44f55abc65958fb7c1e0d0
parente5931e397619be9db804278bd7878caedd94364a (diff)
Write graphs to .dot files.
-rw-r--r--gen/generator.py8
1 files changed, 8 insertions, 0 deletions
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):
136 with open(sched_file, 'wa') as f: 136 with open(sched_file, 'wa') as f:
137 f.write(str(Template(self.template, searchList=[params]))) 137 f.write(str(Template(self.template, searchList=[params])))
138 138
139 def _write_graph(self, graph, pgm_params):
140 graph_file = self.out_dir + ("/graph_%d.dot" % graph.id)
141 with open(graph_file, 'w') as f:
142 f.write(graph.dot())
143
139 def _write_pgm_schedule(self, pgm_params): 144 def _write_pgm_schedule(self, pgm_params):
140 '''Write schedule file using current template for @params.''' 145 '''Write schedule file using current template for @params.'''
141 # make pgmrt arguments using graphs and tasks. 146 # make pgmrt arguments using graphs and tasks.
@@ -152,6 +157,9 @@ class Generator(object):
152 wss_cycle_arg = [] 157 wss_cycle_arg = []
153 split_arg = [] 158 split_arg = []
154 for g in pgm_params['graphs']: 159 for g in pgm_params['graphs']:
160
161 self._write_graph(g, pgm_params)
162
155 cluster_arg_t = [] 163 cluster_arg_t = []
156 graph_desc_arg_t = [] 164 graph_desc_arg_t = []
157 exec_arg_t = [] 165 exec_arg_t = []