Message-Id: <37457FD8.865746D3@etnus.com>
Date: Fri, 21 May 1999 16:46:33 +0100
From: James Cownie <jcownie@etnus.com>
Organization: Etnus, Inc.
Mime-Version: 1.0
Newsgroups: comp.parallel.mpi
Subject: Re: mpich-gdb and tv
References: <374324E1.5D4ABEE8@ernie.icslab.agh.edu.pl>
    <FC30y4.I56@cee.hw.ac.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Xref: ukc comp.parallel.mpi:5119


> Radoslaw Gembarowski (gebaro@ernie.icslab.agh.edu.pl) wrote:
> : I write a monitor( module of a debugger) for mpich and I intrested in a
> : control of processes of MPI aplication. If I run program (n processes)
> : with  options gdb or tv - (debug option) (mpirun -np <n> -gdb prog)
> : mpich will create 2*n processes of a parallel program. Why?
> : Why does every process  of MPI program have  a duplicate? What use a
> : duplicate processes?

This has nothing to do with the use of the -gdb or -tv options.
It is a feature of the P4 implementation which is underlying the 
MPICH. 

P4 forks a "listener" process for each actual process, in an attempt
to overcome some problems with 
1) limited number of sockets available to a process
2) being able to set up sockets to communicate with another process
   while being in a tight loop.

For the full gory details, check out the P4 code which is in the
MPICH release.

-- Jim 

James Cownie	<jcownie@etnus.com>
Etnus, Inc.     +44 117 9071438
http://www.etnus.com

