Academia.eduAcademia.edu

Outline

Formal Specification of the OpenMP Memory Model

2008, Lecture Notes in Computer Science

https://doi.org/10.1007/978-3-540-68555-5_27

Abstract

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 [1]) 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. This paper focuses on the formal verification of OpenMP programs through a proposed formal memory model that is derived from the existing prose model . Our formalization provides a two-step process to verify whether an observed OpenMP execution is conformant. 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.

References (8)

  1. OpenMP Architecture Review Board. OpenMP application program interface, version 2.5.
  2. Greg Bronevetsky and Bronis de Supinski. Fully formal specification of the OpenMP memory model. Cornell Computer Science, 2005. In Preparation.
  3. William W. Collier. Reasoning About Parallel Architectures, 1992.
  4. Scheurich C. Dubois, M. and F Briggs. Memory access buffering in multiprocessors. In In Proceedings of the 13th Annual International Symposium on Computer Architecture (ISCA), pages 434-442, 1986.
  5. J.R. Goodman. Cache consistency and sequential consistency. Technical Report 61, SCI Committee, 1989.
  6. Jay Hoeflinger and Bronis de Supinski. The openmp memory model. In International Workshop on OpenMP (IWOMP), 2005.
  7. William Pugh Jeremy Manson and Sarita V. Adve. The java memory model. In Symposium on Principles of Programming Languages (POPL 2005).
  8. John Matthews Serdar Tasiran Mark Tuttle Rajeev Joshi, Leslie Lamport and Yuan Yu. Checking cache-coherence protocols with tla+. Formal Methods in System Design, 22(2):125-131, 2003.