1
1

hwloc: core: only update root->complete sets if insert succeeds

Otherwise we get spurious bits for crazy topologies such as 8em64t-2s2ca2c-buggynuma.output

Will make debug asserts easier.

(cherry picked from commit open-mpi/hwloc@546cd9330a)
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
Brice Goglin 2015-01-18 12:33:57 +01:00 коммит произвёл Jeff Squyres
родитель dec01097f8
Коммит 5c9157c547

Просмотреть файл

@ -1026,14 +1026,16 @@ hwloc__insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t obj,
{
struct hwloc_obj *result;
/* Start at the top. */
result = hwloc___insert_object_by_cpuset(topology, topology->levels[0][0], obj, report_error);
if (result != obj) {
/* either failed to insert, or got merged, free the original object */
hwloc_free_unlinked_object(obj);
} else {
/* Add the cpuset to the top */
hwloc_bitmap_or(topology->levels[0][0]->complete_cpuset, topology->levels[0][0]->complete_cpuset, obj->cpuset);
if (obj->nodeset)
hwloc_bitmap_or(topology->levels[0][0]->complete_nodeset, topology->levels[0][0]->complete_nodeset, obj->nodeset);
result = hwloc___insert_object_by_cpuset(topology, topology->levels[0][0], obj, report_error);
if (result != obj)
/* either failed to insert, or got merged, free the original object */
hwloc_free_unlinked_object(obj);
}
return result;
}