Commit b1ed109
committed
fix: use map(attach:/detach:) in OMP_ENTER/EXIT_DATA for correct Fortran pointer attachment
map(always,to/from:) for pointer components copies the host descriptor
(with host addresses) to device, leaving device struct pointers invalid.
OpenMP 5.1 map(attach:) correctly looks up the device address of the pointee
and updates the device struct pointer to reference device memory.
map(detach:) is the symmetric reverse.
This fixes CUDA_ERROR_ILLEGAL_ADDRESS (Phoenix gpu-omp) and
HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION (Frontier AMD gpu-omp) caused by
x%cc/x%spacing etc. being dereferenced as host addresses inside GPU kernels.1 parent 28906e6 commit b1ed109
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
0 commit comments