[Mpi-forum] Question about the semantics of MPI_Comm_disconnect

George Bosilca bosilca at icl.utk.edu
Wed Nov 13 15:25:33 CST 2013


Disconnect doesn’t work at the physical connection level, it is supposed to mark two previously connected world as disconnected in the MPI sense. In MPI there is this transitive notion of connected processes, which can only be reversed by the usage of disconnect. Basically MPI_Finalize is collective over all connected processes, which is a burden in some cases. Disconnect is here to allow the disruption of the connected notion.

Thus, Disconnect only has a special meaning when called on a communicator returned by SPAWN, ACCEPT/CONNECT and JOIN. Any other usage is similar to MPI_Comm_Free. This in well explained in 10.5.4 once at the beginning of the section and then again in the first advice to users.

  George.

PS: That being said if instead of calling Disconnect one release all communicators with MPI_Comm_free the processes are still connected, and the MPI_Finalize remains global with a scope outside a single MPI_WORLD.

On Nov 13, 2013, at 22:00 , Jeff Squyres (jsquyres) <jsquyres at cisco.com> wrote:

> 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/
> 
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum




More information about the mpi-forum mailing list