Skip to content

Commit 9bc39c9

Browse files
authored
Merge pull request #1309 from lplewa/numa_index
retrieve numanode object by os index instead of logical index.
2 parents 4d3f55b + 8791801 commit 9bc39c9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/memtargets/memtarget_numa.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,17 +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,
268-
((struct numa_memtarget_t *)srcMemoryTarget)->physical_id);
266+
hwloc_obj_t srcNumaNode = hwloc_get_numanode_obj_by_os_index(
267+
topology, ((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,
276-
((struct numa_memtarget_t *)dstMemoryTarget)->physical_id);
273+
hwloc_obj_t dstNumaNode = hwloc_get_numanode_obj_by_os_index(
274+
topology, ((struct numa_memtarget_t *)dstMemoryTarget)->physical_id);
277275
if (!dstNumaNode) {
278276
LOG_PERR("Getting HWLOC object by type failed");
279277
return UMF_RESULT_ERROR_INVALID_ARGUMENT;

0 commit comments

Comments
 (0)