[cfe-dev] CUDA math library cannot be found error

Hahnfeld, Jonas via cfe-dev cfe-dev at lists.llvm.org
Tue May 10 04:49:48 PDT 2016


Hi,

 

Assuming you are using clang-omp from GitHub (which is discontinued btw):

You have to put <CUDA_ROOT>/nvvm/libdevice into your $LIBRARY_PATH (not
$LD_LIBRARY_PATH).

Clang should then automatically find the required files.

 

Cheers,

Jonas

 

From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of
Biesbroeck, J.P.A. via cfe-dev
Sent: Tuesday, May 10, 2016 1:04 PM
To: cfe-dev at lists.llvm.org
Subject: [cfe-dev] CUDA math library cannot be found error

 

While trying to compile my code, I got the following error:

 

clang -fopenmp -omptargets=nvptx64sm_35-nvidia-linux -g -O3 -std=c99
Source.c -o source -L /home/rjordans/openmp4/lib -lm

clang-3.8: error: CUDA math library (libdevice) is required and cannot be
found.

 

How can I solve this error?

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160510/961cfd88/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160510/961cfd88/attachment.bin>


More information about the cfe-dev mailing list