As pointed out during preparation of the MPI 4 standard, the way MPI_Session_finalize is defined as potentially synchronizing:
MPI_SESSION_FINALIZE may be synchronizing on any or all of the groups associated
with communicators, windows, or les derived from the session and not disconnected, freed,
or closed, respectively, before the call to the MPI_SESSION_FINALIZE procedure.
revealed some less than desirable complexities for applications using sessions in non-trivial ways.
There was some agreement that the asymmetry between the local nature of MPI_Session_init and potentially non-local behavior of MPI_Session_finalize was part of the problem. For MPI-5 it would be good to have an alternative, local method for cleaning up local MPI resources associated with a session.
As pointed out during preparation of the MPI 4 standard, the way
MPI_Session_finalizeis defined as potentially synchronizing:revealed some less than desirable complexities for applications using sessions in non-trivial ways.
There was some agreement that the asymmetry between the local nature of
MPI_Session_initand potentially non-local behavior ofMPI_Session_finalizewas part of the problem. For MPI-5 it would be good to have an alternative, local method forcleaning uplocal MPI resources associated with a session.