Re: [Mpi-forum] MPI_Request_free restrictions
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 < [email protected]> wrote:
I see discussion of this issue here:
https://github.com/mpi-forum/mpi-forum-historic/issues/83
Puri ------------------------------ *From:* mpi-forum <[email protected]> on behalf of Balaji, Pavan via mpi-forum <[email protected]> *Sent:* Saturday, August 8, 2020 8:51 AM *To:* [email protected] <[email protected]> *Cc:* Balaji, Pavan <[email protected]> *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 [email protected] https://lists.mpi-forum.org/mailman/listinfo/mpi-forum
-- Jeff Hammond [email protected] http://jeffhammond.github.io/
participants (1)
-
Jeff Hammond