Skip to content

Commit f605f6c

Browse files
authored
Merge pull request #3134 from alex-mikheev/topic/pml_ucx_req_init_fix_v2.x
Topic/pml ucx req init fix v2.x
2 parents b2fe67b + b80ff70 commit f605f6c

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);
@@ -136,6 +137,12 @@ static void mca_pml_ucx_request_init_common(ompi_request_t* ompi_req,
136137
ompi_req->req_state = state;
137138
ompi_req->req_free = req_free;
138139
ompi_req->req_cancel = req_cancel;
140+
/* This field is used to attach persistant request to a temporary req.
141+
* Receive (ucp_tag_recv_nb) may call completion callback
142+
* before the field is set. If the field is not NULL then mca_pml_ucx_preq_completion()
143+
* will try to complete bogus persistant request.
144+
*/
145+
ompi_req->req_complete_cb_data = NULL;
139146
}
140147

141148
void mca_pml_ucx_request_init(void *request)

0 commit comments

Comments
 (0)