Fix bug when all deps are back edges.

- Happened with the graph for SAMRAI
This commit is contained in:
Todd Gamblin 2015-01-10 19:23:07 -08:00
parent 011f71a442
commit 9db967be98

View File

@ -426,10 +426,13 @@ def write(self, spec, **kwargs):
self._back_edge_line(prev_ends, b, i, False, 'left-1') self._back_edge_line(prev_ends, b, i, False, 'left-1')
del prev_ends[:] del prev_ends[:]
prev_ends.append(b) prev_ends.append(b)
self._back_edge_line(prev_ends, -1, -1, False, 'left-2')
if not self._frontier[i]: # Check whether we did ALL the deps as back edges,
self._frontier.pop(i) # in which case we're done.
collapse = not self._frontier[i]
if collapse:
self._frontier.pop(i)
self._back_edge_line(prev_ends, -1, -1, collapse, 'left-2')
elif len(self._frontier[i]) > 1: elif len(self._frontier[i]) > 1:
# Expand forward after doing all back connections # Expand forward after doing all back connections