A few minor questions and amendments:
> 1. The canonical external rep of a datatype returned by
> MPI_TYPE_CREATE_F90 is the same as that of the basic type used. The
> canonical external representation of MPI_REAL is 8 bytes. [Others are
> as defined in leslie's proposal. I picked 8 bytes because we no longer
> have REAL and DOUBLE_PRECISION to provide two choices, because many
> scientific codes need 8 bytes, and because it is better to err on the
> large size].
a) Does I understand right, that you want to define that both
MPI_REAL and MPI_DOUBLE_PRECISION should have 8 byte in the
default external representation?
b) Does I understand right, that
real(selected_real_kind(25, 0)) q
MPI_TYPE_CREATE_F90(MPI_REAL, kind(q), XTYPE, ierr)
will have q with 16 bytes and XTYPE therefore representing
a type identical to MPI_REAL16 for internal usage,
but with only 8 byte external representation?
If yes, then I believe that this is no real problem, but we
should add an Advice to users with a WARNING and an advice
to use MPI_TYPE_CREATE_EXTERNAL for that case.
(Other kind()-dependent solutions that catch this problem
are not good, because they do not guarantee that 'z' in your
example has a system independent external representation!)
> 2. Add a new function
>
> MPI_TYPE_CREATE_EXTERNAL(IN basictype, IN size, OUT newtype)
>
> basictype is one the basic integer or floating point types
> (MPI_INTEGER, MPI_REAL, or a type returned by MPI_TYPE_CREATE_F90 from
> one of these basetypes). This can easily be extended to C to include
> MPI_INT, MPI_FLOAT, MPI_DOUBLE, etc. ).
c) I believe this should be extended to C because this allows to
overwrite the external size.
And it should also be extended to optional types and logical types,
i.e. all numerical types ('numerical' in the sense of Fortran)
> Size is either 4 or 8, corresponding to one of the prefedined
> representations.
d) We should also allow 16 for floating point types to give a
solution for the requirement to exchange LONG_DOUBLE and
DOUBLE_PRECISION between 64-bit systems.
Rolf