[MPIWG Fortran] MPI-3 ticket 349: Fortran question

Craig Rasmussen rasmus at cas.uoregon.edu
Fri Dec 13 11:15:48 CST 2013


Hum,

I thought I had sent this out earlier, but just found it in my "outbox".

On Dec 11, 2013, at 9:27 AM, Jeff Squyres (jsquyres) wrote:

> This ticket got a formal reading today at the Forum:
> 
>    http://svn.mpi-forum.org/trac/mpi-forum-web/ticket/349
>    (as of this writing, there's still a BIND(C) in there, but it will be removed shortly)
> 
> The function is basically intended to perform a mathematical operation.  As such, I think that the 2 Fortran bindings should be FUNCTIONs, not SUBROUTINEs (a la MPI_WTICK/MPI_WTIME).
> 
> Do you agree?  If so, the ticket author (Jim Dinan) is amenable to changing the Fortran bindings to the following (and I'm assuming I have the syntax below correct, but feel free to correct me if they're wrong):
> 
> -----
> INTEGER(KIND=MPI_ADDRESS_KIND) MPI_Aint_add(base, disp)
>    INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN) ::  base, disp
> 
> INTEGER(KIND=MPI_ADDRESS_KIND) MPI_AINT_ADD(BASE, DISP)
>    INTEGER(KIND=MPI_ADDRESS_KIND) BASE, DISP
> -----
> 


They look ok for me.  I wonder why there are two?  I don't think there should be.

I also think this would be an ideal place to use BIND(C).  I know we had to drop BIND(C) from the official interfaces (not from within an implementation) for a number of reasons, but I think BIND(C) is a good choice for NEW routines.  This will allow purely Fortran stuff to fade into the background.

-craig






More information about the mpiwg-fortran mailing list