layout | title | release_number | author | tutorial |
---|---|---|---|---|
tutorial_page |
Introduction |
UCRL-MI-133316 |
Blaise Barney, Lawrence Livermore National Laboratory |
OpenMP |
- An Application Program Interface (API) that may be used to explicitly direct multi-threaded, shared memory parallelism
- Comprised of three primary API components:
- Compiler Directives
- Runtime Library Routines
- Environment Variables
- An abbreviation for:
- Short version: Open Multi-Processing
- Long version: Open specifications for Multi-Processing via collaborative work between interested parties from the hardware and software industry, government and academia.
- Necessarily implemented identically by all vendors
- Guaranteed to make the most efficient use of shared memory
- Required to check for data dependencies, data conflicts, race conditions, or deadlocks
- Required to check for code sequences that cause a program to be classified as non-conforming
- Designed to guarantee that input or output to the same file is synchronous when executed in parallel. The programmer is responsible for synchronizing input and output.
- Standardization:
- Provide a standard among a variety of shared memory architectures/platforms
- Jointly defined and endorsed by a group of major computer hardware and software vendors
- Lean and Mean:
- Establish a simple and limited set of directives for programming shared memory machines.
- Significant parallelism can be implemented by using just 3 or 4 directives.
- This goal is becoming less meaningful with each new release, apparently.
- Ease of Use:
- Provide capability to incrementally parallelize a serial program, unlike message-passing libraries which typically require an all or nothing approach
- Provide the capability to implement both coarse-grain and fine-grain parallelism
- Portability:
- The API is specified for C/C++ and Fortran
- Public forum for API and membership
- Most major platforms have been implemented including Unix/Linux platforms and Windows
In the early 90's, vendors of shared-memory machines supplied similar, directive-based, Fortran programming extensions: * The user would augment a serial Fortran program with directives specifying which loops were to be parallelized * The compiler would be responsible for automatically parallelizing such loops across the SMP processors
Implementations were all functionally similar, but were diverging (as usual)
First attempt at a standard was the draft for ANSI X3H5 in 1994. It was never adopted, largely due to waning interest as distributed memory machines became popular.
However, not long after this, newer shared memory machine architectures started to become prevalent, and interest resumed.
The OpenMP standard specification started in the spring of 1997, taking over where ANSI X3H5 had left off.
Led by the OpenMP Architecture Review Board (ARB). Original ARB members and contributors are shown below. (Disclaimer: all partner names derived from the OpenMP web site)
<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;} .tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px; overflow:hidden;padding:10px 5px;word-break:normal;} .tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px; font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;} .tg .tg-5iie{background-color:#98ABCE;border-color:inherit;font-weight:bold;text-align:center;vertical-align:top} .tg .tg-0pky{border-color:inherit;text-align:left;vertical-align:top} </style>APR Members | Endorsing Application Developers | Endorsing Software Vendors |
---|---|---|
Compaq / Digital Hewlett-Packard Company Intel Corporation International Business Machines (IBM) Kuck & Associates, Inc. (KAI) Silicon Graphics, Inc. Sun Microsystems, Inc. U.S. Department of Energy ASCI program |
ADINA R&D, Inc. ANSYS, Inc. Dash Associates Fluent, Inc. ILOG CPLEX Division Livermore Software Technology Corporation (LSTC) MECALOG SARL Oxford Molecular Group PLC The Numerical Algorithms Group Ltd.(NAG) |
Absoft Corporation Edinburgh Portable Compilers GENIAS Software GmBH Myrias Computer Technologies, Inc. The Portland Group, Inc. (PGI) |
For more news and membership information about the OpenMP ARB, visit: openmp.org/wp/about-openmp.
OpenMP continues to evolve, with new constructs and features being added over time.
Initially, the API specifications were released separately for C and Fortran. Since 2005, they have been released together.
The table below chronicles the OpenMP API release history:
<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;} .tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px; overflow:hidden;padding:10px 5px;word-break:normal;} .tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px; font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;} .tg .tg-xq0d{background-color:#98ABCE;font-weight:bold;text-align:center;vertical-align:top} .tg .tg-0lax{text-align:left;vertical-align:top} </style>Month/Year | Version |
---|---|
Oct 1997 | Fortran 1.0 |
Oct 1998 | C/C++ 1.0 |
Nov 1999 | Fortran 1.1 |
Nov 2000 | Fortran 2.0 |
Mar 2002 | C/C++ 2.0 |
May 2005 | OpenMP 2.5 |
May 2008 | OpenMP 3.0 |
Jul 2011 | OpenMP 3.1 |
Jul 2013 | OpenMP 4.0 |
Nov 2018 | OpenMP 5.0 |
Nov 2020 | OpenMP 5.1 |
Nov 2021 | OpenMP 5.2 |
Note: The remainder of this tutorial, unless otherwise indicated, refers to OpenMP version 3.1. Syntax and features new with OpenMP 4.x and OpenMP 5.x are not currently covered.
- OpenMP website: openmp.org API specifications, FAQ, presentations, discussions, media releases, calendar, membership application and more...
- Wikipedia: en.wikipedia.org/wiki/OpenMP