Skip to content
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
6 changes: 2 additions & 4 deletions ompi/mca/pml/ucx/pml_ucx.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,7 @@ int mca_pml_ucx_recv(void *buf, size_t count, ompi_datatype_t *datatype, int src
MCA_COMMON_UCX_PROGRESS_LOOP(ompi_pml_ucx.ucp_worker) {
status = ucp_request_test(req, &info);
if (status != UCS_INPROGRESS) {
mca_pml_ucx_set_recv_status_safe(mpi_status, status, &info);
return OMPI_SUCCESS;
return mca_pml_ucx_set_recv_status_safe(mpi_status, status, &info);
}
}
}
Expand Down Expand Up @@ -1070,8 +1069,7 @@ int mca_pml_ucx_mrecv(void *buf, size_t count, ompi_datatype_t *datatype,

PML_UCX_MESSAGE_RELEASE(message);

ompi_request_wait(&req, status);
return OMPI_SUCCESS;
return ompi_request_wait(&req, status);
}

int mca_pml_ucx_start(size_t count, ompi_request_t** requests)
Expand Down
18 changes: 13 additions & 5 deletions ompi/mca/pml/ucx/pml_ucx_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static inline void mca_pml_ucx_set_send_status(ompi_status_public_t* mpi_status,
}
}

static inline void mca_pml_ucx_set_recv_status(ompi_status_public_t* mpi_status,
static inline int mca_pml_ucx_set_recv_status(ompi_status_public_t* mpi_status,
ucs_status_t ucp_status,
const ucp_tag_recv_info_t *info)
{
Expand All @@ -186,15 +186,23 @@ static inline void mca_pml_ucx_set_recv_status(ompi_status_public_t* mpi_status,
} else {
mpi_status->MPI_ERROR = MPI_ERR_INTERN;
}

return mpi_status->MPI_ERROR;
}

static inline void mca_pml_ucx_set_recv_status_safe(ompi_status_public_t* mpi_status,
ucs_status_t ucp_status,
const ucp_tag_recv_info_t *info)
static inline int mca_pml_ucx_set_recv_status_safe(ompi_status_public_t* mpi_status,
ucs_status_t ucp_status,
const ucp_tag_recv_info_t *info)
{
if (mpi_status != MPI_STATUS_IGNORE) {
mca_pml_ucx_set_recv_status(mpi_status, ucp_status, info);
return mca_pml_ucx_set_recv_status(mpi_status, ucp_status, info);
} else if (OPAL_LIKELY(ucp_status == UCS_OK) || (ucp_status == UCS_ERR_CANCELED)) {
return UCS_OK;
} else if (ucp_status == UCS_ERR_MESSAGE_TRUNCATED) {
return MPI_ERR_TRUNCATE;
}

return MPI_ERR_INTERN;
}

OBJ_CLASS_DECLARATION(mca_pml_ucx_persistent_request_t);
Expand Down