Skip to content

Commit 907ad85

Browse files
committed
hwloc/base: fix opal proc locality wrt to NUMA nodes on hwloc 1.11
Build was broken by mistake in commit d40662edc41a5a4d09ae690b640cfdeeb24e15a1 Fixes #7362 Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
1 parent 395e2c9 commit 907ad85

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

opal/mca/hwloc/base/hwloc_base_util.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* All rights reserved.
2121
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
2222
* Copyright (c) 2019 IBM Corporation. All rights reserved.
23-
* Copyright (c) 2019 Inria. All rights reserved.
23+
* Copyright (c) 2019-2020 Inria. All rights reserved.
2424
* $COPYRIGHT$
2525
*
2626
* Additional copyrights may follow
@@ -2203,15 +2203,16 @@ char* opal_hwloc_base_get_locality_string(hwloc_topology_t topo,
22032203
locality = t2;
22042204
break;
22052205
#if HWLOC_API_VERSION < 0x20000
2206-
case HWLOC_OBJ_CACHE:
2207-
if (3 == obj->attr->cache.depth) {
2206+
case HWLOC_OBJ_CACHE: {
2207+
unsigned cachedepth = hwloc_get_obj_by_depth(topo, d, 0)->attr->cache.depth;
2208+
if (3 == cachedepth) {
22082209
opal_asprintf(&t2, "%sL3%s:", (NULL == locality) ? "" : locality, tmp);
22092210
if (NULL != locality) {
22102211
free(locality);
22112212
}
22122213
locality = t2;
22132214
break;
2214-
} else if (2 == obj->attr->cache.depth) {
2215+
} else if (2 == cachedepth) {
22152216
opal_asprintf(&t2, "%sL2%s:", (NULL == locality) ? "" : locality, tmp);
22162217
if (NULL != locality) {
22172218
free(locality);
@@ -2227,6 +2228,7 @@ char* opal_hwloc_base_get_locality_string(hwloc_topology_t topo,
22272228
break;
22282229
}
22292230
break;
2231+
}
22302232
#else
22312233
case HWLOC_OBJ_L3CACHE:
22322234
opal_asprintf(&t2, "%sL3%s:", (NULL == locality) ? "" : locality, tmp);

0 commit comments

Comments
 (0)