Skip to content

Commit a967ef9

Browse files
bgoglinndenoyelle
authored andcommitted
keep_structure: only merge levels which are actually parent/children
We never checked the parent/child relationship because the number of object in (unrelated) consecutive levels (in depth order) is very often different. However this is really needed in practice. Fixes #363 Thanks to Mark Allen for reporting the issue. He had a P9 machine restricted to only 6 cores. And there were also 6 groups for CPU-less GPU memory nodes. Those levels are really unrelated, but the core algorithm decided to place them nearby in the list of depths. In git master, this issue would only occur if we disable the auto-ignoring of these GPU nodes. Signed-off-by: Brice Goglin <[email protected]>
1 parent c29eacd commit a967ef9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hwloc/topology.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,6 +2342,8 @@ hwloc_compare_levels_structure(hwloc_topology_t topology, unsigned i)
23422342
return -1;
23432343

23442344
for(j=0; j<topology->level_nbobjects[i]; j++) {
2345+
if (topology->levels[i-1][j] != topology->levels[i][j]->parent)
2346+
return -1;
23452347
if (topology->levels[i-1][j]->arity != 1)
23462348
return -1;
23472349
if (checkmemory && topology->levels[i-1][j]->memory_arity)

0 commit comments

Comments
 (0)