@@ -403,11 +403,9 @@ mca_pml_ucx_blocking_recv_completion(void *request, ucs_status_t status,
403403 (void * )req , ucs_status_string (status ), info -> sender_tag ,
404404 info -> length );
405405
406- OPAL_THREAD_LOCK (& ompi_request_lock );
407406 mca_pml_ucx_set_recv_status (& req -> req_status , status , info );
408407 PML_UCX_ASSERT ( !(REQUEST_COMPLETE (req )));
409- req -> req_complete = REQUEST_COMPLETED ;
410- OPAL_THREAD_UNLOCK (& ompi_request_lock );
408+ ompi_request_complete (req ,true);
411409}
412410
413411int mca_pml_ucx_recv (void * buf , size_t count , ompi_datatype_t * datatype , int src ,
@@ -747,12 +745,9 @@ int mca_pml_ucx_start(size_t count, ompi_request_t** requests)
747745
748746 PML_UCX_VERBOSE (8 , "send completed immediately, completing persistent request %p" ,
749747 (void * )preq );
750- OPAL_THREAD_LOCK (& ompi_request_lock );
751748 mca_pml_ucx_set_send_status (& preq -> ompi .req_status , UCS_OK );
752749 ompi_request_complete (& preq -> ompi , true);
753- OPAL_THREAD_UNLOCK (& ompi_request_lock );
754750 } else if (!UCS_PTR_IS_ERR (tmp_req )) {
755- OPAL_THREAD_LOCK (& ompi_request_lock );
756751 if (REQUEST_COMPLETE (tmp_req )) {
757752 /* tmp_req is already completed */
758753 PML_UCX_VERBOSE (8 , "completing persistent request %p" , (void * )preq );
@@ -765,7 +760,6 @@ int mca_pml_ucx_start(size_t count, ompi_request_t** requests)
765760 tmp_req -> req_complete_cb_data = preq ;
766761 preq -> tmp_req = tmp_req ;
767762 }
768- OPAL_THREAD_UNLOCK (& ompi_request_lock );
769763 } else {
770764 PML_UCX_ERROR ("ucx %s failed: %s" ,
771765 (preq -> flags & MCA_PML_UCX_REQUEST_FLAG_SEND ) ? "send" : "recv" ,
0 commit comments