[Mpi-forum] MPI "Allocate receive" proposal

Matthieu Dorier matthieu.dorier at irisa.fr
Sat Aug 31 04:30:25 CDT 2013

----- Mail original -----
> De: "Dries Kimpe" <dkimpe at mcs.anl.gov>
> À: "Main MPI Forum mailing list" <mpi-forum at lists.mpi-forum.org>
> Envoyé: Samedi 31 Août 2013 04:21:34
> Objet: Re: [Mpi-forum] MPI "Allocate receive" proposal
> * Pavan Balaji <balaji at mcs.anl.gov> [2013-08-30 21:12:44]:
> > Where are you providing the buffer information?  Where will the
> > message be received to?
> Most likely it should be a MPI_Improbe followed by user(application)
> memory allocation, followed by MPI_Imrecv into the freshly allocated
> buffer.

Yes, this is what I'm thinking of. Yet reading the mails that I skipped yesterday, I can see now why it's still not good enough (because it requires a rendez-vous).

So maybe adding some parameters to MPI_Arecv? like MPI_Arecv(..., alloc_fn, free_fn) would be useful, to tell MPI what functions to use to allocate and free the buffer (the reason for providing the free_fn parameter also would be to recover from errors happening after the allocation but before the return from MPI_Arecv, in order not to have a memory leak that should be handled by the user. Besides, MPI_Mem_free could also select the user-provided free_fn for the buffer returned by MPI_Arecv, so that the user can always use the MPI_Mem_free abstraction.). Of course some constants like MPI_DEFAULT_ALLOC and MPI_DEFAULT_FREE could always provide a default way of allocating/freeing the buffer.


>   Dries
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum

More information about the mpi-forum mailing list