Date: Wed, 25 Jul 2001 13:16:46 +0200
From: Peter Ganster
X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.16-SMP i686)
X-Accept-Language: en
MIME-Version: 1.0
To: mpi-comments@XXXXXXXXXXXXX
Subject: blocklength zero in MPI_Type_struct
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-mpi-comments@XXXXXXXXXXXXX
Precedence: bulk
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