[mpich2-dev] update MPI_Type_match_size() to return C99 complex?
Lisandro Dalcin
dalcinl at gmail.com
Fri Dec 11 13:24:13 CST 2009
On Fri, Dec 11, 2009 at 3:54 PM, Dave Goodell <goodell at mcs.anl.gov> wrote:
> On Dec 11, 2009, at 9:56 AM, Lisandro Dalcin wrote:
>
>> Now that MPICH2 is updated to MPI-2.2, what's your feeling about
>> updating MPI_Type_match_size(MPI_TYPECLASS_REAL, n) to return C99
>> complex datatypes?
>
> I'm not particularly familiar with this function, but my understanding is
> that it is really only used for interfacing with Fortran 90 types.
Of course, I got really confused. But my confusion is partly because
MPICH2's sources return a mixture of C/Fortran types.
> So to me
> it makes sense for this function to only return named predefined datatypes
> corresponding to F90 types, such as MPI_REAL4 and MPI_INTEGER8.
>
Indeed, that's basically the wording in the MPI standard. But this is
not the case for MPICH2.
Please take a look at src/mpi/datatype/type_match_size.c
you will see lines like the below:
static MPI_Datatype real_types[] = { MPI_FLOAT, MPI_DOUBLE
...
static MPI_Datatype int_types[] = { MPI_CHAR, MPI_SHORT, MPI_INT,
....
static MPI_Datatype complex_types[] = { MPI_COMPLEX, MPI_DOUBLE_COMPLEX };
Regarding your previous comments, I think you will agree this
implementation is a nonsense.
> Also, doesn't a Fortran REAL correspond to a single C float or double rather
> than a complex value?
>
Sorry, my mistake. Yes, in my previous post, it should should read
MPI_TYPECLASS_COMPLEX.
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
More information about the mpich2-dev
mailing list