Skip to content

Commit 3d27e0d

Browse files
committed
Add support for hwloc 2.0 API.
Signed-off-by: George Bosilca <[email protected]>
1 parent 569239e commit 3d27e0d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ompi/mca/topo/treematch/treematch/tm_topology.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,11 @@ tm_topology_t* hwloc_to_tm(char *filename)
198198
exit(-1);
199199
}
200200

201+
#if HWLOC_API_VERSION >= 0x00020000
202+
hwloc_topology_set_all_types_filter(topology, HWLOC_TYPE_FILTER_KEEP_STRUCTURE);
203+
#else /* HWLOC_API_VERSION >= 0x00020000 */
201204
hwloc_topology_ignore_all_keep_structure(topology);
205+
#endif /* HWLOC_API_VERSION >= 0x00020000 */
202206
hwloc_topology_load(topology);
203207

204208

@@ -291,7 +295,11 @@ tm_topology_t* get_local_topo_with_hwloc(void)
291295

292296
/* Build the topology */
293297
hwloc_topology_init(&topology);
298+
#if HWLOC_API_VERSION >= 0x00020000
299+
hwloc_topology_set_all_types_filter(topology, HWLOC_TYPE_FILTER_KEEP_STRUCTURE);
300+
#else /* HWLOC_API_VERSION >= 0x00020000 */
294301
hwloc_topology_ignore_all_keep_structure(topology);
302+
#endif /* HWLOC_API_VERSION >= 0x00020000 */
295303
hwloc_topology_load(topology);
296304

297305
/* Test if symetric */

0 commit comments

Comments
 (0)