[MPICH] Deadlock with multiple threads

David Minor david-m at orbotech.com
Sun Dec 11 01:12:57 CST 2005


Here is a test program I wrote to demonstrate this.
I tested it under Linux Redhat 9, with the g++ 3.4.3 compiler
on 3 dual xeon nodes.
and LD_ASSUME_KERNEL=2.4.1 (use classic less buggy thread library)

runmpi -n 2 Pthread  //works
runmpi -n 3 Pthread  //deadlocks

If I can hazard a guess, I suggest the spinlock in Recv is blocking the broadcast.

David



-----Original Message-----
From: Rusty Lusk [mailto:lusk at mcs.anl.gov]
Sent: Thu 08-12-2005 6:18 PM
To: David Minor
Cc: mpich-discuss at mcs.anl.gov
Subject: Re: [MPICH] Deadlock with multiple threads
 
Can you post the code?  It sounds like a good test program.

From: "David Minor" <david-m at orbotech.com>
Subject: [MPICH] Deadlock with multiple threads
Date: Thu, 8 Dec 2005 17:02:56 +0200

> Hi Mpiers,
> 
> The following situtation leads me to deadlock, why?
> 
> I have three nodes and two threads on each node. 
> There are two communicators, on each node thread 1 (t1) is using communicator 1 (c1)
> and thread 2 is using communicator 2.
> 
> c1 is involved in a bcast on all three nodes on t1
> c2 on all t2's is in a recv from any source, for which a send has not yet been issued.
> 
> Why does the bcast on c1 deadlock?  This seems to violate one of the rules for multi-threaded MPI.
> 
> When I run the above scenario on 2 nodes there is no deadlock.
> 
> Regards,
> David


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20051211/5412b6b4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PThread.cpp
Type: text/x-cpp
Size: 1772 bytes
Desc: PThread.cpp
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20051211/5412b6b4/attachment.bin>


More information about the mpich-discuss mailing list