Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Edgar Gabriel (gabriel_at_[hidden])
Date: 2007-10-25 11:16:45


Jeff Squyres wrote:
> On Oct 25, 2007, at 12:11 AM, George Bosilca wrote:
>
>> Now you cast a doubt on me. As far as I remember, there is a trick
>> in MPI2 to do this. You can merge your inter-communicators into one
>> intra-communicators with MPI_Intercomm_merge and then use
>> MPI_Intercomm_create to spawn a new inter-comm over the 2 childs
>> world (using the common parent as a bridge process) ... I have to
>> try it to refresh my memory :)
>
> If you have the following scenario:
>
> - A spawns B, gets intercomm AB
> - A spawns C, gets intercomm AC (that does not include B)
> - ...repeat N times (e.g., to AN)

well, how about the following for your example:

- D = intercomm_merge (AB)
- E = intercomm_merge (AC)
- F = intercomm_create (DC, using E as bridge-communicator)
- F' = intercomm_merge (F)
- G = intercomm_create ( BC, using F' as bridge-communicator)

not very nice, but should work...

Edgar

>
> Then B and C are not even aware of each other (from MPI's
> perspective). I can't think of an MPI operation to magically connect
> all the previously-unknown-to-each-other MPI processes. You could
> use COMM_ACCEPT/COMM_CONNECT or COMM_JOIN to connect B and C (and B
> and D, and B and E, and C and D, and ...) and then you might have
> some more options, but that might be even more trouble that doing the
> cumulative COMM_SPAWN/INTERCOMM_MERGE.
>
> George: if you know of some trick, it would be interesting to hear.
>