From 0a8261f3b00123822a596485d11fa994c1dbf9df Mon Sep 17 00:00:00 2001 From: Sergey Oblomov Date: Tue, 5 Jun 2018 17:22:03 +0300 Subject: [PATCH] PML/UCX: fixed hand on MPI_Finalize fixes issue https://github.com/openucx/ucx/issues/2656 added flush for worker object to complete all pending operations Signed-off-by: Sergey Oblomov --- ompi/mca/pml/ucx/pml_ucx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ompi/mca/pml/ucx/pml_ucx.c b/ompi/mca/pml/ucx/pml_ucx.c index 98352a951f..d504de7f43 100644 --- a/ompi/mca/pml/ucx/pml_ucx.c +++ b/ompi/mca/pml/ucx/pml_ucx.c @@ -435,6 +435,10 @@ int mca_pml_ucx_del_procs(struct ompi_proc_t **procs, size_t nprocs) mca_pml_ucx_waitall(dreqs, &num_reqs); free(dreqs); + /* flush worker to allow all pending operations to complete. + * ignore error (we can do nothing here), just try to + * finalize gracefully */ + ucp_worker_flush(ompi_pml_ucx.ucp_worker); opal_pmix.fence(NULL, 0);