HOME
| OPENMP API Specification: Version 5.0 November 2018

6.17  OMP_TARGET_OFFLOAD

The OMP_TARGET_OFFLOAD environment variable sets the initial value of the target-offload-var ICV. The value of the OMP_TARGET_OFFLOAD environment variable must be one of the following:

MANDATORY | DISABLED | DEFAULT

The MANDATORY value specifies that program execution is terminated if a device construct or device memory routine is encountered and the device is not available or is not supported by the implementation. Support for the DISABLED value is implementation defined. If an implementation supports it, the behavior is as if the only device is the host device.

The DEFAULT value specifies the default behavior as described in Section 1.3 on page 52.

Example:  

 
% setenv OMP_TARGET_OFFLOAD MANDATORY  

Cross References