Skip to content

Commit 59f40e7

Browse files
authored
Merge pull request #2500 from vspetrov/hcoll_ctx_free_detection
Detect hcoll_context_free at config
2 parents 7af49eb + e13e264 commit 59f40e7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

config/ompi_check_libhcoll.m4

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ AC_DEFUN([OMPI_CHECK_HCOLL],[
4747
[ompi_check_hcoll_happy="yes"],
4848
[ompi_check_hcoll_happy="no"])
4949

50+
AS_IF([test "$ompi_check_hcoll_happy" = "yes"],
51+
[
52+
CPPFLAGS=$coll_hcoll_CPPFLAGS
53+
LDFLAGS=$coll_hcoll_LDFLAGS
54+
LIBS=$coll_hcoll_LIBS
55+
AC_CHECK_FUNCS(hcoll_context_free, [], [])
56+
],
57+
[])
58+
5059
CPPFLAGS=$CPPFLAGS_save
5160
LDFLAGS=$LDFLAGS_save
5261
LIBS=$LIBS_save],

ompi/mca/coll/hcoll/coll_hcoll_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static void mca_coll_hcoll_module_destruct(mca_coll_hcoll_module_t *hcoll_module
138138
OBJ_RELEASE(hcoll_module->previous_reduce_scatter_module);
139139
OBJ_RELEASE(hcoll_module->previous_reduce_module);
140140
*/
141-
#if HCOLL_API < HCOLL_VERSION(3,7)
141+
#if !defined(HAVE_HCOLL_CONTEXT_FREE)
142142
context_destroyed = 0;
143143
hcoll_destroy_context(hcoll_module->hcoll_context,
144144
(rte_grp_handle_t)hcoll_module->comm,
@@ -206,7 +206,7 @@ static int hcoll_comm_attr_del_fn(MPI_Comm comm, int keyval, void *attr_val, voi
206206
mca_coll_hcoll_module_t *hcoll_module;
207207
hcoll_module = (mca_coll_hcoll_module_t*) attr_val;
208208

209-
#if HCOLL_API >= HCOLL_VERSION(3,7)
209+
#ifdef HAVE_HCOLL_CONTEXT_FREE
210210
hcoll_context_free(hcoll_module->hcoll_context, (rte_grp_handle_t)comm);
211211
#else
212212
hcoll_group_destroy_notify(hcoll_module->hcoll_context);

0 commit comments

Comments
 (0)