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

David Gingold david.gingold at sicortex.com
Fri May 23 12:32:44 CDT 2008


On May 23, 2008, at 1:18 PM, William Gropp wrote:

> 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.
>

What threw me off was this additional bit of text in the spec:

"One is allowed to call MPI_TEST with a null or inactive request  
argument. In such a case the operation returns with flag = true and  
empty status."

But I'll accept your point, particularly as it means I don't need to  
fix my code.  :^)

Thanks for the quick response, Bill.

-dg




More information about the mpich2-dev mailing list