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.
UsageDocumentationHistory and Project GoalContributingReporting BugsOpenMP Implementation Status:2.5·3.0·3.1·4.0·4.5·5.0·5.1·5.2·6.0·TR 14OpenMP Releases and Status
- To enable
, useOpenMP.
-fopenmp
can be used to enable only the SIMD vectorization and loop-transformation constructs without creating multiple threads, offloading code or adding a library dependency.-fopenmp-simd
-
To enable , useOpenACC.
-fopenacc -
If either is enabled, offloading is automatically generated for all offload-device types for which the compiler has been configured. Use to disable or specify the offload-devices to be used. Use
-foffload=
to pass device-specific compiler and linker flags.-foffload-options=
Diagnostics
-
The flag provides details about optimizations at compile time.
-fopt-info -
Environment variables can be used to influence run-time behavior and output more data, useful for debugging or performance tuning. See the GNU libgompmanual for details.
GNU libgompmanual for API routines, environment variables and implementation details.OpenMP specification, including OpenMP API examples documents, reference cards and additional definitions specification.OpenACC specification.- Related GCC wiki pages: openmp,OpenACC,Offloading.
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. GOMP simplifies parallel programming for a broad variety of systems. 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 converting existing serial code to efficient parallel code.
OpenMP additionally permits to offload computations to accelerators such as GPUs, making use of their highly parallel computation support. If no accelerator is available, as fallback, the computation is done on the host.
To remain relevant, free software development tools must support emerging technologies. By implementing OpenMP, GOMP provides a simple tool for creating software targeted at parallel architectures. OpenMP's platform-neutral syntax meshes well with the portability goals of GCC and other GNU projects.
GOMP 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.
Please add openmp
or openacc
to the keywords field when filing a bug report.
Implementation status in libgomp manual: Mainline (GCC 16), GCC 15, GCC 14, 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.
-
Supported since GCC 4.2
-
Supported since GCC 4.4
-
Supported since GCC 4.7
**C/C++:Supported since GCC 4.9Fortran:**Supported since GCC 4.9.1
**C/C++:Supported since GCC 6Fortran:**Partial support since GCC 7, full support since GCC 11
| Feature | GCC Version | Comments |
|---|---|---|
in_reduction clause on task constructs | ||
depend
clausesmutexinoutset
depend
clausedepobj
construct and depend objects depend
clause on taskwait
teams
construct outside an enclosing target regionif
, nontemporal
and order(concurrent)
in simd
constructdefaultmap
extensionshint
clause on the atomic
constructatomic
and flush
constructomp_pause_resource
and omp_pause_resource_all
runtime routinesnonmonotonic
as default loop schedule modifier for worksharing-loop constructsatomic
constructs in simd
task_reduction
clause with taskgroup
task
modifier to reduction
clausereduction
and in_reduction
clauses on taskloop
and taskloop simd
constructstaskloop
construct cancelable by cancel
constructrequires
directiveatomic_default_mem_order
)(
dynamic_allocators
)complete but no non-host devices provides
unified_address
or
unified_shared_memory
complete but no non-host devices provides
unified_shared_memory
complete; see also
conditional
modifier to lastprivate
clausescan
directive and in_scan
modifier for the reduction clause
order(concurrent)
clauseloop
constructdeclare variant
directiveuse_device_addr
clause on target data
declare target
directiveallocate
clauseOMP_TARGET_OFFLOAD
env variableFortran (partial,
detach
clause to task
constructomp_fulfill_event
runtime routinedeclare target
directiveomp_get_supported_active_levels
routinein_reduction
clause on target
constructsnowait
only stubaffinity
clause to task
constructclose
omp_get_device_num
runtime routineancestor
modifier on device
clauseReverse offload supported
(full)
metadirective
directiveallocate
directivealso static variables; C++ unsupported; see also
target update
constructto
, from
and map
clausesdeclare mapper
directive| Feature | GCC Version | Comments | |---|---|---| | OpenMP directive as C++ attribute specifiers | |
nothing
directiveerror
directivemasked
constructscope
directivestrict
modifier in the grainsize
and num_tasks
clauses of the taskloop
constructalign
clause in allocate
directivealign
modifier in allocate
clausethread_limit
clause to target
constructhas_device_addr
clause to target construct
atomic
directiveseq_cst
clause on a flush
constructprivate
and firstprivate
argument to default
clause in C and C++omp_set_num_teams
, omp_set_teams_thread_limit
, omp_get_max_teams
, omp_get_teams_thread_limit
runtime routinesomp_calloc
, omp_realloc
, omp_aligned_alloc
, and omp_aligned_calloc
runtime routinesomp_alloctrait_key_t
enum: omp_atv_serialized
added, omp_atv_default
changedomp_display_env
runtime routineOMP_PLACES
syntax extensionsOMP_NUM_TEAMS
and OMP_TEAMS_THREAD_LIMIT
environment variablesunconstrained
and reproducible
modifiers on order
clauseassume
and assumes
directivesinoutset
argument to the depend
clauseomp_target_is_accessible
runtime routineomp_target_memcpy_async
and omp_target_memcpy_rect_async
runtime routinesomp_get_mapped_ptr
runtime routineomp_all_memory
reserved locatornowait
clause in taskwait
directivebegin/end declare target
syntax in C/C++target_device
selector set in context selectorsdeclare variant
directive: support elision of preprocessed code and interpret enclosed function definitions as variant functionsdeclare variant
: new clauses adjust_args
and append_args
dispatch
constructtarget update
motion clauses and map clausesinterop
directiveomp_interop_t
object support in runtime routinespresent
argument to defaultmap
clauseompt_scope_endpoint_t
enum: ompt_scope_beginend
USE
,
IMPORT
, and IMPLICIT
as invalid#pragma
formindirect
clause in declare target
device_type(nohost)
/device_type(host)
for variablespresent
modifier to the map
, to
and from
clausesdeclare target
and OpenMP contextmetadirective
declare variant
ompt_sync_region_t
enum additionsompt_state_t
enum: ompt_state_wait_barrier_implementation
and ompt_state_wait_barrier_teams
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
ompt_callback_error_t
type| Feature | GCC Version | Comments |
|---|---|---|
omp_in_explicit_task routine and implicit-task-var ICV |
|
omp
/ompx
/omx
sentinels and omp_
/ompx_
namespacesompx
/omx
sentinels end
directive can be on directivedestroy
clause with depobj
destroy
clause on depobj
linear
clause syntax changes and step
modifiermap
modifiers without commadeclare mapper
with iterator and present
modifiersenter
clause as alias for to
on declare target directiveto
clause on declare target directiveallocators
directive for Fortranallocate
directive for Fortran allocatables/pointersend
directive with dispatch
memspace
and traits
modifiers for uses_allocators
uses_allocators
otherwise
clause as alias for default
on metadirectivesdefault
clause on metadirectivesdeclare target
order(concurrent)
allocate
and firstprivate
clauses on scope
ompt_callback_work
map
clause in target enter/exit data
doacross
clause as alias for depend
with source
/sink
modifierdepend
with source
/sink
modifieromp_cur_iteration
keywordomp_initial_device
and omp_invalid_device
enum/PARAMETEROMP_TARGET_OFFLOAD=mandatory
all
as defaultmap
init
clause of the interop
constructmapper
as map-type modifier in declare mapper
(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.
| Feature | GCC Version | Comments |
|---|---|---|
| Features deprecated in versions 5.2, 5.1 and 5.0 were removed | N/A | Backward compatibility |
| Full support for C 23 was added | ||
-std=c2x
,
since GCC 14 -std=c23
)-std=c++2b
,
since GCC 14 -std=c++23
)-std=f2023
)_ALL
suffix to the device-scope environment variablesnum_threads
now accepts a listOMP_NUM_THREADS
,
OMP_THREAD_LIMIT
and OMP_TEAMS_THREAD_LIMIT
OMP_PLACES
OMP_DEFAULT_DEVICE
and new
OMP_AVAILABLE_DEVICES
environment varsuid
trait for target devices and for
OMP_AVAILABLE_DEVICES
and OMP_DEFAULT_DEVICE
OMP_THREADS_RESERVE
environment variabledecl
attribute was added to the C++ attribute syntaxdo concurrent
adjust_args
clause was extended to specify the argument by
position and supports variadic argumentsinterop
operation of append_args
,
allowing all modifiers of the init
clausedepobj
with repeatable clauses
and the init
clausedepend
clause of
the argument version of the depend
constructlooprange
clauseprivate
not supportedtaskgraph
construct including saved
modifier
and replayable
clausedefault
clause on the target directive and accepting
variable categoriesuse_device_ptr
and use_device_addr
reduction
clauseinit_complete
clause to the scan
directiveref
modifier to the map
clausestorage
map-type modifier; context-dependent
alloc
and release
are aliasesself
modifier to map
and self
as defaultmap
argumentdelete
as delete-modifier not as map typeautomap
modifier to the enter
clause of declare_target
groupprivate
directivelocal
clause to declare_target
directivepart_size
allocator trait for interleaved
allocator partitionspin_device
, preferred_device
and target_access
allocator traitsaccess
allocator trait changespartitioner
value to partition
allocator traituses_allocators
need_device_addr
modifier to adjust_args
clauseinterop
clause to dispatch
declare_target
message
and severity
clauses to
parallel
directiveself_maps
clause to requires
directiveno_openmp_constructs
assumptions clauseordered
regarding loop-transforming directivesapply
clause to loop-transforming constructsfuse
loop-transformation constructinterchange
loop-transformation constructreverse
loop-transformation constructsplit
loop-transformation constructstripe
loop-transformation constructtile
permitting association of grid and inter-tile loopsstrict
modifier keyword to num_threads
safesync
clause to the parallel
constructomp_curr_progress_width
identifieromp_get_max_progress_width
runtime routineorder(concurrent)
and, hence,
the loop
constructatomic
permitted in a construct with
order(concurrent)
order(concurrent)
workdistribute
directive for FortranDO CONCURRENT
as associated loop
in a loop
constructtask_iteration
directive inside taskloop
threadset
clause in task-generating constructspriority
clause to target
,
target_enter_data
, target_data
,
target_exit_data
and target_update
device_type
clause to the target
directivetarget_data
as composite constructnowait
clause with reverse-offload target
directivesinit
clausenowait
and nogroup
may be non constantmemscope
clause to atomic
and flush
transparent
clause for multi-generational
task-dependence graphscancel
construct now completes tasks
with unfulfilled eventsomp_fulfill_event
routine was restricted
regarding fulfillment of event variablesomp_is_free_agent
and
omp_ancestor_is_free_agent
routinesomp_get_device_from_uid
and
omp_get_uid_from_device
routinesomp_get_device_num_teams
,
omp_set_device_num_teams
,
omp_get_device_teams_thread_limit
, and
omp_set_device_teams_thread_limit
routinesomp_target_memset
and
omp_target_memset_async
routinesomp_get_memspace_num_resources
routineomp_get_memspace_pagesize
routineomp_get_submemspace
routineomp_init_mempartitioner
,
omp_destroy_mempartitioner
,
omp_init_mempartition
,
omp_destroy_mempartition
,
omp_mempartition_set_part
,
omp_mempartition_get_user_data
routinestarget_data_op
, target
,
target_map
and target_submit
callbacks
and as values that set_callback
must returnompt_target_data_transfer
and
ompt_target_data_transfer_async
values in
ompt_target_data_op_t
enumompt_target_data_transfer_to_device
,
ompt_target_data_transfer_from_device
,
ompt_target_data_transfer_to_device_async
and
ompt_target_data_transfer_from_device_async
of
the target_data_op
OMPT type were deprecatedompt_get_buffer_limits
OMPT routine| Feature | GCC Version | Comments |
|---|---|---|
| Deprecation of omitting the optional white space to separate adjacent keywords in the directive-name in Fortran (fixed and free source form) | No | |
Deprecation of the combiner expression in the
declare_reduction argument |
No | |
Deprecation of the Fortran include file omp_lib.h |
No |
| Feature | GCC Version | Comments |
|---|---|---|
| Multi-word directives now use underscore by default | No | |
Relaxed Fortran restrictions to the aligned clause | ||
| No | ||
| Mapping lambda captures | No | |
New omp_pause_stop_tool constant for | ||
omp_pause_resource | ||
| No | ||
| In Fortran (fixed and free source form), spaces between directive names are mandatory | No | |
| Update of the map-type decay for mapping and | ||
declare_mapper | ||
| No |
Technical Report (TR) 14 is the first preview for OpenMP 6.1.
| Feature | GCC Version | Comments |
|---|---|---|
The depth clause to fuse directive | ||
| No | ||
The attach modifier to the map clause | ||
| No | ||
The dyn_groupprivate clause and the | ||
omp_get_dyn_groupprivate_ptr , omp_get_dyn_groupprivate_size , | ||
and omp_get_dyn_groupprivate_size routines | ||
| No | ||
begin declare_variant directive in Fortran | ||
| No | ||
grid and tile modifier to the size clause | ||
| No | ||
New flatten loop-transforming directive | ||
| No | ||
scaled modifier to simdlen clause | ||
| No | ||
New omp_default_device identifier as conforming device number | ||
omp_target_is_accessible
routine returns zero| Feature | GCC Version | Comments | |---|---|---| | Deprecation of conditional-update-capture structured block without a capture statement | No |
November 13, 2025OpenMP Technical Report 14 (first preview for the OpenMP API Version 6.1) has been released [
PDF,specifications site].November 14, 2024OpenMP Version 6.0has been released.August 1, 2024OpenMP Technical Report 13 (third preview for the OpenMP API Version 6.0)has been released.November 9, 2023OpenMP Technical Report 12 (second preview for the OpenMP API Version 6.0)has been released.November 9, 2022OpenMP Technical Report 11 (first preview for the OpenMP API Version 6.0)has been released.November 9, 2021OpenMP Version 5.2has been released.July 15, 2021OpenMP Technical Report 10: Version 5.2 Public Comment Drafthas been released.November 13, 2020OpenMP Version 5.1has been released.August 20, 2020OpenMP Technical Report 9: Version 5.1 Public Comment Drafthas been released.May 7, 2020GCC 10 has been released. It adds a number of newly implemented OpenMP 5.0 features on top of the GCC 9 release such asconditional
lastprivate
clause,scan
andloop
directives,order(concurrent)
anduse_device_addr
clauses support,if
clause onsimd
construct or partial support for thedeclare variant
directive, getting closer to full support of the OpenMP 5.0 standard.May 3, 2019GCC 9 has been releasedand 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 seethis mail.November 8, 2018The
OpenMP v5.0specification has been released.May 2, 2017GCC 7 has been releasedand 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, 2016GCC 6 has been releasedand version 4.5 of the OpenMP specification is now supported in the C and C++ compilers.November 14, 2015The final
OpenMP v4.5specification has been released.October 13, 2015The
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, 2014Fortran 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, 2014The last major part of Fortran OpenMP v4.0 support has been committed into mainline.
October 11, 2013The
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, 2013The final OpenMP v4.0 specification has been released.
August 2, 2011The
gomp-3_1-branch
has been merged into mainline, so GCC 4.7 and later will feature OpenMP v3.1 support.July 9, 2011The final OpenMP v3.1 specification has been released.
February 6, 2011A 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, 2008The
gomp-3_0-branch
has been merged into mainline, so GCC 4.4 and later will feature OpenMP v3.0 support.May 12, 2008The final OpenMP v3.0 specification has been released.
October 22, 2007Draft 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, 2006The branch has been merged into mainline, so starting with GCC 4.2 the compiler supports the OpenMP v2.5 specification.
November 18, 2005The 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, 2005The 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.
For questions related to the use of GCC, please consult these web pages and the GCC manuals. If that fails, the gcc-help@gcc.gnu.org mailing list might help. Comments on these web pages and the development of GCC are welcome on our developer list at gcc@gcc.gnu.org. All of our lists have public archives.
Copyright (C) Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
These pages are maintained by the GCC team. Last modified 2026-01-20.