[Mpi-forum] Question about the semantics of MPI_Comm_disconnect

Nathan Hjelm hjelmn at lanl.gov
Tue Nov 12 13:02:22 CST 2013


I am trying to understand the semantics of MPI_Comm_disconnect but there is a contradiction in
the standard. On page 400, lines 29-31 the standard states:



MPI_COMM_DISCONNECT may be called only if all communication is complete and
matched, so that buffered data can be delivered to its destination. This requirement is the
same as for MPI_FINALIZE.



Which suggests that all communication MUST be complete before MPI_Comm_disconnect is called. But
if I look at lines 41-43 I see this:



Rationale. It would be nice to be able to use MPI_COMM_FREE instead, but that
function explicitly does not wait for pending communication to complete. (End of
rationale.)



Which suggest that there may be pending communication on the communicator when MPI_Comm_disconnect
is called.



A simple example that *could* be legal depending on the interpretation of the standard:

MPI_Isend (..., remote, ..., &req);

MPI_Comm_disconnect (remote);

MPI_Test (&req, &flag, ...);
assert (flag);


If 29-31 is correct this is illegal but if 41-43 is correct then the disconnect will complete
the request and flag will be set to true. I assume the second interpretation is correct since
MPI_Comm_disconnect would have the same semantics of MPI_Comm_free if all communication must
be complete. Am I wrong?


-Nathan Hjelm
HPC-5, LANL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mpi-forum.org/pipermail/mpi-forum/attachments/20131112/c6e3f6b7/attachment.pgp>


More information about the mpi-forum mailing list