1
1

Detect hcoll_context_free at config

Needed for better flexibility with versioning

Signed-off-by: Valentin Petrov <valentinp@mellanox.com>
This commit is contained in:
Valentin Petrov 2016-12-02 17:18:30 +02:00
parent b2e36f0824
commit e13e264185
2 changed files with 11 additions and 2 deletions

View File

@ -47,6 +47,15 @@ AC_DEFUN([OMPI_CHECK_HCOLL],[
[ompi_check_hcoll_happy="yes"],
[ompi_check_hcoll_happy="no"])
AS_IF([test "$ompi_check_hcoll_happy" = "yes"],
[
CPPFLAGS=$coll_hcoll_CPPFLAGS
LDFLAGS=$coll_hcoll_LDFLAGS
LIBS=$coll_hcoll_LIBS
AC_CHECK_FUNCS(hcoll_context_free, [], [])
],
[])
CPPFLAGS=$CPPFLAGS_save
LDFLAGS=$LDFLAGS_save
LIBS=$LIBS_save],

View File

@ -138,7 +138,7 @@ static void mca_coll_hcoll_module_destruct(mca_coll_hcoll_module_t *hcoll_module
OBJ_RELEASE(hcoll_module->previous_reduce_scatter_module);
OBJ_RELEASE(hcoll_module->previous_reduce_module);
*/
#if HCOLL_API < HCOLL_VERSION(3,7)
#if !defined(HAVE_HCOLL_CONTEXT_FREE)
context_destroyed = 0;
hcoll_destroy_context(hcoll_module->hcoll_context,
(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
mca_coll_hcoll_module_t *hcoll_module;
hcoll_module = (mca_coll_hcoll_module_t*) attr_val;
#if HCOLL_API >= HCOLL_VERSION(3,7)
#ifdef HAVE_HCOLL_CONTEXT_FREE
hcoll_context_free(hcoll_module->hcoll_context, (rte_grp_handle_t)comm);
#else
hcoll_group_destroy_notify(hcoll_module->hcoll_context);