GNU Offloading and Multi-Processing Project (GOMP)

The GOMP project consists of implementation of OpenMP and OpenACC to permit annotating the source code to permit running it concurrently with thread parallelization and on offloading devices (accelerators such as GPUs), including the associated run-time library and API routines. Both OpenMP and OpenACC are supported with GCC's C, C++ and Fortran compilers.





History and Project Goal

The GOMP project has developed an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection and is further improving it. As part of the GNU Project, GOMP simplifies parallel programming for all GNU system variants. This effort operates in an open environment to attract developers and ensure applicability across multiple architectures and applications.

Traditionally, programmers have used architecture-specific methods to effectively program tightly-parallelized computers — high band-width clusters, SMP machines, or multi-core processors. Parallel programming has thus been a time-consuming and arcane task.

OpenMP offers a simple way of exploiting parallelism without interfering with algorithm design; an OpenMP program compiles and operates correctly in both parallel and serial execution environments. Using OpenMP's directive-based parallelism also simplifies the act of converting existing serial code to efficient parallel code.

OpenMP additionally permits to offload computations on accelerators such as GPUs, making use of their highly parallel computation support; if no accelerator is available, as fallback, the computation is then done on the host.

To remain relevant, free software development tools must support emerging technologies. By implementing OpenMP, GOMP provides a simplified syntax tools for creating software targeted at parallel architectures. OpenMP's platform-neutral syntax meshes well with the portability goals of GCC and other GNU projects.

The GOMP release includes a support library, libgomp, and extensions to target language parsers. A long-term goal is the generation of efficient and small code for OpenMP applications.

When support for OpenACC was added, the project name GOMP was reinterpreted as GNU Offloading and Multi-Processing instead of denoting GNU OpenMP.


We encourage everyone to contribute changes and help test GOMP. GOMP has been merged into mainline GCC.

Reporting Bugs

Please add openmp or openacc to the keywords field when filing a bug report.

OpenMP Implementation Status

Implementation status in libgomp manual: Mainline (GCC 13), GCC 12.

Disclaimer: A feature might be only fully supported in a later GCC version than listed, depending on resolved corner cases and optimizations.

OpenMP 2.5

OpenMP 3.0

OpenMP 3.1

OpenMP 4.0

OpenMP 4.5

OpenMP 5.0

Feature GCC Version Comments
in_reduction clause on task constructs GCC 9
Supporting C++'s range-based for loop GCC 9
Iterators GCC 9
!= as relational-op in canonical loop form for C/C++ GCC 9
C/C++'s lvalue expressions in depend clauses GCC 9
mutexinoutset dependence-type for depend clause GCC 9
depobj construct and depend objects GCC 9
depend clause on taskwait GCC 9
teams construct outside an enclosing target region GCC 9
Clauses if, nontemporal and order(concurrent) in simd construct GCC 9/GCC 10
defaultmap extensions GCC 9
hint clause on the atomic construct GCC 9 Stub only
Weak memory ordering clauses on atomic and flush construct GCC 9
Combined master constructs GCC 9
Runtime routines and environment variables to display runtimethread affinity information GCC 9
omp_pause_resource and omp_pause_resource_all runtime routines GCC 9
nonmonotonic as default loop schedule modifier for worksharing-loop constructs GCC 9
atomic constructs in simd GCC 9
task_reduction clause with taskgroup GCC 9
task modifier to reduction clause GCC 9
reduction and in_reduction clauses on taskloop and taskloop simd constructs GCC 9
taskloop construct cancelable by cancel construct GCC 9
Lock hints were renamed to synchronization hints GCC 9
requires directive GCC 9
GCC 12
GCC 13
complete but no non-host devices provides unified_address, unified_shared_memory or reverse_offload
conditional modifier to lastprivate clause GCC 10
scan directive and in_scan modifier for the reduction clause GCC 10
order(concurrent) clause GCC 10
loop construct GCC 10
declare variant directive GCC 10/GCC 11 simd traits not handled correctly
use_device_addr clause on target data GCC 10
Nested declare target directive GCC 10
allocate clause GCC 11 Initial support
target-offload-var ICV and OMP_TARGET_OFFLOAD env variable GCC 11
Predefined memory spaces, memory allocators, allocator traits GCC 11 Some are only stubs
Non-rectangular loop nests GCC 11
GCC 13
Nested-parallel changes to max-active-levels-var ICV GCC 11
detach clause to task construct GCC 11
omp_fulfill_event runtime routine GCC 11
Memory management routines GCC 11
Implicit declare target directive GCC 11
omp_get_supported_active_levels routine GCC 11
in_reduction clause on target constructs GCC 12 nowait only stub
affinity clause to task construct GCC 12 Stub only
close map-type-modifier GCC 12
omp_get_device_num runtime routine GCC 12
ancestor modifier on device clause GCC 12
GCC 13
Reverse offload unsupported
See comment for requires
Mapping C/C++ pointer variables and to assign the address of device memory mapped by an array section GCC 12
Mapping of Fortran pointer and allocatable variables, including pointer and allocatable components of variables GCC 12 Mapping of vars with allocatable components unsupported
Map-order clarifications ? To be verified
Array shaping No
Array sections with non-unit strides in C and C++ No
metadirective directive No
Collapse of associated loops that are imperfectly nested loops No
allocate directive No
Discontiguous array section with target update construct No
C/C++'s lvalue expressions in to, from and map clauses No
declare mapper directive No
OMPT interface No
OMPD interface No

OpenMP 5.1

Feature GCC Version Comments
OpenMP directive as C++ attribute specifiers GCC 12
nothing directive GCC 12
error directive GCC 12
masked construct GCC 12
scope directive GCC 12
strict modifier in the grainsize and num_tasks clauses of the taskloop construct GCC 12
align clause/modifier in allocate directive/clause and allocator directive GCC 12 C/C++ on clause only
thread_limit clause to target construct GCC 12
has_device_addr clause to target construct GCC 12
Extensions to the atomic directive GCC 12
seq_cst clause on a flush construct GCC 12
private and firstprivate argument to default clause in C and C++ GCC 12
omp_set_num_teams, omp_set_teams_thread_limit, omp_get_max_teams, omp_get_teams_thread_limit runtime routines GCC 12
omp_calloc, omp_realloc, omp_aligned_alloc, and omp_aligned_calloc runtime routines GCC 12
omp_alloctrait_key_t enum: omp_atv_serialized added, omp_atv_default changed GCC 12
omp_display_env runtime routine GCC 12
OMP_PLACES syntax extensions GCC 12
Support of strictly structured blocks in Fortran GCC 12
Support of structured block sequences in C/C++ GCC 12
unconstrained and reproducible modifiers on order clause GCC 12
inoutset argument to the depend clause GCC 13
omp_target_is_accessible runtime routine GCC 13
omp_target_memcpy_async and omp_target_memcpy_rect_async runtime routines GCC 13
omp_get_mapped_ptr runtime routine GCC 13
omp_all_memory reserved locator GCC 13
nowait clause in taskwait directive GCC 13
target_device trait in OpenMP Context No
target_device selector set in context selectors No
C/C++'s declare variant directive: elision support of preprocessed code No
declare variant: new clauses adjust_args and append_args No
dispatch construct No
device-specific ICV settings with environment variables GCC 13
assume directive No
Loop transformation constructs No
iterators in target update motion clauses and map clauses No
indirect calls to the device version of a procedure or function in target regions No
interop directive No
omp_interop_t object support in runtime routines No
present argument to defaultmap clause No
ompt_scope_endpoint_t enum: ompt_scope_beginend No
Pointer predetermined firstprivate getting initialized to address of matching mapped list item per 5.1, Sect. No
ompt_sync_region_t enum additions No
ompt_state_t enum: ompt_state_wait_barrier_implementation and ompt_state_wait_barrier_teams No
ompt_callback_target_data_op_emi_t, ompt_callback_target_emi_t, ompt_callback_target_map_emi_t and ompt_callback_target_submit_emi_t No
ompt_callback_error_t type No
Support begin/end declare target syntax in C/C++ No

OpenMP 5.2

Feature GCC Version Comments
omp_in_explicit_task routine and implicit-task-var ICV No
omp/ompx/omx sentinels and omp_/ompx_ namespaces N/A warning for ompx/omx sentinels (1)
Clauses on end directive can be on directive No
Deprecation of no-argument destroy clause on depobj No
linear clause syntax changes and step modifier No
Deprecation of minus operator for reductions No
Deprecation of separating map modifiers without comma No
declare mapper with iterator and present modifiers No
If a matching mapped list item is not found in the data environment, the pointer retains its original value No
New enter clause as alias for to on declare target directive GCC 13
Deprecation of to clause on declare target directive No
Extended list of directives permitted in Fortran pure procedures No
New allocators directive for Fortran No
Deprecation of allocator directive for Fortran allocatables/pointers No
Optional paired end directive with dispatch No
New memspace and traits modifiers for uses_allocators No
Deprecation of traits array following the allocator_handle expression in uses_allocators No
New otherwise clause as alias for default on metadirectives No
Deprecation of default clause on metadirectives No
Deprecation of delimited form of declare target No
Reproducible semantics changed for order(concurrent) No
allocate and firstprivate clauses on scope GCC 13
ompt_callback_work No
Default map-type for map clause in target enter/exit data GCC 13
New doacross clause as alias for depend with source/sink modifier GCC 13
Deprecation of depend with source/sink modifier No
omp_cur_iteration keyword GCC 13
For Fortran, optional comma between directive and clause No
Conforming device numbers and omp_initial_device and omp_invalid_device enum/PARAMETER GCC 13
Initial value of default-device-var ICV with OMP_TARGET_OFFLOAD=mandatory No
interop_types in any position of the modifier list for the init clause of the interop construct No

(1) The ompx sentinel as C/C++ pragma and C++ attributes are warned for with -Wunknown-pragmas (implied by -Wall) and -Wattributes (enabled by default), respectively; for Fortran free-source code, there is a warning enabled by default and, for fixed-source code, the omx sentinel is warned for with -Wsurprising (enabled by -Wall). Unknown clauses are always rejected with an error.

OpenMP Releases and Status

November 9, 2022

OpenMP Technical Report 11 (first preview for the OpenMP API Version 6.0) has been released.

November 9, 2021

OpenMP Version 5.2 has been released.

July 15, 2021

OpenMP Technical Report 10: Version 5.2 Public Comment Draft has been released.

November 13, 2020

OpenMP Version 5.1 has been released.

August 20, 2020

OpenMP Technical Report 9: Version 5.1 Public Comment Draft has been released.

May 7, 2020

GCC 10 has been released; it adds a number of newly implemented OpenMP 5.0 features on top of the GCC 9 release such as conditional lastprivate clause, scan and loop directives, order(concurrent) and use_device_addr clauses support, if clause on simd construct or partial support for the declare variant directive, getting closer to full support of the OpenMP 5.0 standard.

May 3, 2019

GCC 9 has been released and version 5.0 of the OpenMP specification is now partially supported in the C and C++ compilers. For details which features of OpenMP 5.0 are and which are not supported in the GCC 9 release see this mail.

November 8, 2018

The OpenMP v5.0 specification has been released.

May 2, 2017

GCC 7 has been released and version 4.5 of the OpenMP specification is now partially supported in the Fortran compiler; the largest missing item is structure element mapping.

April 27, 2016

GCC 6 has been released and version 4.5 of the OpenMP specification is now supported in the C and C++ compilers

November 14, 2015

The final OpenMP v4.5 specification has been released.

October 13, 2015

The gomp-4_1-branch has been merged into mainline, so GCC 6 and later will feature OpenMP v4.5 support for C and C++.

June 30, 2014

Fortran OpenMP v4.0 support has been backported to gcc-4_9-branch and will be available in the upcoming GCC 4.9.1 release.

June 18, 2014

The last major part of Fortran OpenMP v4.0 support has been committed into mainline.

October 11, 2013

The gomp-4_0-branch has been merged into mainline, so GCC 4.9 and later will feature OpenMP v4.0 support for C and C++.

July 23, 2013

The final OpenMP v4.0 specification has been released.

August 2, 2011

The gomp-3_1-branch has been merged into mainline, so GCC 4.7 and later will feature OpenMP v3.1 support.

July 9, 2011

The final OpenMP v3.1 specification has been released.

February 6, 2011

A draft of the OpenMP v3.1 specification has been released for public review. The gomp-3_1-branch branch has been created and work began on implementing v3.1 support.

June 6, 2008

The gomp-3_0-branch has been merged into mainline, so GCC 4.4 and later will feature OpenMP v3.0 support.

May 12, 2008

The final OpenMP v3.0 specification has been released.

October 22, 2007

Draft of the OpenMP v3.0 specification has been released for public review, the gomp-3_0-branch branch has been created and work began on implementing v3.0 support.

March 9, 2006

The branch has been merged into mainline, so starting with GCC 4.2 the compiler supports the OpenMP v2.5 specification.

November 18, 2005

The branch is ready to be merged into mainline. All three front ends are functional and there should not be many corners of the standard left to implement. There are 5 main modules to merge into mainline: (1) runtime library, (2) code generation, (3) C front end, (4) C++ front end, and, (5) Fortran front end.

October 20, 2005

The runtime library is functionally complete. The syntax parsers for C, C++ and Fortran are complete, though there are still dusty corners with respect to semantic translation to be resolved. Adventurous users who don't mind the compiler crashing on every other source file are encouraged to begin filing bugs.