[mpich-discuss] Fwd: Erroneous MPI type tag warning
Junchao Zhang
jczhang at mcs.anl.gov
Wed Dec 25 21:52:42 CST 2013
On Wed, Dec 25, 2013 at 9:36 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Junchao Zhang <jczhang at mcs.anl.gov> writes:
>
> > To strictly obey MPI standard, we should declare MPI_2INT's type
> attribute
> > as
> >
> > typedef int mpich_array_mpi_2int[2];
> > static const MPI_Datatype mpich_mpi_2int
> > MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE (mpich_array_mpi_2int) =
> > MPI_2INT;
>
> Why would you want this? How is this a more "strict" interpretation of
> the standard? Note that for heterogeneous pairs, such as
> MPI_DOUBLE_INT, the struct definition is the only one that really makes
> sense and gets padding correct.
>
> I tried to literally interpret "MPI_TYPE_CONTIGUOUS(2, MPI_REAL,
MPI_2REAL)" stated in the standard. I agree in reality it is not more
strict.
> > The warning happens again. In reality, struct {int value; int loc; }
> should
> > have the same layout as int[2].
>
> Guaranteed to be the same, yes.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20131225/4d2b6424/attachment.html>
More information about the discuss
mailing list