Skip to content

pml_ucx: initialize req_mpi_object.comm for error handler #6117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions ompi/mca/pml/ucx/pml_ucx.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,12 @@ int mca_pml_ucx_irecv_init(void *buf, size_t count, ompi_datatype_t *datatype,
PML_UCX_TRACE_RECV("irecv_init request *%p=%p", buf, count, datatype, src,
tag, comm, (void*)request, (void*)req);

req->ompi.req_state = OMPI_REQUEST_INACTIVE;
req->flags = 0;
req->buffer = buf;
req->count = count;
req->datatype.datatype = mca_pml_ucx_get_datatype(datatype);
req->ompi.req_state = OMPI_REQUEST_INACTIVE;
req->ompi.req_mpi_object.comm = comm;
req->flags = 0;
req->buffer = buf;
req->count = count;
req->datatype.datatype = mca_pml_ucx_get_datatype(datatype);

PML_UCX_MAKE_RECV_TAG(req->tag, req->recv.tag_mask, tag, src, comm);

Expand Down Expand Up @@ -510,7 +511,8 @@ int mca_pml_ucx_irecv(void *buf, size_t count, ompi_datatype_t *datatype,
}

PML_UCX_VERBOSE(8, "got request %p", (void*)req);
*request = req;
req->req_mpi_object.comm = comm;
*request = req;
return OMPI_SUCCESS;
}

Expand Down Expand Up @@ -582,13 +584,15 @@ int mca_pml_ucx_isend_init(const void *buf, size_t count, ompi_datatype_t *datat
return OMPI_ERROR;
}

req->ompi.req_state = OMPI_REQUEST_INACTIVE;
req->flags = MCA_PML_UCX_REQUEST_FLAG_SEND;
req->buffer = (void *)buf;
req->count = count;
req->tag = PML_UCX_MAKE_SEND_TAG(tag, comm);
req->send.mode = mode;
req->send.ep = ep;
req->ompi.req_state = OMPI_REQUEST_INACTIVE;
req->ompi.req_mpi_object.comm = comm;
req->flags = MCA_PML_UCX_REQUEST_FLAG_SEND;
req->buffer = (void *)buf;
req->count = count;
req->tag = PML_UCX_MAKE_SEND_TAG(tag, comm);
req->send.mode = mode;
req->send.ep = ep;

if (MCA_PML_BASE_SEND_BUFFERED == mode) {
req->datatype.ompi_datatype = datatype;
OBJ_RETAIN(datatype);
Expand Down Expand Up @@ -706,7 +710,8 @@ int mca_pml_ucx_isend(const void *buf, size_t count, ompi_datatype_t *datatype,
return OMPI_SUCCESS;
} else if (!UCS_PTR_IS_ERR(req)) {
PML_UCX_VERBOSE(8, "got request %p", (void*)req);
*request = req;
req->req_mpi_object.comm = comm;
*request = req;
return OMPI_SUCCESS;
} else {
PML_UCX_ERROR("ucx send failed: %s", ucs_status_string(UCS_PTR_STATUS(req)));
Expand Down Expand Up @@ -786,7 +791,7 @@ int mca_pml_ucx_send(const void *buf, size_t count, ompi_datatype_t *datatype, i
}

int mca_pml_ucx_iprobe(int src, int tag, struct ompi_communicator_t* comm,
int *matched, ompi_status_public_t* mpi_status)
int *matched, ompi_status_public_t* mpi_status)
{
static unsigned progress_count = 0;

Expand All @@ -811,7 +816,7 @@ int mca_pml_ucx_iprobe(int src, int tag, struct ompi_communicator_t* comm,
}

int mca_pml_ucx_probe(int src, int tag, struct ompi_communicator_t* comm,
ompi_status_public_t* mpi_status)
ompi_status_public_t* mpi_status)
{
ucp_tag_t ucp_tag, ucp_tag_mask;
ucp_tag_recv_info_t info;
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/pml/ucx/pml_ucx_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void mca_pml_ucx_completed_request_init(ompi_request_t *ompi_req)
mca_pml_ucx_request_init_common(ompi_req, false, OMPI_REQUEST_ACTIVE,
mca_pml_completed_request_free,
mca_pml_completed_request_cancel);
ompi_req->req_mpi_object.comm = &ompi_mpi_comm_world.comm;
ompi_request_complete(ompi_req, false);

}