Open
Description
There seems to be a difference in the way mpich and ompi behave when MPI_Get_elements is used in conjunction with datatypes used with reduction functions (MPI_DOUBLE_INT etc.). When a single count of such a datatype is received, mpich interprets the number of elements as 2 where as ompi returns 1. ompi seems to interpret the following line from the spec (chapter 4, page 114):
Note that the MPI_GET_COUNT, MPI_GET_ELEMENTS, and MPI_GET_ELEMENTS_X
return the same values when they are used with basic datatypes as long as the limits
of their respective count arguments are not exceeded.
to include the datatypes used in reduction functions. Here's the link to a test from mpich that can be used to reproduce the issue - http://git.mpich.org/mpich.git/blob_plain/HEAD:/test/mpi/datatype/get-elements-pairtype.c