Attached program is an implementation of example 4.6 from MPI-3 standard.
It prints the lower bound, upper bound, extent, size, etc. of a datatype created
by MPI_Type_create_struct(). The value of lower bound is incorrect.

Here is the description of example 4.6.

Let type1 have type map, {(double, 0), (char, 8)}, with extent 16.
Let B = (2, 1, 3), D = (0, 16, 26), and T = (MPI_FLOAT, type1, MPI_CHAR).
Then a call to MPI_TYPE_CREATE_STRUCT(3, B, D, T, newtype) returns a datatype with type map,
{(float, 0), (float, 4), (double, 16), (char, 24), (char, 26), (char, 27), (char, 28)}.

According to the type map of "newtype", its LB should be 0, but the result from
MPICH gives 16. Rajeev believes this is because of the LB of a resized type was mistakenly
carried over to the successive call to MPI_Type_create_struct().

Wei-keng

_______________________________________________
discuss mailing list     discuss@mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss