Skip to content

Commit 327d5a8

Browse files
authored
Merge pull request #3125 from alex-mikheev/topic/pml_ucx_req_init_fix
ompi: pml ucx: fix persistant request initialization
2 parents 97287f6 + c081239 commit 327d5a8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ompi/mca/pml/ucx/pml_ucx_request.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ void mca_pml_ucx_bsend_completion(void *request, ucs_status_t status)
5353
PML_UCX_VERBOSE(8, "bsend request %p buffer %p completed with status %s", (void*)req,
5454
req->req_complete_cb_data, ucs_status_string(status));
5555
mca_pml_base_bsend_request_free(req->req_complete_cb_data);
56+
req->req_complete_cb_data = NULL;
5657
mca_pml_ucx_set_send_status(&req->req_status, status);
5758
PML_UCX_ASSERT( !(REQUEST_COMPLETE(req)));
5859
mca_pml_ucx_request_free(&req);
@@ -137,6 +138,12 @@ static void mca_pml_ucx_request_init_common(ompi_request_t* ompi_req,
137138
ompi_req->req_state = state;
138139
ompi_req->req_free = req_free;
139140
ompi_req->req_cancel = req_cancel;
141+
/* This field is used to attach persistant request to a temporary req.
142+
* Receive (ucp_tag_recv_nb) may call completion callback
143+
* before the field is set. If the field is not NULL then mca_pml_ucx_preq_completion()
144+
* will try to complete bogus persistant request.
145+
*/
146+
ompi_req->req_complete_cb_data = NULL;
140147
}
141148

142149
void mca_pml_ucx_request_init(void *request)

0 commit comments

Comments
 (0)