Skip to content

Commit

Permalink
Protect HWLOC_MEMBIND_BYNODESET behind version check
Browse files Browse the repository at this point in the history
  • Loading branch information
biddisco committed Oct 30, 2017
1 parent 0ad76de commit 6d4d6c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/runtime/threads/policies/hwloc_topology_info.cpp
Expand Up @@ -1174,6 +1174,7 @@ namespace hpx { namespace threads

int hwloc_topology_info::get_numa_domain(const void *addr, void *nodeset) const
{
#if HWLOC_API_VERSION >= 0x00010b00
hwloc_nodeset_t ns = reinterpret_cast<hwloc_nodeset_t>(nodeset);
int ret = hwloc_get_area_memlocation(topo, addr, 1, ns,
HWLOC_MEMBIND_BYNODESET);
Expand All @@ -1185,6 +1186,9 @@ namespace hpx { namespace threads
}
threads::mask_type mask = bitmap_to_mask(ns, HWLOC_OBJ_NUMANODE);
return threads::find_first(mask);
#else
return 0;
#endif
}

/// Free memory that was previously allocated by allocate
Expand Down

0 comments on commit 6d4d6c5

Please sign in to comment.