Hello,
I work on a library who have some offloading with openMP. I'm stuck with an issue, on every offloading section.
My error in GDB always consern #pragma with offload:
Libomptarget error: Host ptr 0x00007ffff7a05ab0 does not have a matching target pointer.
Libomptarget error: Consult https://openmp.llvm.org/design/Runtimes.html for debugging options.
qmckl_ao.c:6267:5: Libomptarget fatal error 1: failure of target construct while offloading is mandatory
Thread 1 "bench_aos_devic" received signal SIGABRT, Aborted.
0x00007ffff74f700b in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) f 4
#4 0x00007ffff7a5a925 in qmckl_compute_ao_vgl_gaussian_device_pointers_v2 (context=2878784, ao_num=404, shell_num=177, prim_num_per_nucleus=0x7ffeec272000,
point_num=15800, nucl_num=38, coord=0x7ffeec342000, nucl_coord=0x7ffeec25e000, nucleus_index=0x7ffeec260000, nucleus_shell_num=0x7ffeec261000,
nucleus_range=0x7ffeec271000, nucleus_max_ang_mom=0x7ffeec270000, shell_ang_mom=0x7ffeec262000, ao_factor=0x7ffeec26c000, shell_vgl=0x7ffe86951040,
ao_vgl=0x7ffe8d400000, device_id=0) at src/qmckl_ao.c:6267
6267 #pragma omp target
(gdb)
In fact all my pointers has been declarated with omp_target_alloc and look's to work (Just by checking the adr). I can compile and execute my code on NVIDIA GPU (A100 and laptop GPU).
I work on an W6800, and I can compile and execute simple sample of code with openMP.
Do you have any ideas why my code doen't work?
Thank's in advance for your answers !
The full code of the lib: https://github.com/justemax/qmckl/tree/gpu
The full code of benchmark (use device pointers version of bench) : https://github.com/TREX-CoE/qmckl_bench/tree/device_pointers