[mpi-21] problem with MPI_Get_count and MPI_Probe
Rolf Rabenseifner
rabenseifner at [hidden]
Fri Jan 18 11:55:09 CST 2008
This is a proposal for MPI 2.1, Ballot 4.
This is a follow up to:
Datatypes and MPI_PROBE
in http://www.cs.uiuc.edu/homes/wgropp/projects/parallel/MPI/mpi-errata/index.html
with mail discussion in
http://www.cs.uiuc.edu/homes/wgropp/projects/parallel/MPI/mpi-errata/discuss/probedatatype/
Proposal for MPI 2.1, Ballot 4:
-------------------------------
MPI 1.1, page 222, line 48 reads
used after a call to MPI_PROBE. (End of rationale.)
but should read
used after a call to MPI_PROBE or MPI_IPROBE.
With a status returned from MPI_PROBE or MPI_IPROBE, the same
dataypes are allowed as in a call to MPI_RECV to receive this message.
(End of rationale.)
Advice to users. To allocate the appropriate amount of memory as receive
buffer, the same datatype as in the following receive call should be used
to determine the needed space. In portable programs due to possible data
conversions, it is not guaranteed that the count returned by MPI_GET_COUNT
with datatype MPI_BYTE is the correct amount of needed memory space in
the receive buffer (although MPI_BYTE is matching every datatype).
(End of advice to users.)
-------------------------------
Reason for the first part: The current MPI-1.1 text says "The datatype argument
should match the argument provided by the receive call that set the status
variable." With MPI_PROBE, there isn't such a receive call.
Reason for the advice to users: It helps to write portable code.
Because malloc needs a byte count, users may write wrong programs
by using MPI_BYTE.
-------------------------------
Discussion should be done through the new mailing list
mpi-21_at_cs.uiuc.edu.
I have sent out this mail with CC through the old general list
mpi-21_at_[hidden]
Best regards
Rolf
Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner_at_[hidden]
High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530
University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832
Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner
Nobelstr. 19, D-70550 Stuttgart, Germany . (Office: Allmandring 30)
More information about the Mpi-21
mailing list