OpenMP compilers that support declare mapper

Hello,

I am trying to offload a large codebase to AMD GPUs with OpenMP. The code as is, is based on array of structures logic. I have read that !$omp declare mapper can be used to perform a deep copy. However, I took an example toy code and the compilers I tried complain that it is an “Unclassifiable OpenMP directive”. Does anyone know if there is actual support for Fortran for this feature?

I use gfortran-13 (gcc-version-13.1)
and to compile I use this command:
gfortran -fopenmp -foffload=amdgcn-amdhsa=-march=gfx90a -foffload=-lgfortran -Ofast gpu_dummy.f90 -o mygputest

I have also tried amdflang from (rocm-6.2).

Thank you,
Gerasimos

The Fortran standard in itself doesn’t say anything about OpenMP. So the question is rather “Does gcc/gfortran 13 supports this OpenMP feature (that appeared in the OpenMP 5.0 specification) ?”

The answer is “no”: OpenMP 5.0 (GNU libgomp)

I couldn’t find the status for gcc/gfortran 14…

Thank you very much for you answer. Do you know of any examples or methods for offloading AoS with OpenMP in Fortran?