Re: low level datatype accessing

Rajeev Thakur (thakur@mcs.anl.gov)
Tue, 22 Oct 1996 18:35:57 -0500

> As long as we are discussing this issue, I will raise two other points
> that are discussion items this section. First, when you get back a
> basic datatype can you tell what type it is? I don't think we say
> that the handle you get back from this function is the same. For
> example, if the type is MPI_INT will the handle you get back be the
> same as the predefined one so you can do a comparison.

I think it would be useful (and at the same time not hard for the
implementation) to require that the handle returned for a
basic datatype be the same as the predefined one. That is, the user
should be able to do

if (datatype == MPI_INT)

> Second, what are the array_types returned? Is it
> just a pointer to the handle or a new handle? That is, does the user
> have to free it?

A pointer to the handle is fine. Since the oldtype still exists (has
not been freed), is there a need for a new handle?

If a new handle is really needed, the user could explicitly do an
MPI_Type_contiguous with a count=1 on the returned handle, or
more elegantly, an MPI_Type_dup if it exists :-)

Rajeev