Introduction

The OpenMP® ARB released the OpenMP 6.0 API specification in Nov 2024, and the first implementations of OpenMP 6.0 features are now available in Intel® and GCC compilers. In this blog post we briefly describe the first features that have been implemented in these compilers.

The OpenMP API consists of a collection of compiler directives, library routines, environment variables, and tool support. This provides a parallel programming model that is portable across architectures from different vendors, allowing code to be moved easily between their different hardware environments. Previously, the OpenMP ARB released Technical Reports 11, 12 and 13, which were previews of the OpenMP 6.0 API. The final OpenMP 6.0 API specification was released at SC24 on Nov 14, 2024.

GCC implementation

The GCC 14 release, available for download, includes the OpenMP 6.0 features described below. Since the compiler now has support for C23, C++23 and Fortran 2023, it is possible to develop OpenMP versions of C, C++ and Fortran codes written with the latest features in each language.

  • The _ALL suffix can be added to device-scope environment variable names. This allows users to set a value that applies to all target devices rather than just a specific device.
  • The decl attribute is now allowed in the C++ attribute syntax. This provides an alternative way to use OpenMP directives in a more natural C++ style.
  • The OpenMP directive syntax has been extended to include C23 attribute specifiers, so that users can use C23-style attributes for specifying directives in a more modern and structured way.
  • For Fortran, handling polymorphic types in data-sharing-attribute clauses was improved.

The GCC 15 release is planned for April/May 2025, and it will include additional OpenMP 6.0 features.

  • The self_maps clause will be permitted in the requires directive. This clause modifies how data mapping works in target offloading, making it more predictable and reducing implicit memory transfers between the host and device.
  • Unique IDentifier (UID) routines: omp_get_device_from_uid and omp_get_uid_from_device routines.
  • Initial interoperability support including the OpenMP 6.0 changes to the prefer_type modifier and support for the Fortran version of the interoperability API routines.

You can find more details about GCC’s OpenMP implementation at https://gcc.gnu.org/projects/gomp

Intel implementations

Intel has implemented OpenMP 6.0 API elements in both Fortran and C++ compilers.

Intel Fortran compiler (ifx) 2025.0

  • The groupprivate directive, with which you can create private variables in a task group.
  • The interop clause for dispatch, which facilitates interoperability with other APIs such as CUDA, HIP, and SYCL.
  • The prefer_type(preference-list) in the append-args clause, with which you can specify preferred types for arguments appended to an offloaded kernel execution. This is particularly useful in heterogeneous computing environments.
  • Conditional execution of the TEAMS construct by using the new IF clause to conditionally execute teams-based parallelism.
  • A device_type clause may now appear on a target construct. It allows to specify the type of device for which the implementation should support execution of the target region.

Intel oneAPI DPC++/C++ compiler version 2025.0

  • The groupprivate directive, with which you can create private variables in a task group.
  • The interop clause for dispatch, which facilitates interoperability with other APIs such as CUDA, HIP, and SYCL.
  • The prefer_type(preference-list) in the append-args clause, with which you can specify preferred types for arguments appended to an offloaded kernel execution. This is particularly useful in heterogeneous computing environments.
  • The local clause for the declare target construct, which allows developers to declare variables and functions as local to a target region, meaning that each thread or SIMD lane gets its own separate copy instead of sharing a global version.
  • The omp_target_memset() function to initialize memory on a target device (e.g., a GPU or other accelerator).
  • The omp_target_memset_async() function to initialize memory on a target device (e.g., a GPU or other accelerator) while allowing execution to continue without waiting for the initialization to complete.
  • A device_type clause may now appear on a target construct. It allows to specify the type of device for which the implementation should support execution of the target region.
  • Mandatory OpenMP offload support is enabled

You will find more details on the 2025.0 release and installation details here.