File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 20
20
* All rights reserved.
21
21
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
22
22
* 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.
24
24
* $COPYRIGHT$
25
25
*
26
26
* Additional copyrights may follow
@@ -2203,15 +2203,16 @@ char* opal_hwloc_base_get_locality_string(hwloc_topology_t topo,
2203
2203
locality = t2 ;
2204
2204
break ;
2205
2205
#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 ) {
2208
2209
opal_asprintf (& t2 , "%sL3%s:" , (NULL == locality ) ? "" : locality , tmp );
2209
2210
if (NULL != locality ) {
2210
2211
free (locality );
2211
2212
}
2212
2213
locality = t2 ;
2213
2214
break ;
2214
- } else if (2 == obj -> attr -> cache . depth ) {
2215
+ } else if (2 == cachedepth ) {
2215
2216
opal_asprintf (& t2 , "%sL2%s:" , (NULL == locality ) ? "" : locality , tmp );
2216
2217
if (NULL != locality ) {
2217
2218
free (locality );
@@ -2227,6 +2228,7 @@ char* opal_hwloc_base_get_locality_string(hwloc_topology_t topo,
2227
2228
break ;
2228
2229
}
2229
2230
break ;
2231
+ }
2230
2232
#else
2231
2233
case HWLOC_OBJ_L3CACHE :
2232
2234
opal_asprintf (& t2 , "%sL3%s:" , (NULL == locality ) ? "" : locality , tmp );
You can’t perform that action at this time.
0 commit comments