[mpich2-dev] status.MPI_ERROR with inactive persistent requests

William Gropp wgropp at uiuc.edu
Fri May 23 12:18:04 CDT 2008


The MPI_ERROR field is only changed by the functions that do multiple  
completions.  Here the text (from the new MPI 2.1 document):

In general, message passing calls do not modify the value of the  
error code field of
status variables. This field may be updated only by the functions in  
Section 3.7.5 which
return multiple statuses. The field is updated if and only if such  
function returns with an
error code of MPI ERR IN STATUS.

This isn't quite consistent with this text

An empty status is a status which is set to return tag =
MPI ANY TAG, source = MPI ANY SOURCE, error = MPI SUCCESS, and is  
also internally
configured so that calls to MPI GET COUNT and MPI GET ELEMENTS return  
count = 0
and MPI TEST CANCELLED returns false. We set a status variable to  
empty when the
value returned by it is not significant. Status is set in this way so  
as to prevent errors due
to accesses of stale information.

That last sentence, however, is key - the intent of an empty status  
is to be as valid as any other status returned by the routine.  Thus,  
I'd argue that the intent was that the MPI_ERROR field would be set  
only if relevant - thus, only on the multiple completion functions.   
I view the "may be updated only",  "may be updated", and "updated if  
and only if" in the first quote to take priority.

Bill

On May 23, 2008, at 12:05 PM, David Gingold wrote:

> MPICH2 folks --
>
> My reading of the MPI spec is that an inactive persistent request
> results in an empty status (e.g. with MPI_Test()), and that an empty
> status has the error field set to MPI_SUCCESS.
>
> I noticed that in test/mpi/pt2pt/inactivereq.c, the StatusEmpty()
> function doesn't check s->MPI_ERROR.
>
> What's more, I don't think the MPICH2 code sets the status in the
> case of inactive persistent requests.  MPIR_Status_set_empty() in
> mpiimpl.h doesn't.  MPIR_Request_complete() in mpir_request.c
> doesn't.  MPI_Test() doesn't.
>
> Am I mis-reading the spec?  Mis-reading the code?  Or is this a bug?
>
> -dg
>

William Gropp
Paul and Cynthia Saylor Professor of Computer Science
University of Illinois Urbana-Champaign






More information about the mpich2-dev mailing list