Skip to content

Commit

Permalink
Minor fixes to allow compile with pre-stone age HWLOC
Browse files Browse the repository at this point in the history
Enables build against v1.11.8 and above.

Signed-off-by: Ralph Castain <[email protected]>
(cherry picked from commit ac80553)
  • Loading branch information
rhc54 committed Jul 3, 2024
1 parent d713c2c commit 55f6e2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hwloc/hwloc_base_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ static hwloc_obj_t df_search(hwloc_topology_t topo, hwloc_obj_t start, hwloc_obj
unsigned cache_level, unsigned int nobj, unsigned int *num_objs)
{
int search_depth;
PRTE_HIDE_UNUSED_PARAMS(start);

search_depth = hwloc_get_type_depth(topo, target);
if (HWLOC_TYPE_DEPTH_MULTIPLE == search_depth) {
Expand Down Expand Up @@ -1304,6 +1305,7 @@ static int bitmap_list_snprintf_exp(char *__hwloc_restrict buf, size_t buflen,
}
}
#else
PRTE_HIDE_UNUSED_PARAMS(set, type);
if (buflen > 0) {
tmp[0] = '\0';
}
Expand Down Expand Up @@ -1876,10 +1878,12 @@ int prte_hwloc_base_topology_set_flags(hwloc_topology_t topology, unsigned long
// Blacklist the "gl" component due to potential conflicts.
// See "https://github.com/open-mpi/ompi/issues/10025" for
// an explanation
#ifdef HWLOC_VERSION_MAJOR
#if HWLOC_VERSION_MAJOR > 2
hwloc_topology_set_components(topology, HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST, "gl");
#elif HWLOC_VERSION_MAJOR == 2 && HWLOC_VERSION_MINOR >= 1
hwloc_topology_set_components(topology, HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST, "gl");
#endif
#endif
return hwloc_topology_set_flags(topology, flags);
}
Expand Down

0 comments on commit 55f6e2e

Please sign in to comment.