Question about the semantics of MPI_Comm_disconnect
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
participants (1)
-
Nathan Hjelm