Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Problem with MPI_Intercomm_create
From: George Bosilca (bosilca_at_[hidden])
Date: 2011-06-07 01:57:55


Frederic,

Attached you will find an example that is supposed to work. The main difference with your code is on T3, T4 where you have inversed the local and remote comm. As depicted on the picture attached below, during the 3th step you will create the intercomm between ab and c (no overlap) using ac as a bridge communicator (here the two roots, a and c, can exchange messages).

Based on the MPI 2.2 standard, especially on the paragraph in PS:, the attached code should have been working. Unfortunately, I couldn't run it successfully neither with Open MPI trunk nor MPICH2 1.4rc1.

 george.

PS: Here is what the MPI standard states about the MPI_Intercomm_create:
> The function MPI_INTERCOMM_CREATE can be used to create an inter-communicator from two existing intra-communicators, in the following situation: At least one selected member from each group (the “group leader”) has the ability to communicate with the selected member from the other group; that is, a “peer” communicator exists to which both leaders belong, and each leader knows the rank of the other leader in this peer communicator. Furthermore, members of each group know the rank of their leader.



On Jun 1, 2011, at 05:00 , Frédéric Feyel wrote:

> Hello,
>
> I have a problem using MPI_Intercomm_create.
>
> I 5 tasks, let's say T0, T1, T2, T3, T4 resulting from two spawn
> operations by T0.
>
> So I have two intra-communicator :
>
> intra0 contains : T0, T1, T2
> intra1 contains : T0, T3, T4
>
> my goal is to make a collective loop to build a single intra-communicator
> containing T0, T1, T2, T3, T4
>
> I tried to do it using MPI_Intercomm_create and MPI_Intercom_merge calls,
> but without success (I always get MPI internal errors).
>
> What I am doing :
>
> on T0 :
> *******
>
> MPI_Intercom_create(intra0,0,intra1,0,1,&new_com)
>
> on T1 and T2 :
> **************
>
> MPI_Intercom_create(intra0,0,MPI_COMM_WORLD,0,1,&new_com)
>
> on T3 and T4 :
> **************
>
> MPI_Intercom_create(intra1,0,MPI_COMM_WORLD,0,1,&new_com)
>
>
> I'm certainly missing something. Could anybody help me to solve this
> problem ?
>
> Best regards,
>
> Frédéric.
>
> PS : of course I did an extensive web search without finding anything
> usefull on my problem.
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users