[mpich-discuss] bug report: MPI_LB and MPI_UB used in MPI_Type_create_subarray
thakur at mcs.anl.gov
Fri Jan 16 14:38:34 CST 2015
I have created a ticket for this.
On Jan 15, 2015, at 5:32 PM, Wei-keng Liao <wkliao at eecs.northwestern.edu> wrote:
> After a discussion with Rajeev and Rob, we found that the deprecated MPI_LB and MPI_UB
> markers are still being used in the implementation of MPI_Type_create_subarray() and/or darray.
> These markers were mistakenly carried over in MPI_Type_create_struct() causing an incorrect
> lower bound for the newly created datatype. A test program that can reproduce the error is
> attached. Below is its description.
> The test program tries to concatenate two data types.
> The first datatype is a contiguous space of 16 bytes at displacement 0.
> The second is a subarray type at displacement 32, named bodytype created by MPI_Type_create_subarray().
> The global array is 5*nprocs integers and subarray is of size 5 integers.
> The two types were concatenated by MPI_Type_create_struct() to create
> a new datatype named ftype. Here is the stdout for running it on 1 process.
> --- the stdout from both mpich and openmpi ----
> HEADER_EXTENT = 16 VAR_BEGIN = 32
> bodytype lb= 0 ub=20 extent=20 size=20
> ftype lb=32 ub=52 extent=20 size=36 true_lb= 0 true_extent=52
> [ 0]: 0 1 2 3 8 9 10 11 12 5
> : 6 7 8 13 14 15 16 17 10 11
> : 12 13 18 19 20 21 22
> 1. ftype's lower bound should be 0. (mpich shows 32)
> 2. ftype's extent should be 52. (mpich shows 20)
> 3. packing 3 of ftypes to a contiguous array (27 integers) and its contents are incorrect.
> ps. explicitly resizing ftype with lb=0 and extent=52 produces correct packed results, though.
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
More information about the discuss