[MPI3 Fortran] MPI Fortran bindings

Lionel, Steve steve.lionel at intel.com
Fri Jun 5 14:16:22 CDT 2009


Aleks wrote:

>> To the MPI-using programmer, it tells them what to put in their
>> source.
>What more does it tell them than is there already in MPI 1?

Not much of anything, really, if we choose not to go the C_PTR route. I think it would be nice, at least, to show the interface in Fortran 90 style with INTENT, even if it doesn't add much value to the F77 programmer.

> For example, assume the actual is a polymorphic array:
> 
> CLASS(*), DIMENSION(:), ... :: x ! Could be dummy or allocatable
> 
> CALL MPI_...(buffer=x, ...)
> 
> What does your proposed interface tell the programmer about this case?

Just the interface alone, with the placeholder, doesn't say much.  I suppose words would have to be added saying that the argument must have a defined type.  That the actual is assumed-shape raises the spectre of non-contiguity, but we have that already.  The way it would be declared in the actual interface block would not allow a CLASS(*) actual except within a SELECT TYPE block.

>  You, for example, proposed:
>
> <type>, dimension(*), intent(IN) :: BUF

> That does not allow a scalar actual, unless it is an element of an array 
> (in which case it means something else than passing the scalar itself). 
> Is this the agreed intention?

I am not an MPI programmer - I don't know if passing scalars is something people would expect to be able to do.  It can be handled with a generic if that is required.

Steve  




More information about the mpiwg-fortran mailing list