On Mon, 14 Jun 2004, Angel Tsankov wrote:
> I think that checking the ERROR field of Status is OK even when no
> request hase been completed - please, consider this againg:
> "If all the requests in the list are null or *inactive* then the call
> returns immediately, with index = MPI UNDEFINED *and* an empty status."
> Inactive requests have been defined as requests that are currently not
> associated with any ongoing communication and are not null requests. As
> to your suggestion - I wish I first check if the call has completed
> successfully (i.e. whether the return value is MPI_SUCCESS) and then I
> would like to check the index and status (this may be performed in any
> arbitrary order). It just seams more reasonable to me to first chech the
> status, 'cause it means whether the commmunication (no matter which one)
> has completed, and only if it is OK should I get interested in which one
> it is.
You have challeneged that LAM does not conform to the MPI standard.
Therefore, I must reply. :-D
The formal defintion of an empty status is in section MPI-1 3.7.3, p41,
lines 16-17. It says that an empty status is one that sets the tag field
to MPI_ANY_TAG and the source field to MPI_ANY_SOURCE, and that any calls
with it to MPI_GET_COUNT or MPI_GET_ELEMENTS should return a count of 0.
LAM does this.
The standard does *not* specify what should be in the error field. LAM
actually sets it to MPI_ERR_PENDING.
Further, in MPI-2 3.2.2, p25, lines 7-11 stipulate:
-----
"For the functions (MPI_TEST, MPI_TESTANY, MPI_WAIT, MPI_WAITANY) that
return a single MPI_STATUS value, the normal MPI error return process
should be used (not the MPI_ERROR field in the MPI_STATUS arugment)."
-----
So I think LAM fully conforms to the MPI standard here. :-) It's just
that the standard is somewhat vague, and so you're likely to get different
interpretations in different MPI implementations.
Hence, you probably are just best checking the return value of the
function (which will only be != MPI_SUCCESS if you have overridden the
default error handler) and the value of the returned index.
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|