[MPI3 Fortran] MPI-2.1: Fortran 90 bindings

Harald Klimach klimach at hlrs.de
Fri Mar 7 06:01:32 CST 2008

OK, this was my misunderstanding. The generic interface is the problem,
Fortran distinguishes, which Routine to actually use by type, kind and
rank. I wrongly assumed that this rank distinguishing isn't in charge
for assumed size array, as it is for the non generic interface.
Obviously this is not the case, and if you use generic interfaces you
have to get along with this. 

> This is why we have all the dimensions explicitly specified in Open MPI.
Yes, sorry for any confusion I may have introduced.

> Either way, the back-end C function gets a pointer.  So I think we  
> were likely a) going above and beyond the spec, and b) fitting  
> MPI_BUFFER_ATTACH into the same OMPI F90 infrastructure as everything  
> else.
Yes, that was my point, that it may be beyond the standard. If you have
to take into account all dimensions separately anyway, this doesn't
matter anyway. So my point is void, I think.
It is very convenient if you can hand over scalars.

> But the type is variable, right?  Hence, if you use an explicit size,  
> the *real* size of the buffer (in bytes) is sizeof(type)*size.  The  
> "size" parameter is supposed to be specified in bytes, not increments  
> of type size.  So I don't think the above binding would yield correct  
> results for non-character types.  Right?
Hm, ok, perhaps this was a bad example, I never used MPI_BUFFER_ATTACH
and just picked it because it has only two arguments ;)
MPI_SEND would have been more appropiate.

> Actually, MPI explicitly allows you to mix-n-match the types.  :-\
Could you please point me to, where this is stated? I can't find it.
All I see is mentioning of that it should be allowed to have different
types on separate calls. Which is also true for functions with one
choice argument. Of course this may be due to my humble understanding
of MPI.
Anyway this may be a detail which needs clarification?

> Certainly, there are cases that are non-sensical (e.g., sending its  
> and receiving floats), but you *could* send complexes and receive  
> twice as many floats, and that would be fine.

Dipl.-Ing. Harald Klimach  email: klimach at hlrs.de
HLRS, Uni Stuttgart        http://www.hlrs.de/people/klimach
Nobelstraße 19             phone: 0711-685 60300
70569 Stuttgart            fax:   0711-685 65832

More information about the mpiwg-fortran mailing list