Hi all,
my request here is about your experience with fortran/nvfortran pointers offloading and OpenMP. I’ve many difficulties in porting a Fortran code on GPU with openMP offloading and if you could clarify the following concept/strategy or provide me some example or pointer to documentation to read…
My code is based on user defined types managed in chained lists. Most of the types looks like this simplified one:
type mytype
integer :: dim
integer, pointer :: tab(:)
type(mytype), pointer :: next
end type mytype
but types can also contain embeded chained lists.
My openmp strategy was to offload only the allocated tab arribute and I need to access these tab attributes using a pointer in loops.
integer, pointer :: ptr(:)
ptr=> current%tab
I offload data with a
!$omp enter data map(to:ptr)
to put them on the GPU and run kernels in loop (each kernel works on only one tab attribute, list is never managed on GPU)
But this raise frequent memory errors on the GPU so I think this is a wrong approach and I do not understand how to do this properly with OpenMP.