[Mpi-forum] MPI_Request_free restrictions

Jeff Hammond jeff.science at gmail.com
Sat Aug 8 16:33:59 CDT 2020


Correct, but that’s not what I was suggesting. I was saying that the root alone could track completion of any number of collectives individually and then broadcast notice of those completions to all ranks.

This is but one example use case where freeing requests associated with NBCs makes sense.

Jeff

Sent from my iPhone

> On Aug 8, 2020, at 2:14 PM, Richard Graham <richgraham at nvidia.com> wrote:
> 
> 
> The non-blocking reductions are required to start in the same order, completion order is not specified.  So I don’t think you can infer from the completion of the last non-blocking operation (ibarrier in this case), that all others have completed.
>  
> Also, completion is local, and even in a synchronized operation like a reduction, not all ranks will complete at exactly the same time.  All have to enter the operation before any can complete, but the fact that one completed does not guarantee the other have.
>  
> Rich
>  
> From: mpi-forum <mpi-forum-bounces at lists.mpi-forum.org> On Behalf Of Jeff Hammond via mpi-forum
> Sent: Saturday, August 8, 2020 3:56 PM
> To: Main MPI Forum mailing list <mpi-forum at lists.mpi-forum.org>
> Cc: Jeff Hammond <jeff.science at gmail.com>
> Subject: Re: [Mpi-forum] MPI_Request_free restrictions
>  
> External email: Use caution opening links or attachments
>  
> The argument that there is no portable way to detect completion is false.  It is completely portable to detect completion using only a subset of processes, and there may even be use cases for it.
>  
> For example, an application can use Ibarrier to determine whether all processes have reached a phase of the program but only detect this at one rank.
>  
> MPI_Request req; 
> {
>   foo();
>   MPI_Ibarrier(comm, &req);
>   if (rank) MPI_Request_free(&req);
>   ..
> }
> if (!rank) {
>   MPI_Wait(&req);
>   printf("foo finished everywhere\n");
> }
>  
> Similarly, one might have a bunch of Ireduce operations where the root is the only rank that tests completion, after which it notifies all processes that the bunch has completed.
>  
> Are there any implementations that can't trivially support this?  I recall that MPICH implements requests as nothing more than pointers to internal state, and I assume that Open-MPI does something similar.
>  
> Jeff
>  
> On Sat, Aug 8, 2020 at 9:45 AM Bangalore, Purushotham via mpi-forum <mpi-forum at lists.mpi-forum.org> wrote:
> I see discussion of this issue here:
>  
> https://github.com/mpi-forum/mpi-forum-historic/issues/83
>  
> Puri
> From: mpi-forum <mpi-forum-bounces at lists.mpi-forum.org> on behalf of Balaji, Pavan via mpi-forum <mpi-forum at lists.mpi-forum.org>
> Sent: Saturday, August 8, 2020 8:51 AM
> To: mpi-forum at lists.mpi-forum.org <mpi-forum at lists.mpi-forum.org>
> Cc: Balaji, Pavan <balaji at anl.gov>
> Subject: [Mpi-forum] MPI_Request_free restrictions
>  
> Folks,
>  
> Does someone remember why we disallowed users from calling MPI_Request_free on nonblocking collective requests?  I remember the reasoning for not allowing cancel (i.e., the operation might have completed on some processes, but not all), but not for Request_free.  AFAICT, allowing the users to free the request doesn’t make any difference to the MPI library.  The MPI library would simply maintain its own refcount to the request and continue forward till the operation completes.  One of our users would like to free NBC requests so they don’t have to wait for the operation to complete in some situations.
>  
> Unfortunately, when I added the Rput/Rget operations in the RMA chapter, I copy-pasted that text into RMA as well without thinking too hard about it.  My bad!  Either the RMA committee missed it too, or they thought of a reason that I can’t think of now.
>  
> Can someone clarify or remind me what the reason was?
>  
> Regards,
>  
>   — Pavan
>  
> MPI-3.1 standard, page 197, lines 26-27:
>  
> “It is erroneous to call MPI_REQUEST_FREE or MPI_CANCEL for a request associated with a nonblocking collective operation.”
>  
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpi-forum
> 
>  
> --
> Jeff Hammond
> jeff.science at gmail.com
> http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-forum/attachments/20200808/52ba58cb/attachment-0001.html>


More information about the mpi-forum mailing list