Fix return code from MPI_Probe and MPI_Iprobe.
Instead of returning MPI_SUCCESS every time they are called regardless of the status of the call, they should return a value representative of the action. So similar to MPI_Wait/MPI_Test they will return MPI_SUCCESS if the action was successfull, or the value that matches status.MPI_ERROR for the operation if it is unsuccessful. This was discussed on the [http://www.open-mpi.org/community/lists/devel/2011/03/9109.php ompi-devel list] This commit was SVN r24551.
Этот коммит содержится в:
родитель
c1396b278c
Коммит
045035963a
@ -41,6 +41,7 @@ int mca_pml_ob1_iprobe(int src,
|
||||
if( NULL != status ) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
}
|
||||
rc = recvreq.req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
*matched = 1;
|
||||
} else {
|
||||
*matched = 0;
|
||||
@ -56,6 +57,7 @@ int mca_pml_ob1_probe(int src,
|
||||
struct ompi_communicator_t *comm,
|
||||
ompi_status_public_t * status)
|
||||
{
|
||||
int rc = OMPI_SUCCESS;
|
||||
mca_pml_ob1_recv_request_t recvreq;
|
||||
|
||||
OBJ_CONSTRUCT( &recvreq, mca_pml_ob1_recv_request_t );
|
||||
@ -66,10 +68,11 @@ int mca_pml_ob1_probe(int src,
|
||||
MCA_PML_OB1_RECV_REQUEST_START(&recvreq);
|
||||
|
||||
ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi);
|
||||
|
||||
rc = recvreq.req_recv.req_base.req_ompi.req_status.MPI_ERROR;
|
||||
if (NULL != status) {
|
||||
OMPI_STATUS_SET(status, &recvreq.req_recv.req_base.req_ompi.req_status);
|
||||
}
|
||||
|
||||
MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv );
|
||||
return OMPI_SUCCESS;
|
||||
return rc;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user