User-Agent: Microsoft-Entourage/9.0.2509 Date: Thu, 20 Sep 2001 11:27:05 -0500 Subject: FW: blocklength zero in MPI_Type_struct From: Steven Huss-Lederman To: William Gropp In-Reply-To: <3B5EAA9E.1743FEE3@XXXXXXXXXXXX> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Dear Bill, This is an old message I never responded to. It raises the question of 0 length blocks. In MPI-1.1 p. 63 line 29 says they are nonnegative. Thus 0 seems OK. The formula on p. 64 lines 26-42 uses bl -1 so if the blocklength is 0 it seems to give a funny value. I'm hoping I'm missing something obvious. Help? Steve ------ Forwarded Message From: Peter Ganster Reply-To: mpi-21@mpi-forum.org Date: Wed, 25 Jul 2001 13:16:46 +0200 To: mpi-comments@XXXXXXXXXXXXX Subject: blocklength zero in MPI_Type_struct Hello, I have a question: What happens if one use blocklenghts of zero in the call of MPI_Type_struct: Is the behavior implementation dependent or is it definded by the MPI-1 or MPI-2 standard? Example: typedef struct { double a, b[2], c; } S; int count = 3; int blocklens[3] = {0, 2, 0}; MPI_Aint disps[3] = {0, offsetof(S, b), sizeof(S)}; MPI_Datatype types[3] = {MPI_BYTE, MPI_DOUBLE, MPI_BYTE}; MPI_Datatype newtype; MPI_Type_struct(count, blocklens, disps, types, &newtype); And second, are there any technical standard papers (like the C language standard paper of ANSI) that gives precise answers on questions like above? with kind regards Peter Ganster ------ End of Forwarded Message