I read doc explaining struct at
http://www.open-mpi.org/doc/v1.4/man3/MPI_Type_struct.3.php

I haven't used mpi so I have a newbie question.

In the example function MPI_Type_struct(3, {2, 1, 3}, {0, 16, 26},
{MPI_FLOAT, type1, MPI_CHAR} ) is executed where type1 is consisted of
{(double,0)(char,8)}. The user defined datatype has extent 16 with
displacement at 16. However, the third block starts from displacement
26. This seems to me the end of type1 (at 32) would overlap the
displacement of MPI_CHAR (at 26). How does MPI solve this issue? Do
they simply ignore the rest space because it is only char type in
type1? Or if the type1 is defined by {(double, 0) (double, 8)}, won't
the data in the second block be truncated?

Thanks.

Reply via email to