[mpich-discuss] Erroneous MPI type tag warning
Jed Brown
jedbrown at mcs.anl.gov
Wed Dec 25 21:36:44 CST 2013
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.
> 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 --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20131225/41b72295/attachment.sig>
More information about the discuss
mailing list