hwloc: groups: add complete sets when inserting distance/pci groups
Make sure we define complete cpuset/nodeset when we define groups' main cpuset/nodeset during later insert of groups (for PCI hostbridges or distances). Otherwise they may end up clearing child/parent complete sets which suddenly become incoherent while they were fixed earlier. Needed to fix allowed_nodeset meaning. (cherry picked from commit open-mpi/hwloc@7c88d17add) Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
родитель
d6e415cd41
Коммит
dec01097f8
@ -852,12 +852,22 @@ hwloc__groups_by_distances(struct hwloc_topology *topology,
|
||||
if (groupids[j] == i+1) {
|
||||
/* assemble the group cpuset */
|
||||
hwloc_bitmap_or(group_obj->cpuset, group_obj->cpuset, objs[j]->cpuset);
|
||||
if (objs[i]->complete_cpuset) {
|
||||
if (!group_obj->complete_cpuset)
|
||||
group_obj->complete_cpuset = hwloc_bitmap_alloc();
|
||||
hwloc_bitmap_or(group_obj->complete_cpuset, group_obj->complete_cpuset, objs[j]->complete_cpuset);
|
||||
}
|
||||
/* if one obj has a nodeset, assemble a group nodeset */
|
||||
if (objs[j]->nodeset) {
|
||||
if (!group_obj->nodeset)
|
||||
group_obj->nodeset = hwloc_bitmap_alloc();
|
||||
hwloc_bitmap_or(group_obj->nodeset, group_obj->nodeset, objs[j]->nodeset);
|
||||
}
|
||||
if (objs[i]->complete_nodeset) {
|
||||
if (!group_obj->complete_nodeset)
|
||||
group_obj->complete_nodeset = hwloc_bitmap_alloc();
|
||||
hwloc_bitmap_or(group_obj->complete_nodeset, group_obj->complete_nodeset, objs[j]->complete_nodeset);
|
||||
}
|
||||
groupsizes[i]++;
|
||||
}
|
||||
hwloc_debug_1arg_bitmap("adding Group object with %u objects and cpuset %s\n",
|
||||
@ -1010,12 +1020,22 @@ hwloc_group_by_distances(struct hwloc_topology *topology)
|
||||
for(i=0; i<nbobjs; i++) {
|
||||
/* assemble the group cpuset */
|
||||
hwloc_bitmap_or(group_obj->cpuset, group_obj->cpuset, osdist->objs[i]->cpuset);
|
||||
if (osdist->objs[i]->complete_cpuset) {
|
||||
if (!group_obj->complete_cpuset)
|
||||
group_obj->complete_cpuset = hwloc_bitmap_alloc();
|
||||
hwloc_bitmap_or(group_obj->complete_cpuset, group_obj->complete_cpuset, osdist->objs[i]->complete_cpuset);
|
||||
}
|
||||
/* if one obj has a nodeset, assemble a group nodeset */
|
||||
if (osdist->objs[i]->nodeset) {
|
||||
if (!group_obj->nodeset)
|
||||
group_obj->nodeset = hwloc_bitmap_alloc();
|
||||
hwloc_bitmap_or(group_obj->nodeset, group_obj->nodeset, osdist->objs[i]->nodeset);
|
||||
}
|
||||
if (osdist->objs[i]->complete_nodeset) {
|
||||
if (!group_obj->complete_nodeset)
|
||||
group_obj->complete_nodeset = hwloc_bitmap_alloc();
|
||||
hwloc_bitmap_or(group_obj->complete_nodeset, group_obj->complete_nodeset, osdist->objs[i]->complete_nodeset);
|
||||
}
|
||||
}
|
||||
hwloc_debug_1arg_bitmap("adding Group object (as root of distance matrix with %u objects) with cpuset %s\n",
|
||||
nbobjs, group_obj->cpuset);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2009-2014 Inria. All rights reserved.
|
||||
* Copyright © 2009-2015 Inria. All rights reserved.
|
||||
* See COPYING in top-level directory.
|
||||
*/
|
||||
|
||||
@ -263,6 +263,7 @@ hwloc_pci_find_hostbridge_parent(struct hwloc_topology *topology, struct hwloc_b
|
||||
hwloc_obj_t group_obj = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, -1);
|
||||
if (group_obj) {
|
||||
group_obj->cpuset = hwloc_bitmap_dup(cpuset);
|
||||
group_obj->complete_cpuset = hwloc_bitmap_dup(cpuset);
|
||||
group_obj->attr->group.depth = (unsigned) -1;
|
||||
parent = hwloc__insert_object_by_cpuset(topology, group_obj, hwloc_report_os_error);
|
||||
if (parent == group_obj)
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user