[mpich-discuss] MPI_GET_COUNT behaviour unclear

Tamás Faragó fafarago at gmail.com
Tue Dec 15 06:18:13 CST 2009


I have a question about MPI_GET_COUNT and MPI_GET_ELEMENTS. What do these
functions exactly return?

As I have read from the documentation (3.2.5) MPI_GET_COUNT returns the
count of 'entries' of type 'datatype' received. According to me in example
4.12 (line 13) MPI_GET_COUNT should return 2 as we have sent two MPI_REAL
types. The example however shows 1. Is this because as at when you send 2
types MPI transparently creates a new custom datatype (4.1.11) consisting of
these two elements and thus the top-entry is 1?

This, however should suggest that MPI_GET_COUNT always returns 1, or
MPI_UNDEFINED on an error (eg unmached receive count or type). Is this
correct?

MPI_GET_ELEMENTS than receives what?

How is the example (4.12) even working correctly when a custom datatype
Type2 consists of two MPI_REALs and you want to receive two of those, eg 4
MPI_REALs?

I am using the MPI 2.1 documentation (
http://www.mpi-forum.org/docs/docs.html in hardcover)

Regards, Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20091215/ce9f8bc0/attachment.htm>


More information about the mpich-discuss mailing list