Subject: Comments on Oct. 19 draft

From: [email-masked] (Tom Henderson)
Date: Fri, 22 Oct 93 10:55:31 MDT

Hi all,

A few comments on the Inter-Communication section (5.5) and the 
Inter-Communication Examples section (5.8.7) of the October 19 draft...  

On page 118, line 46, the first sentence reads:  

"Intercommunicators can be created using the function MPI_COMM_DUP."

We had a long discussion following the last meeting about how to describe 
rules for "safe" use of the inter-communicator construction routines.  The 
result was a decision to drop the blocking versions:  MPI_INTERCOMM_MAKE() 
and MPI_INTERCOMM_NAME().  It seems to me that using MPI_COMM_DUP() to 
duplicate an inter-communicator has the same synchronization problems as 
MPI_INTERCOMM_MAKE()-- both groups need to know what's going on.  It's just 
another blocking inter-communicator construction routine.  To be consistent, 
I think we need to delete this sentence or replace "can" with "cannot".  

On page 119, lines 6-12:  

"The explicit synchronization can cause deadlock in modular programs with 
cyclic communication graphs, even if:  

  * within each local group calls are executed in the same order,

  * the local and remote operations are decoupled and the construction is 
    performed "loosely synchronously" (by calling the two routines 
    MPI_INTERCOMM_START() and MPI_INTERCOMM_FINISH())."

The previous draft (9/27) read:  

"The explicit synchronization can cause deadlock in modular programs with 
cyclic communication graphs, even if within each local group calls are 
executed in the same order.  So, the local and remote operations can be 
decoupled and the construction performed "loosely synchronously" by calling 
the two routines MPI_INTERCOMM_START() and MPI_INTERCOMM_FINISH()."

I have two comments about this change:  

  1)  In the current draft, the ONLY WAY to construct an inter-communicator 
      is "loosely synchronously".  The second bullet doesn't make sense any 
      more.  The local and remote operations are always decoupled.  

  2)  My interpretation of the current draft is that there is no "safe" way 
      to construct an inter-communicator.  I think it may also be true that 
      we don't know how to describe sufficient conditions for non-deadlocking 
      for any series of collective operations on groups that overlap.  If 
      this is true, then we should make this statement a general warning 
      about using any collective operations and not hide it here.  

Comments please?  I don't have a good idea for fixing this text without 
knowing what lead to the change.  What am I missing?  

On page 119, line 41 (typo):  

"MPI _arg" appears, looks like a typo.  

On page 120, lines 8-9 (typo):  

"This call starts off an inter-communicator creation operation, returning a 
handle for the completion of the operation in handle; ..."
                                              ^^^^^^

"This call starts off an inter-communicator creation operation, returning a 
handle for the completion of the operation in inter_request; ..."
                                              ^^^^^^^^^^^^^

On page 121, line 28 (clarification):  

I would like to add the following sentence:  

"All processes in the local and remote groups must provide the same name."  

This is not stated anywhere else.  It used to be in an implementation note.  

On page 134, line 26 (typo):  

"group B" should be "group 1"

This one's my fault, left over from several drafts ago...  :-)

On page 137, lines 24-40 (typos):  

"if (color == 0)
   {        /* Group 0 communicates with group 1. */
     MPI_Intercomm_name_start (myComm, "Connect 01", &inter_request1);
     MPI_Intercomm_finish (inter_request1, &myFirstComm);
   }
 else if (color == 1)
   {        /* Group 1 communicates with groups 0 and 2. */
     MPI_Intercomm_name_start (myComm, "Connect 10", &inter_request1);
     MPI_Intercomm_name_start (myComm, "Connect 12", &inter_request2);
     MPI_Intercomm_finish (inter_request1, &myFirstComm);
     MPI_Intercomm_finish (inter_request2, &mySecondComm);
   }
 else if (color == 2)
   {        /* Group 2 communicates with group 1. */
     MPI_Intercomm_name_start (myComm, "Connect 21", &inter_request1);
     MPI_Intercomm_finish (inter_request1, &myFirstComm);
   }"

Names must match for all processes in local and remote groups.  Fix is:  

 if (color == 0)
   {        /* Group 0 communicates with group 1. */
     MPI_Intercomm_name_start (myComm, "Connect 01", &inter_request1);
     MPI_Intercomm_finish (inter_request1, &myFirstComm);
   }
 else if (color == 1)
   {        /* Group 1 communicates with groups 0 and 2. */
     MPI_Intercomm_name_start (myComm, "Connect 01", &inter_request1);
                                                ^^
     MPI_Intercomm_name_start (myComm, "Connect 12", &inter_request2);
     MPI_Intercomm_finish (inter_request1, &myFirstComm);
     MPI_Intercomm_finish (inter_request2, &mySecondComm);
   }
 else if (color == 2)
   {        /* Group 2 communicates with group 1. */
     MPI_Intercomm_name_start (myComm, "Connect 12", &inter_request1);
                                                ^^
     MPI_Intercomm_finish (inter_request1, &myFirstComm);
   }

On page 138, lines 39-48 and page 139, lines 1-5 (typos):  

"if (color == 0)
   {        /* Group 0 communicates with groups 1 and 2. */
     MPI_Intercomm_name_start (myComm, "Connect 01", &inter_request1);
     MPI_Intercomm_name_start (myComm, "Connect 02", &inter_request2);
   }
 else if (color == 1)
   {        /* Group 1 communicates with groups 0 and 2. */
     MPI_Intercomm_name_start (myComm, "Connect 10", &inter_request1);
     MPI_Intercomm_name_start (myComm, "Connect 12", &inter_request2);
   }
 else if (<I am in group 2>)
   {        /* Group 2 communicates with groups 0 and 1. */
     MPI_Intercomm_name_start (myComm, "Connect 20", &inter_request1);
     MPI_Intercomm_name_start (myComm, "Connect 21", &inter_request2);
   }"

Names must match for all processes in local and remote groups.  Also, last 
elseif is a dinosaur.  Fixes are:  

 if (color == 0)
   {        /* Group 0 communicates with groups 1 and 2. */
     MPI_Intercomm_name_start (myComm, "Connect 01", &inter_request1);
     MPI_Intercomm_name_start (myComm, "Connect 02", &inter_request2);
   }
 else if (color == 1)
   {        /* Group 1 communicates with groups 0 and 2. */
     MPI_Intercomm_name_start (myComm, "Connect 01", &inter_request1);
                                                ^^
     MPI_Intercomm_name_start (myComm, "Connect 12", &inter_request2);
   }
 else if (color == 2)
          ^^^^^^^^^^
   {        /* Group 2 communicates with groups 0 and 1. */
     MPI_Intercomm_name_start (myComm, "Connect 02", &inter_request1);
                                                ^^
     MPI_Intercomm_name_start (myComm, "Connect 12", &inter_request2);
                                                ^^
   }

By the way, whoever updated all these examples to the current draft, thanks!  

Bye for now...  

Tom