From 0857742624d1b408c8036925020a2f9e31e88ed5 Mon Sep 17 00:00:00 2001 From: Artem Polyakov Date: Tue, 11 Jun 2019 13:16:29 -0700 Subject: [PATCH] osc/ucx: Fix worker pool finalization Signed-off-by: Artem Polyakov --- ompi/mca/osc/ucx/osc_ucx_component.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ompi/mca/osc/ucx/osc_ucx_component.c b/ompi/mca/osc/ucx/osc_ucx_component.c index c1bcfa54ac..4ce208f2b7 100644 --- a/ompi/mca/osc/ucx/osc_ucx_component.c +++ b/ompi/mca/osc/ucx/osc_ucx_component.c @@ -141,6 +141,9 @@ static int component_init(bool enable_progress_threads, bool enable_mpi_threads) static int component_finalize(void) { opal_common_ucx_mca_deregister(); + if (mca_osc_ucx_component.env_initialized) { + opal_common_ucx_wpool_finalize(mca_osc_ucx_component.wpool); + } opal_common_ucx_wpool_free(mca_osc_ucx_component.wpool); return OMPI_SUCCESS; } @@ -575,8 +578,6 @@ int ompi_osc_ucx_free(struct ompi_win_t *win) { } opal_common_ucx_wpctx_release(module->ctx); - - opal_common_ucx_wpool_finalize(mca_osc_ucx_component.wpool); if (module->disp_units) free(module->disp_units); ompi_comm_free(&module->comm);