Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] MPI_Comm_spawn and exit of parent process.
From: Ralph Castain (rhc_at_[hidden])
Date: 2012-06-18 10:05:14

One further point that I missed in my earlier note: if you are starting the parent as a singleton, then you are fooling yourself about the "without mpirun" comment. A singleton immediately starts a local daemon to act as mpirun so that comm_spawn will work. Otherwise, there is no way to launch the child processes.

So you might as well just launch the "child" job directly with mpirun - the result is exactly the same. If you truly want the job to use all the cores, one proc per core, and don't want to tell it the number of cores, then use the OMPI devel trunk where we have added support for such patterns. All you would have to do is:

mpirun -ppr 1:core --bind-to core ./my_app

and you are done.

On Jun 18, 2012, at 4:27 AM, TERRY DONTJE wrote:

> On 6/16/2012 8:03 AM, Roland Schulz wrote:
>> Hi,
>> I would like to start a single process without mpirun and then use MPI_Comm_spawn to start up as many processes as required. I don't want the parent process to take up any resources, so I tried to disconnect the inter communicator and then finalize mpi and exit the parent. But as soon as I do that the children exit too. Why is that? Can I somehow change that behavior? Or can I wait on the children to exit without the waiting taking up CPU time?
>> The reason I don't need the parent as soon as the children are spawned, is that I need one intra-communicator over all processes. And as far as I know I cannot join the parent and children to one intra-communicator.
> You could use MPI_Intercomm_merge to create an intra-communicator out of the groups in an inter-communicator and pass the inter-communicator you get back from the MPI_Comm_spawn call.
> --td
>> The purpose of the whole exercise is that I want that my program to use all cores of a node by default when executed without mpirun.
>> I have tested this with OpenMPI 1.4.5. A sample program is here: . "Child finalized" is only printed with the sleep(2) in the parent not commented out.
>> Roland
>> --
>> ORNL/UT Center for Molecular Biophysics
>> 865-241-1537, ORNL PO BOX 2008 MS6309
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
> --
> Terry D. Dontje | Principal Software Engineer
> Developer Tools Engineering | +1.781.442.2631
> Oracle - Performance Technologies
> 95 Network Drive, Burlington, MA 01803
> Email terry.dontje_at_[hidden]
> _______________________________________________
> users mailing list
> users_at_[hidden]