On Oct 25, 2009, at 9:10 PM, Christopher Yeoh wrote:
I've been running some threaded test suites against OpenMPI and was
just wanting to clarify something in the specification and how OpenMPI
implements it.
Sorry for the delay in replying (my inbox has become a disaster lately
-- please don't be shy about pinging us again if you don't get an
answer! Or get Brad to kick us; whichever works better ;-) ).
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.
So is this just incorrect on the part of OpenMPI? Am happy to
provide a
patch if its not right.
I had to go re-read that whole section on generalized requests; I
agree with your analysis. Could you open a ticket and submit a
patch? You might want to look at the back ends to MPI_TEST[_ANY] and
MPI_WAIT_ANY as well (if you haven't already).
Thanks!
--
Jeff Squyres
jsquy...@cisco.com