Visible to Intel only — GUID: GUID-5838F81A-A30D-4BB4-BA9B-E91DA8C2E19B
Visible to Intel only — GUID: GUID-5838F81A-A30D-4BB4-BA9B-E91DA8C2E19B
fopenmp-offload-mandatory, Qopenmp-offload-mandatory
Instructs the compiler to only generate a device version of OpenMP* target regions.
Syntax
Linux: |
-fopenmp-offload-mandatory (for Clang compatibility) |
Windows: |
/Qopenmp-offload-mandatory |
Arguments
None
Default
OFF |
When this option is not specified, the compiler generates both a host (CPU) and a target device version of OpenMP target regions; if offloading fails for a target region, it executes on the host. |
Description
This option tells the compiler to generate only a target device (GPU) version of OpenMP target regions. A runtime error is issued if offloading fails.
To use this option, you must enable OpenMP offloading by specifying option -fopenmp-targets (Linux) or /Qopenmp-targets (Windows).
IDE Equivalent
Alternate Options
None
Example
The following shows an example of using this option::
Linux
icpx -qopenmp -fopenmp-targets=spir64 -fopenmp-offload-mandatory test.cpp
Windows
icx /Qopenmp /Qopenmp-targets:spir64 /Qopenmp-offload-mandatory test.cpp