[MPICH] Forking exisiting mpi processes

James S Perrin james.s.perrin at manchester.ac.uk
Wed Sep 20 08:55:14 CDT 2006


Hi,

	In our particular case the parent is only used to fork a child process on 
demand, it doesn't need to make any MPI calls itself and so the forked child 
process "can" assume it's identity. We've needed to use forking because a 3rd 
party API we are using doesn't support stopping and restarting - when it stops 
it exits! These processes weren't previously using MPI but the next version of 
the software requires MPI communication with them.

Regards
James

Rusty Lusk wrote:

> This is likely to be a bad idea.  Just for starters, you will now  have 
> two different MPI processes with the same rank.  What does your  
> application logic think about this?
> 
> Regards,
> Rusty Lusk
> 
> On Sep 20, 2006, at 1:27 PM, James S Perrin wrote:
> 
>> Hi,
>>     I'm looking for some details of what can and can't be done if a  
>> running mpi process forks.
>>
>>     From a simple test program it seems, at least with MPICH, that 
>> the  child process inherits the mpi environment and credentials of 
>> the  parent and can make MPI calls as if it were the parent process. 
>> The  child process should simply exit on completion and only the 
>> parent  process should call MPI_Finalize. Child to child communication 
>> is  best done using a dedicated MPI_Comm, the same as working with  
>> threads. However is thread support actaully required? Should  
>> MPI_thread_init be called?
>>
>> Regards
>> James
>> -- 
>> ---------------------------------------------------------------------- 
>> -------
>> James S. Perrin,                   | email:  
>> james.perrin at manchester.ac.uk
>> Manchester Visualization Centre,   | www.sve.man.ac.uk/General/ 
>> Staff/perrin
>> Kilburn Building, The University,  | tel: +44 161 275 6945
>> Manchester, England. M13 9PL.      | fax: +44 161 275 6800/6040
>> ---------------------------------------------------------------------- 
>> -------
>> "The test of intellect is the refusal to belabour the obvious" - 
>> Alfred Bester
>> ---------------------------------------------------------------------- 
>> -------
>>
> 


-- 
-----------------------------------------------------------------------------
James S. Perrin,                   | email: james.perrin at manchester.ac.uk
Manchester Visualization Centre,   | www.sve.man.ac.uk/General/Staff/perrin
Kilburn Building, The University,  | tel: +44 161 275 6945
Manchester, England. M13 9PL.      | fax: +44 161 275 6800/6040
-----------------------------------------------------------------------------
"The test of intellect is the refusal to belabour the obvious" -Alfred Bester
-----------------------------------------------------------------------------




More information about the mpich-discuss mailing list