OpenMP support

IBM® XL Fortran 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 Fortran for Linux, V16.1.1 adds support for the following directives and their clauses.
DECLARE REDUCTION
You can use the DECLARE REDUCTION directive to define custom reductions. This directive declares a reduction-identifier that you can use in a REDUCTION clause.

New clauses

In addition to the existing OpenMP clauses, IBM XL Fortran for Linux, V16.1.1.6 adds support for the following clauses.
device_type
It is a OpenMP 5.0 feature. You can use the device_type clause to indicate the procedure specified in the DECLARE TARGET directive is compiled for host only, device only, or both. Find more details of this clause in DECLARE TARGET.

Updated clauses

The following clauses are updated in IBM XL Fortran 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 Fortran 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 TEAMS constructs on the device.

Updated environment variables

The following environment variable for OpenMP is updated in IBM XL Fortran 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