[Mpi3-rma] [EXTERNAL] Re: RMA Example 11.10

Barrett, Brian W bwbarre at sandia.gov
Wed Jun 12 09:36:45 CDT 2013

On 6/12/13 7:36 AM, "Marc-Andre Hermanns" <m.a.hermanns at grs-sim.de<mailto:m.a.hermanns at grs-sim.de>> wrote:

My point here is not that this specific code snippet will deadlock. My
point is more whether overlapping locks with barriers, is a good example
of software engineering and we would like to have people to copy-paste
this style. The focus of the example is on the 'store X' not the
lock/barrier overlap, so the overlap might still be seen as a 'good
thing to do'. Thinking of the philosophers again, I am not so convinced
that this is so.

I both agree and disagree with you.  In general, I agree that mixing one-sided and collective synchronization is a horrible programming practice almost certain to lead to deadlock.  However, it's very difficult to discuss many of the synchronization rules of MPI one-sided without some outside synchronization object (like MPI_BARRIER) in any formal way.  The examples in Section 11.7 are less about the best way to program one-sided (that's what Section 11.8 is for) and more about clarifying very explicit semantic rules in the chapter, so we had to take some liberties with good coding practice in order to raise very specific issues.  Further, the example is explicitly an example of what not to do (in that it may, with separate, deadlock).

We should probably add a note to that effect around line 43 of page 457 (the start of the semantic examples), but unless you have a better thought on how to raise these issues, I think the text is correct.


  Brian W. Barrett
  Scalable System Software Group
  Sandia National Laboratories
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-rma/attachments/20130612/31254969/attachment-0001.html>

More information about the mpiwg-rma mailing list