"Robert M. Hyatt" wrote:
> 
> zombie processes are simply child processes that have exited, yet the
> parent has not caught the SIGCHLD and done a "wait()" to get the process
> termination status.
> 
> The question is, now, why didn't the parent catch the SIGCHLD and then
> clear up things by doing a waitpid()??
Unfortunately Wang Yong did not write which mpi implementation he uses.

AFAIK any real life mpi implementation nowadays only supports
MPI-1.something (correct me, if I'm wrong). Thread safe mpi
communication is at first only available with the MPI-2 standard which
has not been completed yet. Only its I/O techniques are sometimes
available within proprietary implementations of MPI (Cray, Sun) and
perhaps mpich with ROMIO or the like.

Perhaps some more or less weird things happen if you still try to use
threads on top of MPI-1.x, at least when talking about mpich.

IIRC the LAM/MPI implementation has special extensions to the MPI
standard that allow the use of threads, although I'm not sure, if this
is really necassary.

In a special Beowulf-like cluster with SMP nodes you might think of a
benefit using threads to do the communication between the SMP-CPUs and
let TCP/IP (or other network related communication software, perhaps
SCI, Myrinet) do the work between the nodes.

BUT: This technique IS available within mpich-1.2.x and LAM/MPI and
Cray's and Sun's implementations of MPI on cc-NUMA architectures are
able to do shared memory accesses on top of MPI calls to have an
improved performance between the SMP CPU's on the same node.

So why use threads with MPI?

> > ****************************
> > pi(void *arg) {
> > ...//computing PI
> > }
> > main()
> > {
> > MPI_Init();
> > pthread_create(th1, pi, NULL, 0);
> > pthread_create(th2, pi ,NULL, 1);
> > ...
> > pthread_join(th1...);
> > pthread_join(th2...);
> > MPI_Reduce(...);
So this program only uses MPI_Reduce? Well, this is quite easy to
implement if a threaded parallelization is preferred.

I'd like to propose some literature, first: general parallel programming
[1] and then the specialities with threads [2]:

[1] Foster, Ian T.: Designing and building parallel programs : concepts
and tools for parallel software engineering. Reading, Mass,
Addison-Wesley,
(1995)

[2] Norton, S. J.: Thread time : multithreaded programming guide.
DiPasquale, Prentice Hall, (1997)

HTH,

        Frank
-- 
web: http://www.FrankMahler.de/
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/dmentre/smp-howto/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to