Skip to content

How to handle ERROR field when returning an empty status #1094

@hppritcha

Description

@hppritcha

Problem

There seem to be some contradictions in the standard concerning when the error status field in a status object should be updated.

In particular, the standard states that an "empty status" should be returned under certain cases for

  • MPI_Request_get_status
  • MPI_Request_get_status_any
  • MPI_Request_get_status_all
  • MPI_Testany
  • MPI_Wait
  • MPI_Waitany

Then there's the definition of an empty status in section 3.7.3

An empty status is a status that 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.

But then there's this statement in Section 3.2.5

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 that
return multiple statuses. The field is updated if and only if such function returns with an
error code of MPI_ERR_IN_STATUS.

The statements about returning an empty status seem to contradict what's in 3.2.5 unless the "in general" is an out?

References and Pull Requests

open-mpi/ompi#13478

Metadata

Metadata

Assignees

No one assigned

    Labels

    chap-p2pPoint to Point Communication Chapter Committee

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions