OpenMP support

IBM® XL C/C++ for Linux, V16.1.1 now fully supports the OpenMP API V4.5 specification.

The new OpenMP support falls into the following categories:

New directives

In addition to the existing OpenMP directives, IBM XL C/C++ for Linux, V16.1.1 adds support for the following directives and their clauses.
omp declare reduction
You can use the omp declare reduction directive to define custom reductions. This directive declares a reduction-identifier that you can use in a reduction clause.

Updated clauses

The following clauses are updated in IBM XL C/C++ for Linux, V16.1.1.
reduction_clause
You can now specify array and array section list items in the reduction clause. To learn more about the array section, see "2.4 Array Sections" in the OpenMP 4.5 specifications.
The clause is supported on the following directives:

New environment variables

IBM XL C/C++ for Linux, V16.1.1 adds support for the following new environment variables for OpenMP.
OMP_DEV_HEAPSIZE
You can use the OMP_DEV_HEAPSIZE environment variable to control the size of the heap used by malloc() and free() device system calls for processes created by the OpenMP implementation to run on the device.
OMP_DEV_STACKSIZE
You can use the OMP_DEV_STACKSIZE environment variable to control the size of the stack for threads created by the OpenMP implementation to run on the device.
OMP_NUM_TEAMS
You can use the OMP_NUM_TEAMS environment variable to set the number of teams to use for the omp teams constructs on the device.

Updated environment variables

The following environment variable for OpenMP is updated in IBM XL C/C++ for Linux, V16.1.1.
OMP_DISPLAY_ENV
The new DEBUG value for OMP_DISPLAY_ENV displays the stack size and heap size that are in effect for a device. With OMP_DISPLAY_ENV=true, the values you specify for the OMP_DEV_HEAPSIZE and OMP_DEV_STACKSIZE environment variables are displayed in kilobytes. With OMP_DISPLAY_ENV=verbose, help information about the OMP_DEV_HEAPSIZE and OMP_DEV_STACKSIZE environment variables is displayed in addition to the information displayed in OMP_DISPLAY_ENV=true.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us