On Mar 30, 2009, at 11:43 AM, Gabriele Fatigati wrote:
> i'm writing an MPI_Gather wrapper to collect void elements. My
> queation is: is there a portable way to know the type of received
> elements, like MPI_INT or MPI_DOUBLE?
>
What datatype argument are you giving to MPI_GATHER -- MPI_BYTE?
> I've noted that i can retrieve
> this information by ompi_datatype_t-> name field, but i think isn't
> portable. Is there aMPI function that does this check?
>
You're correct that ompi_datatype_t->name is an internal field; it's
not part of the public MPI API.
MPI will likely only be able to report back to you the datatype that
you specified in the call to MPI_GATHER.
--
Jeff Squyres
Cisco Systems
|