[MPI3 Fortran] MPI-2.1: Fortran 90 bindings

Harald Klimach klimach at hlrs.de
Sat Mar 8 02:03:32 CST 2008


> It is required that the send and receive buffers have 
>compatible type  
> maps.  See MPI-1:4.1:

So this is about derived types? I don't think it is 
possible to catch derived types within the scope of F90, 
you have to fall back to the implicit F77 interface for 
this anyway.
Even so, as you said compatible type maps are required, 
which means, as far as I understand it, that there are the 
same base types on each side.
Looking at MPI-1: 3.3: "Data type matching and data 
conversion", I even think it is required that the two 
arguments are of the same type.

Observations so far:
It would be very nice, if Fortran would allow the assumed 
size notation in a generic interface to consume all ranks. 
Which would mean that you'd have to use assumed shape 
arrays if you want to explicitly use different routines 
for different ranks and both options would be mutually 

I think the MPI standard really prohibits different types 
in the case where there are 2 choice arguments.

I can't find anywhere in the standard where it is required 
that arrays of all ranks are allowed to be passed as 
actual arguments. But I can't find where it states that 
scalars are allowed either and in MPI-2 it is explicitly 
stated that this is an inconsistency of MPI with F90.
Both things (scalars and arrays of different ranks) are 
rather a observed behaviour of the F77 binding, which 
comes from the implicit interfaces.
Maybe the F90 binding shouldn't exactly rebuild the 
behaviour of the F77 binding?
Having to use only arrays of rank 1 certainly is quite 
inconvinient for the user, but I don't see where it is 
required by the standard to support all ranks in the F90 

To allow scalars and all ranks for all types I think in 
total there are 8 * 15 * 75 = 9000 subroutines needed.

If you restrict yourself to the types, that are at least 
required by MPI (MPI-1: 3.2.2) and don't support any other 
ranks besides rank 1, you're down at: 6*75 = 825 

In MPI-2 Page 13 Line 33 it says:
All MPI names have an MPI_ prefix, and all characters are 
However this statement "and all characters are capitals" 
hasn't any meaning in the Fortran context, right?

Best regards,

More information about the mpiwg-fortran mailing list