Executing OpenMP 4.0 code on Nvidia's GPU

Hi,

I was trying to execute an OpenMP 4.0 code on GPU with the offloading supported now. I went through the steps described here. But I get these linking errors during compilation:

LIBRARY_PATH=/home/ahmed/ahmed_home/openmp4/llvm/build/bin/…/lib clang-3.8 -fopenmp -omptargets=nvptx64sm_30-nvidia-linux -g -O3 -std=c99 example.c -o example
ptxas warning : Too big maxrregcount value specified 64, will be ignored
nvlink error : Undefined reference to ‘__kmpc_kernel_init’ in ‘/tmp/example-87866c-36d3a6.cubin’
nvlink error : Undefined reference to ‘__kmpc_for_static_init_4’ in ‘/tmp/example-87866c-36d3a6.cubin’
nvlink error : Undefined reference to ‘__kmpc_for_static_fini’ in ‘/tmp/example-87866c-36d3a6.cubin’
clang-3.8: error: nvlink command failed with exit code 255 (use -v to see invocation)

Any pointer, where the problem could be ?

Thanks a lot.

Hi,
Did you tried it on clang/LLVM built from trunk? Trunk version does not support offloading yet (it is under development now). Use clang/LLVM from clang-omp.github.com, as pointed in Hi, Did you tried it on clang/LLVM built from trunk? Trunk version does not support offloading yet (it is under development now). Use clang/LLVM from clang-omp.github.com, as pointed in

Hi Alexey,

I was actually using clang-omp. As I pointed in my email, I went through the steps from this same link (https://parallel-computing.pro/index.php/9-cuda/43-openmp-4-0-on-nvidia-cuda-gpus), and I still get this linking error.