summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-01-10 19:23:07 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-01-10 19:23:07 -0800
commit9db967be9827d44150a840f52ecd1e0f28b5bd4e (patch)
tree3a6d1f0c53fa7f866706ae7b6379bf68435acb7a
parent011f71a442deb8d78f0e55ef1e502e2d2426f48c (diff)
downloadspack-9db967be9827d44150a840f52ecd1e0f28b5bd4e.tar.gz
spack-9db967be9827d44150a840f52ecd1e0f28b5bd4e.tar.bz2
spack-9db967be9827d44150a840f52ecd1e0f28b5bd4e.tar.xz
spack-9db967be9827d44150a840f52ecd1e0f28b5bd4e.zip
Fix bug when all deps are back edges.
- Happened with the graph for SAMRAI
-rw-r--r--lib/spack/spack/graph.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/spack/spack/graph.py b/lib/spack/spack/graph.py
index bebb68d06a..5fb6a9cd23 100644
--- a/lib/spack/spack/graph.py
+++ b/lib/spack/spack/graph.py
@@ -426,10 +426,13 @@ class AsciiGraph(object):
self._back_edge_line(prev_ends, b, i, False, 'left-1')
del prev_ends[:]
prev_ends.append(b)
- self._back_edge_line(prev_ends, -1, -1, False, 'left-2')
- if not self._frontier[i]:
- self._frontier.pop(i)
+ # Check whether we did ALL the deps as back edges,
+ # 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:
# Expand forward after doing all back connections