Skip to content

Commit 0857742

Browse files
committed
osc/ucx: Fix worker pool finalization
Signed-off-by: Artem Polyakov <artpol84@gmail.com>
1 parent fd27d76 commit 0857742

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ompi/mca/osc/ucx/osc_ucx_component.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ static int component_init(bool enable_progress_threads, bool enable_mpi_threads)
141141

142142
static int component_finalize(void) {
143143
opal_common_ucx_mca_deregister();
144+
if (mca_osc_ucx_component.env_initialized) {
145+
opal_common_ucx_wpool_finalize(mca_osc_ucx_component.wpool);
146+
}
144147
opal_common_ucx_wpool_free(mca_osc_ucx_component.wpool);
145148
return OMPI_SUCCESS;
146149
}
@@ -575,8 +578,6 @@ int ompi_osc_ucx_free(struct ompi_win_t *win) {
575578
}
576579

577580
opal_common_ucx_wpctx_release(module->ctx);
578-
579-
opal_common_ucx_wpool_finalize(mca_osc_ucx_component.wpool);
580581

581582
if (module->disp_units) free(module->disp_units);
582583
ompi_comm_free(&module->comm);

0 commit comments

Comments
 (0)