From 38e363c515bb5593ea7fdab2e654f7de3a228fd4 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 22 Aug 2017 14:07:36 -0700 Subject: [PATCH] Fix the #if check for hwloc version Signed-off-by: Ralph Castain --- opal/mca/btl/openib/btl_openib_component.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opal/mca/btl/openib/btl_openib_component.c b/opal/mca/btl/openib/btl_openib_component.c index 5e99e1829e..f6d3643306 100644 --- a/opal/mca/btl/openib/btl_openib_component.c +++ b/opal/mca/btl/openib/btl_openib_component.c @@ -2350,8 +2350,8 @@ static float get_ib_dev_distance(struct ibv_device *dev) if (NULL == hwloc_distances) { #if HWLOC_API_VERSION < 0x20000 hwloc_distances = - hwloc_get_whole_distance_matrix_by_type(opal_hwloc_topology, - HWLOC_OBJ_NODE); + (struct hwloc_distances_s*)hwloc_get_whole_distance_matrix_by_type(opal_hwloc_topology, + HWLOC_OBJ_NODE); /* If we got no info, just return 0 */ if (NULL == hwloc_distances || NULL == hwloc_distances->latency) { goto out; @@ -2559,7 +2559,7 @@ static float get_ib_dev_distance(struct ibv_device *dev) hwloc_bitmap_free(my_cpuset); } -#if HWLOC_API_VERSION < 0x20000 +#if HWLOC_API_VERSION >= 0x20000 if (NULL != hwloc_distances) { hwloc_distances_release(opal_hwloc_topology, hwloc_distances); }