Skip to content

Commit 0b14928

Browse files
authored
Merge pull request #2327 from yosefe/topic/pml-ucx-status-cancelled
pml_ucx: fix uninitialized field req_status->_cancelled.
2 parents 6074c2a + 17c8f76 commit 0b14928

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ompi/mca/pml/ucx/pml_ucx_request.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ static inline ucp_ep_h mca_pml_ucx_get_ep(ompi_communicator_t *comm, int dst)
144144
static inline void mca_pml_ucx_request_reset(ompi_request_t *req)
145145
{
146146
req->req_complete = REQUEST_PENDING;
147-
req->req_status._cancelled = false;
148147
}
149148

150149
static void mca_pml_ucx_set_send_status(ompi_status_public_t* mpi_status,
151150
ucs_status_t status)
152151
{
153-
if (status == UCS_OK) {
152+
if (OPAL_LIKELY(status == UCS_OK)) {
154153
mpi_status->MPI_ERROR = MPI_SUCCESS;
154+
mpi_status->_cancelled = false;
155155
} else if (status == UCS_ERR_CANCELED) {
156156
mpi_status->_cancelled = true;
157157
} else {
@@ -165,11 +165,12 @@ static inline void mca_pml_ucx_set_recv_status(ompi_status_public_t* mpi_status,
165165
{
166166
int64_t tag;
167167

168-
if (ucp_status == UCS_OK) {
168+
if (OPAL_LIKELY(ucp_status == UCS_OK)) {
169169
tag = info->sender_tag;
170170
mpi_status->MPI_ERROR = MPI_SUCCESS;
171171
mpi_status->MPI_SOURCE = PML_UCX_TAG_GET_SOURCE(tag);
172172
mpi_status->MPI_TAG = PML_UCX_TAG_GET_MPI_TAG(tag);
173+
mpi_status->_cancelled = false;
173174
mpi_status->_ucount = info->length;
174175
} else if (ucp_status == UCS_ERR_MESSAGE_TRUNCATED) {
175176
mpi_status->MPI_ERROR = MPI_ERR_TRUNCATE;

0 commit comments

Comments
 (0)