[Mpi-forum] Question about the semantics of MPI_Comm_disconnect
bosilca at icl.utk.edu
Tue Nov 12 16:45:17 CST 2013
It is clearly stated the all communication should complete, in the MPI sense. For a send, completion means that the buffer can be reused, not that the data has been sent. Thus, the requirement that all communication should be completed, only implies that there are no pending requests on the communicator to be disconnected. DOT. It does not means that internally MPI is not still progressing some of the communications. And this is what MPI_Comm_disconnect is guaranteed to be doing, wait till all __internal__ pending operations are completed on the disappearing communicator.
On Nov 12, 2013, at 23:27 , Nathan Hjelm <hjelmn at lanl.gov> wrote:
> On Tue, Nov 12, 2013 at 04:20:05PM -0600, Rajeev Thakur wrote:
>> On Nov 12, 2013, at 4:08 PM, Nathan Hjelm <hjelmn at lanl.gov> wrote:
>>> That doesn't match with the wording on p 400 32-34:
>>> "MPI_COMM_DISCONNECT has the same action as MPI_COMM_FREE, except that it
>>> waits for pending communication to finish internally and enables the guarantee about the
>>> behavior of disconnected processes."
>> The above sentence says that MPI_Comm_free does not wait for pending communication to complete, whereas MPI_Comm_disconnect does.
> That makes absolutely no sense if MPI_Wait/MPI_Test cannot be called after MPI_Comm_disconnect. If
> neither of those functions can be called after MPI_Comm_disconnect then it would be better wording
> that all communication MUST be complete before the call the MPI_Comm_disconnect without any
> qualification that MPI_Comm_disconnect with wait until all communication is complete. There should
> be no communication otherwise we have to allow MPI_Wait/MPI_Test after the call to MPI_Comm_disconnect.
> You see why this is confusing/bad wording in the standard? As an implementor I can not tell what
> was intended here.
>>> Which suggests that some communication may not be finished when MPI_Comm_disconnect is called. Note
>>> that is is safe to call MPI_Wait after MPI_Comm_disconnect but not after MPI_Finalize.
>> You cannot call MPI_Wait after MPI_Comm_disconnect. You can call it after MPI_Comm_free.
> I don't see that anywhere in the description of MPI_Comm_disconnect. As far as I can tell the
> code snippet I provided is 100% correct MPI code.
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
More information about the mpi-forum