Lets you specify the data movement for variables referenced inside the DO CONCURRENT region when it is auto-offloaded. This feature is only available for ifx.
Linux: | -fopenmp-do-concurrent-maptype-modifier[=modifier] |
Windows: | /Qopenmp-do-concurrent-maptype-modifier [=modifier] |
modifier |
Specifies the data movement to be applied to the TOFROM maptype that is used when offloading a DO CONCURRENT region. It can be any of the following:
|
TOFROM |
When you do not specify this option, no modifier is specified, or none is specified, TOFROM is used when offloading a DO CONCURRENT region. |
This option lets you specify the data movement for variables referenced inside the DO CONCURRENT region when it is auto-offloaded.
This option is ignored if you do not also specify both of the following options in the command line:
-fopenmp-targets (Linux) or /Qopenmp-targets (Windows)
-fopenmp-target-do-concurrent (Linux) or /Qopenmp-target-do-concurrent (Windows)
None
Consider the following program (named test.f90) on a Linux system:
program do_conc_omp_hybrid implicit none integer :: i integer, dimension(10) :: x, y x = 1 y = 0 !$omp target data map(to: x) map(from: y) x = 2 do concurrent (i = 1:10) y(i) = x(i) + 1 enddo !$omp end target data print *, y end program do_conc_omp_hybrid
Previously, there was no control for data movement and the compiler would move the X and Y data to and from the device by default, despite the fact that the user had already mapped it.
However, if you specify option -fopenmp-do-concurrent-maptype-modifier, you have more control over the movement.
For example, if you specify the following command, the compiler is told that the data for X and Y has already been moved to the device and no further movement is required:
ifx -fiopenmp -fopenmp-targets=spir64 -fopenmp-target-do-concurrent -fopenmp-do-concurrent-maptype-modifier=present test.f90