<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Jayesh,<div><br></div><div>I haven't problem with MPI_Intercomm_merge. I tried to merge using different directions successfully. I checked also the size of the new intracommunicator after merging and it is correct too (size 2).</div><div><br></div><div>Additionally, yesterday I tried with MPI_Comm_spawn + MPI_Intercomm_create &nbsp;examples at testcase without problems. In these cases all the processes on the same group have same intercommunicators. However, in my case, I am doing something wrong when three processes call MPI_Intercomm_create over two remote groups. (AB intra, C inter). Arguments mistake maybe?&nbsp;</div><div><br></div><div>As suggested Dave, I tried my example with the lasted stable version of MPICH2, with similar results.</div><div><br></div><div>Thanks for all</div><div><br></div><div>Regards</div><div><br><div><div>El 19/01/2010, a las 16:22, <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br> I haven't looked at your code yet. You can look at the testcase, testconnect.c (<a href="https://svn.mcs.anl.gov/repos/mpi/mpich2/trunk/test/mpi/manual/testconnect.c">https://svn.mcs.anl.gov/repos/mpi/mpich2/trunk/test/mpi/manual/testconnect.c</a>), in the MPICH2 test suite for a simple example on how to use connect/accept and intercomm_merge to create an intracommunicator.<br><br>-Jayesh<br><br>----- Original Message -----<br>From: "Francisco Javier García Blas" &lt;<a href="mailto:fjblas@arcos.inf.uc3m.es">fjblas@arcos.inf.uc3m.es</a>&gt;<br>To: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>Sent: Monday, January 18, 2010 10:26:08 AM GMT -06:00 US/Canada Central<br>Subject: Re: [mpich-discuss] New communicator from connect/accept primitives<br><br>Hello again,<br><br>In first place, thanks for response of Rajeev and Jayesh. Following <br>Rajeev 's instruccion, &nbsp;I implemented an basic example using <br>connect/accept and intercomm_create/merge primitives. I am doing <br>something wrong because when MPI_Intercomm_create is invoked, all the <br>processes become blocked. I don't find the error, maybe it could be a <br>bad numeration in local and remote communicator but I tried all the <br>combinations.<br><br>I am using mpich2 1.0.5.<br><br>I attach the source code and a makefile.<br><br>Best regards<br><br>Rajeev Thakur escribió:<br><blockquote type="cite">You will need to use intercomm_merge but you have to merge them one <br></blockquote><blockquote type="cite">pair at a time. Example below from an old mail.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Rajeev<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If you have 3 intercommunicators AB_inter, AC_inter, and AD_inter, you <br></blockquote><blockquote type="cite">can merge them all into a single<br></blockquote><blockquote type="cite">intercommunicator as follows:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">* begin by doing an MPI_Intercomm_merge on AB_inter, resulting in an<br></blockquote><blockquote type="cite">intracommunicator AB_intra.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">* then create an intercommunicator between AB on one side and C on the <br></blockquote><blockquote type="cite">other<br></blockquote><blockquote type="cite">by using MPI_Intercomm_create. Pass AB_intra as the local_comm on A and B,<br></blockquote><blockquote type="cite">MPI_COMM_WORLD as the intracomm on C, and AC_inter as the peer_comm. This<br></blockquote><blockquote type="cite">results in the intercommunicator AB_C_inter.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">* then call MPI_Intercomm_merge on it to create the intracommunicator<br></blockquote><blockquote type="cite">ABC_intra.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">* then call MPI_Intercomm_create to create an intercommunicator <br></blockquote><blockquote type="cite">between ABC<br></blockquote><blockquote type="cite">and D just as you did with AB and C above.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">* Again do an intercomm_merge. This will give you an intracommunicator<br></blockquote><blockquote type="cite">containing A, B, C, D.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">* If you want an intercommunicator with A in one group and B,C,D in the<br></blockquote><blockquote type="cite">other, as you would get with a single spawn of 3 processes, you have <br></blockquote><blockquote type="cite">to call<br></blockquote><blockquote type="cite">MPI_Comm_split to split this single communicator into two<br></blockquote><blockquote type="cite">intracommunicators, one containing A and the other containing B,C,D. Then<br></blockquote><blockquote type="cite">call MPI_Intercomm_create to create the intercommunicator.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;------------------------------------------------------------------------<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;*From:* <a href="mailto:mpich-discuss-bounces@mcs.anl.gov">mpich-discuss-bounces@mcs.anl.gov</a><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;[mailto:mpich-discuss-bounces@mcs.anl.gov] *On Behalf Of<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;*Francisco Javier García Blas<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;*Sent:* Friday, January 15, 2010 11:09 AM<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;*To:* <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;*Subject:* [mpich-discuss] New communicator from connect/accept<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;primitives<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Hello all,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;I wondering the possibility of get a new inter-comunicator from N<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;communicators, which are results from different calls of<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;mpi_comm_connect or mpi_comm_accept.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;My initial solution was first, &nbsp;to get the group of each<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;inter-communicator with mpi_comm_group, second, to join all the<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;groups into one bigger and finally, to create a new communicator<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;from the group with the mpi_comm_create primitive. <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Currently I am handling a pool of inter - communicators in order<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;to keep the functionality. However this idea is not suitable for<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;collective and MPI_ANY_SOURCE sends/recvs.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Exist another way to join all the inter-communicator into one? &nbsp;&nbsp;&nbsp;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Any suggestion?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Best regards.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;--------------------------------------------------<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Francisco Javier García Blas<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Computer Architecture, Communications and Systems Area.<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Computer Science Department. UNIVERSIDAD CARLOS III DE MADRID<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Avda. de la Universidad, 30<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;28911 Leganés (Madrid), SPAIN<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;e-mail: <a href="mailto:fjblas@arcos.inf.uc3m.es">fjblas@arcos.inf.uc3m.es</a> &lt;<a href="mailto:fjblas@arcos.inf.uc3m.es">mailto:fjblas@arcos.inf.uc3m.es</a>&gt;<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:fjblas@inf.uc3m.es">fjblas@inf.uc3m.es</a> &lt;<a href="mailto:fjblas@inf.uc3m.es">mailto:fjblas@inf.uc3m.es</a>&gt;<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;Phone:(+34) 916249118<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;FAX: (+34) 916249129<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;--------------------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------------------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">mpich-discuss mailing list<br></blockquote><blockquote type="cite"><a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br></blockquote><blockquote type="cite"><a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br></blockquote><blockquote type="cite"><br></blockquote><br><br>_______________________________________________<br>mpich-discuss mailing list<br><a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-size: 12px; "><div><font class="Apple-style-span" color="#000000">--------------------------------------------------</font></div><div><font class="Apple-style-span" color="#000000">Francisco Javier García Blas</font></div><div><font class="Apple-style-span" color="#000000">Computer Architecture, Communications and Systems Area.</font></div><div><font class="Apple-style-span" color="#000000">Computer Science Department. UNIVERSIDAD CARLOS III DE MADRID</font></div><div><font class="Apple-style-span" color="#000000">Avda. de la Universidad, 30</font></div><div><font class="Apple-style-span" color="#000000">28911 Leganés (Madrid), SPAIN</font></div><div><font class="Apple-style-span" color="#000000">e-mail:&nbsp;<a href="mailto:fjblas@arcos.inf.uc3m.es">fjblas@arcos.inf.uc3m.es</a></font></div><div><font class="Apple-style-span" color="#000000">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:fjblas@inf.uc3m.es">fjblas@inf.uc3m.es</a></font></div><div><font class="Apple-style-span" color="#000000">Phone:(+34) 916249118</font></div><div><font class="Apple-style-span" color="#000000">FAX: (+34) 916249129</font></div><div><font class="Apple-style-span" color="#000000">--------------------------------------------------</font></div></span></div></div></span></span>
</div>
<br></div></body></html>