X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Fri, 10 Dec 1999 16:05:25 -0600 To: worleyph@XXXXXXXX From: William Gropp Subject: Re: problem with MPI_Get_count and MPI_Probe Cc: mpi-comments@XXXXXXXXXXXXX,mpi-core@XXXXXXXXXXX In-Reply-To: <383C05DE.DC06F9F7@XXXXXXXX> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-mpi-comments@XXXXXXXXXXX Precedence: bulk At 10:36 AM 11/24/99 -0500, Patrick H. Worley wrote: Haven't since this is an errata or correction document .... 1) MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count) Returns the number of entries received. (Again, we count entries, each of type datatype, not bytes.) The datatype argument should match the argument provided by the receive call that set the status variable. ... The datatype argument is passed to MPI_GET_COUNT so as to improve performance. A message might be received without counting the number of elements it contains, and the count value is often not needed. Also, this allows the same function to be used after a call to MPI_PROBE. 2) int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status) ... The call matches the same message that would have been received by a call to MPI_RECV(..., source,tag, comm, status) executed at the same point in the program, and returns in status the same value that would have been returned by MPI_RECV(). ... the content of the status object can be subsequently accessed as described in section Return status to find the source, tag and length of the probed message. Problem: What datatype should be specified to MPI_Get_count when requesting the length of the message found by an MPI_Probe? There is no "matching" argument in MPI_Probe. Is it legal (by the standard) to specify MPI_BYTE? Thanks. Pat Worley I would say that the datatype must be the same that could be used in an MPI_RECV call. By that I mean one that meets the type-signature rule. Since MPI_BYTE is allowed in that case, then MPI_BYTE should work (MPI_PACKED could also be used). However.... You can't use MPI_BYTE to determine a buffer size and then use MPI_DOUBLE in the receive. As a result, it really only makes sense to use the same datatype in the MPI_Get_count call that will be used in the eventual MPI_Recv call. This is my opinion, not a ruling by the forum. Forum members, is this the correct interpretation and should there be an explicit clarification? Bill