From: Karl Feind Subject: Re: Another clarification To: treumann@XXXXXXXXXX Date: Tue, 16 May 2000 13:09:42 -0500 (CDT) Cc: Rabenseifner@XXXXXXXXXXXXXXXXXXXX,In-Reply-To: , 2000 01:51:16 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I think there are three relevant cases when executing MPI_Get_count and computing (bytes_transferred/datatype_length): Case 1) bytes_transferred > 0 and datatype_length > 0 This is the typical easy case. Case 2) bytes_transferred == datatype_length == 0 This is Rolf's case and the proposal is to compute 0/0 = 0 as a special case. This seems OK. Case 3) bytes_transferred > 0 and datatype_length == 0 This seems erroneous and should cause MPI_UNDEFINED to be returned. What I've just described is how SGI MPI handles this. Karl Feind ----------- Karl Feind, Message-Passing Engineering Team Computer Systems Business Unit, SGI Phone: 651-683-5673 Fax: 651/683-5276 E-Mail: kaf@XXXXXXX treumann@XXXXXXXXXX writes: > > > It works for me as a user convenience in a case like this. I can go with > Zero. - Thanks Rolf for the rationale. > > Dick Treumann IBM RS/6000 SP Development > Tele (914) 433-7846 Fax (914) 433-8363 > > > Rabenseifner@XXXXXXXXXXXXXXXXXXXX (Rolf Rabenseifner) on 05/10/2000 > 10:47:06 AM > > To: Richard Treumann/Poughkeepsie/IBM@IBMUS > cc: William Gropp , mpi-core@mcs.anl.gov> Subject: Re: Another clarification > > > > For the following user situation, I would prefer "0": > - datatype is produced with MPI...DARRAY and the definition of > DARRAY results in an empty block on some MPI process. > - Therefore empty messages are transferred > - The user use MPI_GET_COUNT to analyze the status. > - He wants to make SPMD programming, i.e. without any > IF-statement, if not really necessary. > > The clarification may also mention, that MPI_GET_COUNT will return "0" > also if the sending count was positive. > > Rolf > > > Dick Treumann wrote: > > Bill - > > > > You raise the issue of a zero byte datatype being used to query > > MPI_Get_count or MPI_Get_elements on a status. Both calls are allowed to > > return MPI_UNDEFINED yet you suggest the answer zero be mandated. We > > detect the divide by 0 attempt and return MPI_UNDEFINED. This seems like > > the right result to me. > > > > Can you explain why you prefer zero? I am interested if it is because > zero > > is better for some real user situation or because you consider zero more > > consistent with the MPI standard (or both). > > > Bill Gropp wrote: > >> The following question came up: Suppose a datatype is created that has > >> size 0; for example, a contiguous type with count 0 (the count is > required > >> to be non-negative, not positive). A message is sent with this datatype > >> and received, creating a status. What value does MPI_Get_count or > >> MPI_Get_elements return? It could return 0, the count value specified > by > >> the user (just kidding!), MPI_UNDEFINED, or something else. > >> I propose the clarification that in this case, MPI_Get_count and > >> MPI_Get_elements return 0. > > > Dr. Rolf Rabenseifner High Performance Computing > Parallel Computing Center Stuttgart (HLRS) > Rechenzentrum Universitaet Stuttgart (RUS) Phone: ++49 711 6855530 > Allmandring 30 FAX: ++49 711 6787626 > D-70550 Stuttgart rabenseifner@XXXXXXXXXXXXXXXXXXXX > Germany http://www.hlrs.de/people/rabenseifner > > >