Fixed a minor bug if there're no actual PEs to be built into a spanning tree
authorChao Mei <chaomei2@illinois.edu>
Fri, 12 Nov 2010 18:56:23 +0000 (12:56 -0600)
committerChao Mei <chaomei2@illinois.edu>
Fri, 12 Nov 2010 18:56:23 +0000 (12:56 -0600)
src/util/treeStrategy_topoUnaware.h

index b4edb7da8d6b5287f0e464807c948c5cb5387639..27ef31de7cdba5b935d5602de547881fae0152be 100644 (file)
@@ -64,6 +64,9 @@ namespace impl {
         /// Return data holds the parent vertex info [and child info, if there are any]
         SpanningTreeVertex *parent = new SpanningTreeVertex(*firstVtx);
 
+       //Containing no actual nodes to be built
+       if(firstVtx+1 == beyondLastVtx) return parent;
+
        //key is the node id, and the mapped value is the local index
        std::map<int, int> nodesMap;
        #if CMK_SMP