Subject: C12C2

From: "Marc Snir" <[email-masked]>
Date: Fri, 20 Aug 93 19:20:06 EDT

I suggest to add C1 to C2 and C2 to C1 communicator conversion functions.
Both functions are collective.

MPI_C1toC2(comm, inwhich, newcomm) ,
where "inwhich" is either (0 or 1) splits a group into
two subgroups and create a C2 communicator for this pair of groups.
Order is preserved within each subgroup.

MPI_C2toC1(comm, whichfirst, newcomm)
merges the two groups and create a new
communicator for the resulting group.  "whichfirst" can be either 0 or 1.
All processes within one subgroup should supply 0 and all processes
within the other subgroup should supply 1.  In the merged group,
processes that supplied 0 appear before processes that supplied 1.
(Need some rule for the case where the groups are not distinct)

Rationale for C2toC1:  If we move to a dynamic world, new processes will
not appear in the MPI_ALL group but, most likely, will appear in a group
(communicator) that contain them and their paretn, which is in MPI_ALL.
We can create a C2 communicator for MPI_ALL and the new children and, later,
merge the groups.   We might have a shorthand function that does the merge
in one pass (and has a syntax similar to the syntax for C2 creation:
two groups, a bridge group, name a leaders, etc.)

Rationale for C1toC2:  If we start in a closed universe, we may use this
function to create in a convenient manner server partitions known to
everybody.