Skip to content

Commit 8535dd5

Browse files
authored
Merge pull request #6732 from dmitrygladkov/topic/pml/ucx_init
PML/UCX: Don't destroy UCP worker if it wasn't created
2 parents 4f5e96d + c864ca5 commit 8535dd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/mca/pml/ucx/pml_ucx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ int mca_pml_ucx_init(int enable_mpi_threads)
314314

315315
err_destroy_worker:
316316
ucp_worker_destroy(ompi_pml_ucx.ucp_worker);
317-
ompi_pml_ucx.ucp_worker = NULL;
318317
err:
318+
ompi_pml_ucx.ucp_worker = NULL;
319319
return rc;
320320
}
321321

@@ -345,7 +345,7 @@ int mca_pml_ucx_cleanup(void)
345345
OBJ_DESTRUCT(&ompi_pml_ucx.convs);
346346
OBJ_DESTRUCT(&ompi_pml_ucx.persistent_reqs);
347347

348-
if (ompi_pml_ucx.ucp_worker) {
348+
if (ompi_pml_ucx.ucp_worker != NULL) {
349349
ucp_worker_destroy(ompi_pml_ucx.ucp_worker);
350350
ompi_pml_ucx.ucp_worker = NULL;
351351
}

0 commit comments

Comments
 (0)