Newsgroups: comp.parallel.mpi
From: gdburns@osc.edu (Greg Burns)
Subject: Re: Ordering of MPI messages in multi-threaded programs
Organization: Ohio Supercomputer Center
Date: 20 Aug 1996 14:32:28 -0400
Message-ID: <4vd0bs$cov@tbag.osc.edu>

In article <4vctdm$c8d@murrow.corp.sgi.com> salo@mrjones.engr.sgi.com (Eric Salo) writes:
>> I cannot speak for the whole Forum, but I suspect the above example
>> could hang.  In MPI-1, the interaction with threads is undefined.
>> Thus, I think it is ok for Rank 0, thread 0 to block all other threads
>> on rank 0.  Similarly, Rank 1, thread 0 could block all others on Rank
>> 1.  This could cause the program to hang.  One would hope that a good
>> thread package would schedule another thread if one blocked but I
>> don't think MPI-1 requires this.
>
>Steve, I think you're right. I was assuming a true multithreaded MPI,
>but one simple way to get thread-safety is to just lock the entire
>library at the beginning of every MPI routine. In such an implementation,
>the example code would in fact hang.

What fun is it if separate threads of control cannot block independently
(ie. with kernel support if on one processor)?

On the other hand, multiple synchronization states per rank significantly
complicates debugging tools.

I suppose this is another reason for hesitating to add thread
safety to an implementation.  There is not general consensus on what
it means, yet.  In any design we have considered for LAM, the original
example code would definitely work.

-=-
Greg Burns				gdburns@osc.edu
Ohio Supercomputer Center		http://www.osc.edu/lam.html

