skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: Formal Specification of the OpenMP Memory Model

Conference ·

OpenMP [1] 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 [1]. 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.

Research Organization:
Lawrence Livermore National Lab. (LLNL), Livermore, CA (United States)
Sponsoring Organization:
USDOE
DOE Contract Number:
W-7405-ENG-48
OSTI ID:
899396
Report Number(s):
UCRL-CONF-221452; TRN: US200708%%269
Resource Relation:
Journal Volume: 4315; Conference: Presented at: Second International Workshop on OpenMP (IWOMP 2006), Reims, France, Jun 12 - Jun 15, 2006
Country of Publication:
United States
Language:
English

References (3)

Memory access buffering in multiprocessors journal May 1986
The Java memory model conference January 2005
Checking Cache-Coherence Protocols with TLA+ journal March 2003

Similar Records

Formal Specification of the OpenMP Memory Model
Journal Article · Tue Dec 19 00:00:00 EST 2006 · International Journal of Parallel Programming · OSTI ID:899396

An Integrated Performance Visualizer for MPI/OpenMP Programs
Conference · Sun Feb 25 00:00:00 EST 2001 · OSTI ID:899396

OpenMP 4.5 Validation and Verification Suite for Device Offload
Conference · Wed Aug 01 00:00:00 EDT 2018 · OSTI ID:899396