[Mpi-forum] Question about the semantics of MPI_Comm_disconnect
Jeff Squyres (jsquyres)
jsquyres at cisco.com
Wed Nov 13 15:00:06 CST 2013
On Nov 12, 2013, at 5:40 PM, Rajeev Thakur <thakur at mcs.anl.gov> wrote:
> Think of Comm_disconnect as "whatever connection was there between client and server is gone".
Rajeev --
This sentence has been bugging me, and I just figured out why.
I've always thought of COMM_DISCONNECT just as you describe: whatever connection was there between client and server is gone. But what about other types of MPI handles -- like MPI_File and MPI_Window? For example:
-----
MPI_Comm_spawn(..., &child);
MPI_Intercomm_merge(child, 0, &child_intra);
MPI_File_open(child_intra, ..., &file);
MPI_Comm_disconnect(&child_intra);
MPI_Comm_disconnect(&child);
-----
At this point, all communicators between parent and child are gone, but there's still a File (the same example could be done with an RMA window).
So the processes are *not* actually disconnected (in the MPI sense of the word "disconnected). Indeed, in the above example, if there was no File, you still have to do *2* disconnects before the parent and child are truly disconnected.
Hence, I think that this is a very poorly named function -- it *doesn't* necessarily disconnect MPI processes. It really performs and operation that is something like MPI_COMM_FREE_WAIT.
I wonder if this is worth an AtoU...
--
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
More information about the mpi-forum
mailing list