]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
distances: don't attach the matrix to Misc obje...
authorBrice Goglin <brice.goglin@inria.fr>
Sun, 8 Sep 2013 13:56:43 +0000 (13:56 +0000)
committerBrice Goglin <brice.goglin@inria.fr>
Sun, 8 Sep 2013 13:56:43 +0000 (13:56 +0000)
distances: don't attach the matrix to Misc objects

Those have a special depth, it would mess up the distance relative_depth

This fixes tests/hwloc_insert_misc on NUMA platforms.

This commit was SVN r5789.

src/distances.c

index bac26bb7f543ca3321893b19f2383ab2c9b22897..ca3f7eada2d6cb437732fcdbb50c470a1f2937f6 100644 (file)
@@ -527,6 +527,9 @@ hwloc_distances__finalize_logical(struct hwloc_topology *topology,
     hwloc_bitmap_free(nodeset);
     return;
   }
+  /* don't attach to Misc objects */
+  while (root->type == HWLOC_OBJ_MISC)
+    root = root->parent;
   /* ideally, root has the exact cpuset and nodeset.
    * but ignoring or other things that remove objects may cause the object array to reduce */
   assert(hwloc_bitmap_isincluded(cpuset, root->cpuset));