[mpich-discuss] Communication between child node and parent node

Dave Goodell goodell at mcs.anl.gov
Wed Oct 21 16:55:12 CDT 2009


MPI_Comm_spawn is a collective operation.  So if I understand your  
question correctly, then make sure that you pass MPI_COMM_WORLD as the  
"comm" parameter to MPI_Comm_spawn.  Then the resulting  
intercommunicator that is returned by MPI_Comm_spawn on the parent and  
MPI_Comm_get_parent will connect the two MPI_COMM_WORLDs (one in the  
parent and one in the child).  You can communicate directly via the  
intercommunicator if you wish, or you could merge the  
intercommunicator into a new intracommunicator via MPI_Intercomm_merge.

For a good explanation of dynamic processes in MPI, I would recommend  
chapter 7 (Dynamic Process Management) of the "Using MPI-2" book: http://www.amazon.com/Using-MPI-2-Scientific-Engineering-Computation/dp/0262571331

The MPI-2.2 Standard itself is also a reasonable guide to the dynamic  
process functionality, although it is slightly more oriented towards  
MPI implementers: http://www.mpi-forum.org/docs/mpi-2.2/mpi22-report.pdf

-Dave

On Oct 21, 2009, at 4:35 PM, abhishek pandey wrote:

> Another question,
>
> I have two process at start, lets say A, B in COMM_WORLD  and I  
> start some child processes from A.
> Now can any child process communicate with process B of COMM_WORLD ?  
> If this is possible then please let me know the way.
>
> Thanks,
> Abhishek
>
> On Thu, Oct 22, 2009 at 3:43 AM, abhishek pandey  
> <hipandey at gmail.com> wrote:
> Thanks Dave.
>
> -Abhishek
>
>
> On Thu, Oct 22, 2009 at 12:59 AM, Dave Goodell <goodell at mcs.anl.gov>  
> wrote:
> Use MPI_Comm_get_parent to get the intercommunicator handle for  
> communicating with your parent.  See the MPI-2.2 Standard, section  
> 10.3.2, page 312.
>
> -Dave
>
>
> On Oct 21, 2009, at 5:52 AM, abhishek pandey wrote:
>
> Hi,
>
> How can a child process can communicate with its parent ? I am  
> spawning the processes from a node using MPI_Comm_spawn.
>
> Thanks,
> Abhishek
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list