[MPIWG Fortran] MPI_ARECV: Fortran pointers

Jeff Squyres (jsquyres) jsquyres at cisco.com
Wed Dec 11 10:09:57 CST 2013


I have a question about Fortran pointers and a MPI Forum proposal about "allocate receive".  Here's the slides from the MPI_ARECV proposal, from the Madrid meeting:

    http://meetings.mpi-forum.org/secretary/2013/09/slides/jsquyres-arecv.pdf

The issue is this: there is a proposal for something like this (in C):

    MPI_Iarecv(source, tag, comm, &request);

The application then tests/waits on the request, and when the request is complete, it means that the message has been received and MPI has allocated a buffer for it (vs. the user providing the buffer).  You then make another call to get the [contiguous] buffer from the MPI implementation (again, in C):

    char *buffer;
    MPI_Status_get_buffer(status, &buffer);

When the app is done with the buffer, the app gives it back to MPI via MPI_FREE_MEM:

    MPI_Free_mem(buffer);

So my questions to the Fortran Brain Trust (FBT) are: 

1. Is this do-able in Fortran?  I think it is, but I am ignorant of Fortran pointer issues.

2. Can we make an interface in Fortran that is natural / usable by normal/average Fortran programmers?

3. I'm guessing the above two questions are in the context of the mpi_f08 module -- I don't really care about mpif.h, but I *might* care about the mpi module...?  (this has deeper implications for if/when we want to deprecate mpif.h and/or the mpi module...)

I'm at the Forum this week.  Does anyone have time to have a call to discuss this next week, perchance?  I could setup a doodle to find a time.

-- 
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/




More information about the mpiwg-fortran mailing list