On Mar 16, 2010, at 5:12 AM, abc def wrote:

> 1. Since Spawn is non-blocking, but I need the parent to wait until the child 
> completes, I am thinking there must be a way to pass a variable from the 
> child to the parent just prior to the FINALIZE command in the child, to 
> signal that the parent can pick up the output files from the child. Am I 
> right in assuming that the message from the child to the parent will go to 
> the correct parent process? The value of "parent" in "CALL 
> MPI_COMM_GET_PARENT(parent, ierr)" is the same in all spawned processes, 
> which is why I ask this question.

Yes, you can MPI_SEND (etc.) between the parents and children, just like you 
would expect.  Just be aware that the communicator between the parents and 
children is an *inter*communicator -- so you need to express the 
source/destination in terms of the "other" group.  Check out the MPI spec for a 
description of intercommunicators.

> 2. By launching the parent with the "--mca mpi_yield_when_idle 1" option, the 
> child should be able to take CPU power from any blocked parent process, thus 
> avoiding the busy-poll problem mentioned below.

Somewhat.  Note that the parents aren't blocked -- they *are* busy polling, but 
they call yield() in every pool loop.  

> If each host has 4 processors and I'm running on 2 hosts (ie, 8 processors in 
> total), then I also assume that the spawned child will launch on the same 
> host as the associated parent?

If you have told Open MPI about 8 process slots and are using all of them, then 
spawned processes will start overlaying the original process slots -- 
effectively in the same order.

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to