Skip to content

Commit 6e14115

Browse files
committed
retrieve numanode object by os index instead of logical index.
physical_id field stores os index, so we should use correct function to get hwloc numanode object. fixes: #1289
1 parent e042ee9 commit 6e14115

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/memtargets/memtarget_numa.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,16 +263,15 @@ static umf_result_t query_attribute_value(void *srcMemoryTarget,
263263
return UMF_RESULT_ERROR_NOT_SUPPORTED;
264264
}
265265

266-
hwloc_obj_t srcNumaNode = hwloc_get_obj_by_type(
267-
topology, HWLOC_OBJ_NUMANODE,
266+
hwloc_obj_t srcNumaNode = hwloc_get_numanode_obj_by_os_index(topology,
268267
((struct numa_memtarget_t *)srcMemoryTarget)->physical_id);
269268
if (!srcNumaNode) {
270269
LOG_PERR("Getting HWLOC object by type failed");
271270
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
272271
}
273272

274-
hwloc_obj_t dstNumaNode = hwloc_get_obj_by_type(
275-
topology, HWLOC_OBJ_NUMANODE,
273+
hwloc_obj_t dstNumaNode = hwloc_get_numanode_obj_by_os_index(
274+
topology,
276275
((struct numa_memtarget_t *)dstMemoryTarget)->physical_id);
277276
if (!dstNumaNode) {
278277
LOG_PERR("Getting HWLOC object by type failed");

0 commit comments

Comments
 (0)