<div dir="ltr">Hi Alexey,<div><br></div><div>I was actually using clang-omp. As I pointed in my email, I went through the steps from this same link (<a href="https://parallel-computing.pro/index.php/9-cuda/43-openmp-4-0-on-nvidia-cuda-gpus">https://parallel-computing.pro/index.php/9-cuda/43-openmp-4-0-on-nvidia-cuda-gpus</a>), and I still get this linking error.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 19, 2016 at 7:08 PM, Bataev, Alexey <span dir="ltr"><<a href="mailto:a.bataev@gmx.com" target="_blank">a.bataev@gmx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi,<br>
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 <a href="http://clang-omp.github.com" target="_blank">clang-omp.github.com</a>, as pointed in
<a href="https://parallel-computing.pro/index.php/9-cuda/43-openmp-4-0-on-nvidia-cuda-gpus" target="_blank">https://parallel-computing.pro/index.php/9-cuda/43-openmp-4-0-on-nvidia-cuda-gpus</a>
<br>
<pre cols="72">Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team
Intel Corp. </pre>
<div>20.01.2016 1:42, Ahmed ElTantawy via
llvm-dev пишет:<br>
</div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>Hi,<br>
<br>
</div>
I was trying to execute an OpenMP 4.0 code on GPU with the
offloading supported now. I went through the steps described
<a href="https://parallel-computing.pro/index.php/9-cuda/43-openmp-4-0-on-nvidia-cuda-gpus" target="_blank">here</a>. But I get these linking errors
during compilation:<br>
<br>
<br>
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<br>
ptxas warning : Too big maxrregcount value specified 64,
will be ignored<br>
nvlink error : Undefined reference to '__kmpc_kernel_init'
in '/tmp/example-87866c-36d3a6.cubin'<br>
nvlink error : Undefined reference to
'__kmpc_for_static_init_4' in
'/tmp/example-87866c-36d3a6.cubin'<br>
nvlink error : Undefined reference to
'__kmpc_for_static_fini' in
'/tmp/example-87866c-36d3a6.cubin'<br>
clang-3.8: error: nvlink command failed with exit code 255
(use -v to see invocation)<br>
<br>
<br>
</div>
Any pointer, where the problem could be ?<br>
<br>
</div>
Thanks a lot.</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>