Skip to content

Commit 80b267a

Browse files
committed
coll/base: silence CID 1362601 in ompi_coll_base_sendrecv_zero()
1 parent 84e1425 commit 80b267a

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

ompi/mca/coll/base/coll_base_barrier.c

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,29 @@ ompi_coll_base_sendrecv_zero( int dest, int stag,
4747

4848
{
4949
int err, rc, line = 0;
50-
ompi_request_t* reqs[1];
51-
ompi_status_public_t statuses[1];
50+
ompi_request_t *req;
51+
ompi_status_public_t status;
5252

5353
/* post new irecv */
5454
err = MCA_PML_CALL(irecv( NULL, 0, MPI_BYTE, source, rtag,
55-
comm, &reqs[0] ));
55+
comm, &req ));
5656
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
5757

5858
/* send data to children */
5959
rc = MCA_PML_CALL(send( NULL, 0, MPI_BYTE, dest, stag,
6060
MCA_PML_BASE_SEND_STANDARD, comm ));
6161
if (rc != MPI_SUCCESS) { line = __LINE__; err = rc; goto error_handler; }
6262

63-
err = ompi_request_wait( &reqs[0], &statuses[0] );
63+
err = ompi_request_wait( &req, &status );
6464
if( MPI_ERR_IN_STATUS == err ) { line = __LINE__;
6565
/* As we use wait_all we will get MPI_ERR_IN_STATUS which is not an error
6666
* code that we can propagate up the stack. Instead, look for the real
6767
* error code from the MPI_ERROR in the status.
6868
*/
69-
int err_index = 0;
70-
if( MPI_SUCCESS == statuses[0].MPI_ERROR
71-
|| MPI_ERR_PENDING == statuses[0].MPI_ERROR ) {
72-
err_index = 1;
73-
}
74-
err = statuses[err_index].MPI_ERROR;
75-
OPAL_OUTPUT ((ompi_coll_base_framework.framework_output, "%s:%d: Error %d occurred in the %s"
69+
err = status.MPI_ERROR;
70+
OPAL_OUTPUT ((ompi_coll_base_framework.framework_output, "%s:%d: Error %d occurred in the receive"
7671
" stage of ompi_coll_base_sendrecv_zero\n",
77-
__FILE__, line, err, (0 == err_index ? "receive" : "send")));
72+
__FILE__, line, err));
7873
return err;
7974
}
8075
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }

0 commit comments

Comments
 (0)