Skip to content

Commit

Permalink
mpibind: update for hwloc v2.x compatibility
Browse files Browse the repository at this point in the history
Problem: The hwloc_topology_set_flags(3) function has been removed
from hwloc v2.x.

Replace it with the various types filter options, which will keep
"important" I/O devices, and structure only for caches and instruction
caches.
  • Loading branch information
grondo committed Jun 26, 2020
1 parent bdc38e9 commit ab4624e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mpibind.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,16 @@ int slurm_spank_user_init (spank_t sp, int32_t ac, char **av)
/* Allocate and initialize topology object. */
hwloc_topology_init (&topology);

#if HWLOC_API_VERSION < 0x20000
hwloc_topology_set_flags (topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES);
#else
hwloc_topology_set_io_types_filter (topology,
HWLOC_TYPE_FILTER_KEEP_IMPORTANT);
hwloc_topology_set_cache_types_filter (topology,
HWLOC_TYPE_FILTER_KEEP_STRUCTURE);
hwloc_topology_set_icache_types_filter (topology,
HWLOC_TYPE_FILTER_KEEP_STRUCTURE);
#endif

/* Perform the topology detection. */
hwloc_topology_load (topology);
Expand Down

0 comments on commit ab4624e

Please sign in to comment.