1
1

* return the MPI_ERROR field of the status as the return code for

MPI_WAIT, MPI_TEST, MPI_WAITANY, and MPI_TESTANY.  It isn't really
  clear what the standard wants as the return code for these functions, 
  and this is what Sun MPI, LAM/MPI, and MPICH2 all do.

  Fixes trac:172

This commit was SVN r10872.

The following Trac tickets were found above:
  Ticket 172 --> https://svn.open-mpi.org/trac/ompi/ticket/172
Этот коммит содержится в:
Brian Barrett 2006-07-18 21:28:45 +00:00
родитель 0c4f18b397
Коммит 0b15943a7a
3 изменённых файлов: 27 добавлений и 6 удалений

Просмотреть файл

@ -32,6 +32,7 @@ int ompi_request_test_any(
size_t num_requests_null_inactive = 0;
ompi_request_t **rptr;
ompi_request_t *request;
int rc;
opal_atomic_mb();
rptr = requests;
@ -51,7 +52,11 @@ int ompi_request_test_any(
request->req_state = OMPI_REQUEST_INACTIVE;
return OMPI_SUCCESS;
}
return ompi_request_free(rptr);
rc = request->req_status.MPI_ERROR;
if (OMPI_SUCCESS != ompi_request_free(rptr)) {
return OMPI_ERROR;
}
return rc;
}
}

Просмотреть файл

@ -26,6 +26,7 @@ int ompi_request_wait(
ompi_status_public_t * status)
{
ompi_request_t *req = *req_ptr;
int rc;
if(req->req_complete == false) {
@ -58,11 +59,15 @@ finished:
}
if( req->req_persistent ) {
req->req_state = OMPI_REQUEST_INACTIVE;
return OMPI_SUCCESS;
return req->req_status.MPI_ERROR;
}
/* return request to pool */
return ompi_request_free(req_ptr);
rc = req->req_status.MPI_ERROR;
if (OMPI_SUCCESS != ompi_request_free(req_ptr)) {
return OMPI_ERROR;
}
return rc;
}
@ -159,9 +164,14 @@ finished:
}
if( request->req_persistent ) {
request->req_state = OMPI_REQUEST_INACTIVE;
rc = request->req_status.MPI_ERROR;
} else {
int tmp;
/* return request to pool */
rc = ompi_request_free(rptr);
rc = request->req_status.MPI_ERROR;
tmp = ompi_request_free(rptr);
if (OMPI_SUCCESS != tmp) rc = tmp;
}
*index = completed;
}

Просмотреть файл

@ -216,6 +216,7 @@ static inline int ompi_request_test( ompi_request_t ** rptr,
ompi_request_t *request = *rptr;
#if OMPI_ENABLE_PROGRESS_THREADS == 0
int do_it_once = 0;
int rc;
recheck_request_status:
#endif
@ -234,9 +235,14 @@ static inline int ompi_request_test( ompi_request_t ** rptr,
}
if( request->req_persistent ) {
request->req_state = OMPI_REQUEST_INACTIVE;
return OMPI_SUCCESS;
return request->req_status.MPI_ERROR;
}
rc = request->req_status.MPI_ERROR;
if (OMPI_SUCCESS != ompi_request_free(rptr)) {
return OMPI_ERROR;
} else {
return rc;
}
return ompi_request_free(rptr);
}
#if OMPI_ENABLE_PROGRESS_THREADS == 0
if( 0 == do_it_once ) {