<div dir="ltr">Hi Michael,<div><br></div><div style>This believe that this can deadlock. I agree that it's unfortunate that we didn't call it out in the spec, given that it would help to clarify the intended semantics.</div>
<div style><br></div><div style> ~Jim.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 17, 2013 at 11:41 AM, Michael Raymond <span dir="ltr"><<a href="mailto:mraymond@sgi.com" target="_blank">mraymond@sgi.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> I've got a question about the use of MPI_Win_lock_all() in the face of competing MPI_Win_lock(EXCLUSIVE) calls. Consider the following calls sequence:<br>
<br>
<br>
0 1<br>
MPI_Win_lock(EXCLUSIVE, 0)<br>
<br>
MPI_Win_lock(EXCLUSIVE, 1) MPI_Win_lock_all()<br>
<br>
.... ....<br>
MPI_Win_unlock(1) MPI_Win_unlock_all()<br>
MPI_Win_unlock(0)<br>
<br>
In this situation 0 has an exclusive lock on itself. Simultaneously, 0 tries to get 1 exclusively and 1 tries to get a shared lock on everyone. If 0 gets lucky, it will get to go first and everything will go fine. If OTOH 1 locks itself shared and then tries to lock 0 shared, deadlock ensues. You could argue that there should be some global queue / governor that lets 0 go first, but then I could see running into scalability problems.<br>
<br>
I can't find any place in the standard that says if the user shouldn't do this, or if deadlock is allowed, or if the MPI implementation should figure things out on its own. Thoughts?<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Michael A. Raymond<br>
SGI MPT Team Leader<br>
(651) 683-3434<br>
<br>
______________________________<u></u>_________________<br>
mpi-forum mailing list<br>
<a href="mailto:mpi-forum@lists.mpi-forum.org" target="_blank">mpi-forum@lists.mpi-forum.org</a><br>
<a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum" target="_blank">http://lists.mpi-forum.org/<u></u>mailman/listinfo.cgi/mpi-forum</a><br>
</font></span></blockquote></div><br></div>