-
Notifications
You must be signed in to change notification settings - Fork 934
Open
Description
One page 360 of the 2.1 spec there is (in reference to
mpi_grequest_start query function):
Advice to users. query_fn must not set the error field of status
since query_fn may be called by MPI_WAIT or MPI_TEST, in which
case the error field of status should not change. The MPI library
knows the “context” in which query_fn is invoked and can decide
correctly when to put in the error field of status the returned
error code. (End of advice to users.)
So presumably this means that you just return an error code in the
return value of query function. But in ompi/request/req_wait.c there is
/* return status. If it's a generalized request, we *have* to
invoke the query_fn, even if the user procided STATUS_IGNORE.
MPI-2:8.2. */
if (OMPI_REQUEST_GEN == req->req_type) {
ompi_grequest_invoke_query(req, &req->req_status);
}
which ignores the value returned by the quesry function. And it just
uses the MPI_ERROR value in the status object instead.
The attached patch fixes this behaviour so the query function return value is used instead of the MPI_ERROR value is the status object for MPI_Test{Any} and MPI_Wait{Any}. Patch is against trunk