From 56e8864cc95cd17a77ba6e52fd746d89737f44f5 Mon Sep 17 00:00:00 2001 From: Mike Dubman Date: Sun, 4 Oct 2015 12:28:39 +0300 Subject: [PATCH] MXM: add barrier in mxm tears-down flow avoid disconnecting from a process which is still doing communication --- ompi/mca/mtl/mxm/mtl_mxm.c | 2 ++ ompi/mca/pml/yalla/pml_yalla.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ompi/mca/mtl/mxm/mtl_mxm.c b/ompi/mca/mtl/mxm/mtl_mxm.c index 09f9c2bb4e7..53b84a34454 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm.c +++ b/ompi/mca/mtl/mxm/mtl_mxm.c @@ -599,6 +599,8 @@ int ompi_mtl_mxm_del_procs(struct mca_mtl_base_module_t *mtl, size_t nprocs, #if MXM_API >= MXM_VERSION(3,1) if (ompi_mtl_mxm.bulk_disconnect && nprocs == ompi_proc_world_size ()) { + /* avoid disconnecting from a process which is still doing communication */ + opal_pmix.fence(NULL, 0); mxm_ep_powerdown(ompi_mtl_mxm.ep); } #endif diff --git a/ompi/mca/pml/yalla/pml_yalla.c b/ompi/mca/pml/yalla/pml_yalla.c index 436519ef2a3..233060aa3a7 100644 --- a/ompi/mca/pml/yalla/pml_yalla.c +++ b/ompi/mca/pml/yalla/pml_yalla.c @@ -257,6 +257,8 @@ int mca_pml_yalla_del_procs(struct ompi_proc_t **procs, size_t nprocs) if (ompi_mpi_finalized) { PML_YALLA_VERBOSE(3, "using bulk powerdown"); + /* avoid disconnecting from a process which is still doing communication */ + opal_pmix.fence(NULL, 0); mxm_ep_powerdown(ompi_pml_yalla.mxm_ep); }