Complete Formal Specification of the OpenMP Memory Model (original) (raw)

OpenMP [OpenMP Architecture Review Board. OpenMP application program interface, version 2.5] is an important API for shared memory programming, combining shared memory’s potential for performance with a simple programming interface. Unfortunately, OpenMP lacks a critical tool for demonstrating whether programs are correct: a formal memory model. Instead, the current official definition of the OpenMP memory model (the OpenMP 2.5 specification [OpenMP Architecture Review Board. OpenMP application program interface, version 2.5]) is in terms of informal prose. As a result, it is impossible to verify OpenMP applications formally since the prose does not provide a formal consistency model that precisely describes how reads and writes on different threads interact. We expand on our previous work that focused on the formal verification of OpenMP programs through a formal memory model [Greg Bronevetsky and Bronis de Supinski. Formal specification of the memory model. In International Workshop on OpenMP (IWOMP), (2006)]. As in that work, our formalization, which is derived from the existing prose model [OpenMP Architecture Review Board. OpenMP application program interface, version 2.5], provides a two-step process to verify whether an observed OpenMP execution is conformant. This paper extends the model to cover the entire specification. In addition to this formalization, our contributions include a discussion of ambiguities in the current prose-based memory model description. Although our formal model may not capture the current informal memory model perfectly, in part due to these ambiguities, our model reflects our understanding of the informal model’s intent. We conclude with several examples that may indicate areas of the OpenMP memory model that need further refinement, however it is specified. Our goal is to motivate the OpenMP community to adopt those refinements eventually, ideally through a formal model, in later OpenMP specifications.

Access this article

Log in via an institution

Subscribe and save

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. OpenMP Architecture Review Board, OpenMP Application Program Interface, version 2.5.
  2. A. Robinson and A. Voronkov (Eds.), Handbook of Automated Reasoning, Elsevier Science and the MIT Press, Amsterdam, The Netherlands (2000).
  3. Joshi R., Lamport L., Matthews J., Tasiran S., Tuttle M., Yu Y. (2003) Checking Cache-coherence Protocols with TLA+. Formal Methods Syst. Des. 22(2):125–131
    MATH Google Scholar
  4. J. Manson, W. Pugh, and S. V. Adve, The Java Memory Model, in Proceedings of the Symposium on Principles of Programming Laguages (POPL 2005), Long Beach, California, USA.
  5. W. W. Collier, Reasoning About Parallel Architectures, Prentice Hall, Englewood Cliffs, New Jersey, USA.
  6. J. P. Hoeflinger and B. R. de Supinski, The OpenMP Memory Model, First International Workshop on OpenMP (IWOMP 2005), Eugene, OR, June 1–4, 2005. (UCRL-CONF-212641*).
  7. G. Bronevetsky and B. R. de Supinski, Formal Specification of the OpenMP Memory Model, Second International Workshop on OpenMP (IWOMP 2006), Reims, France, June 12–15, 2006. (UCRL-CONF-221452*).
  8. M. Dubois, C. Scheurich, and F. Briggs, Memory Access Buffering in Multiprocessors, in Proceedings of the 13th Annual International Symposium on Computer Architecture (ISCA), Tokyo, Japan, pp. 434–442 (1986).
  9. J. R. Goodman, Cache Consistency and Sequential Consistency, Technical Report 61, SCI Committee (1989).
  10. L. Lamport, Fairness and Hyperfairness, Technical Report 152 (1998).

Download references

Author information

Authors and Affiliations

  1. Center for Applied Scientific Computing, Lawrence Livermore National Laboratory, Livermore, CA, 94551, USA
    Greg Bronevetsky & Bronis R. de Supinski

Authors

  1. Greg Bronevetsky
  2. Bronis R. de Supinski

Corresponding author

Correspondence toGreg Bronevetsky.

Rights and permissions

About this article

Cite this article

Bronevetsky, G., de Supinski, B.R. Complete Formal Specification of the OpenMP Memory Model.Int J Parallel Prog 35, 335–392 (2007). https://doi.org/10.1007/s10766-007-0051-4

Download citation

Keywords