1
1

hwloc: debug: fix an overzealous assertion about the parent cpuset vs its children

When I/O are attached under a PU, removing the children's cpusets from
the parent cpuset doesn't give 0, it gives the PU cpuset.
The assertion fails on single-pu machines with I/O when --merge is given,
only one PU remains with I/O under it.

But if we insert Misc by cpuset under PU, it gives 0 as expected.

Fix the assertion accordingly.

Thanks to Thomas Van Doren for reporting the issue.

(cherry picked from commit open-mpi/hwloc@45c94c336d)
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
Brice Goglin 2014-11-25 10:10:56 +01:00 коммит произвёл Jeff Squyres
родитель 9b59d532fc
Коммит 5427b33caf

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

@ -3035,7 +3035,17 @@ hwloc__check_children(struct hwloc_obj *parent)
assert(hwloc_bitmap_isincluded(parent->children[j]->cpuset, remaining_parent_set));
hwloc_bitmap_andnot(remaining_parent_set, remaining_parent_set, parent->children[j]->cpuset);
}
assert(hwloc_bitmap_iszero(remaining_parent_set));
if (parent->type == HWLOC_OBJ_PU) {
/* if parent is a PU, its os_index bit may remain.
* it may be in a Misc child inserted by cpuset, or could be in no child */
if (hwloc_bitmap_weight(remaining_parent_set) == 1)
assert((unsigned) hwloc_bitmap_first(remaining_parent_set) == parent->os_index);
else
assert(hwloc_bitmap_iszero(remaining_parent_set));
} else {
/* nothing remains */
assert(hwloc_bitmap_iszero(remaining_parent_set));
}
hwloc_bitmap_free(remaining_parent_set);
}