when i use cuda to complie a software,the error shows as below
and the error as below
so how can i solve it
when i use cuda to complie a software,the error shows as below
I believe include directives for system header files should use <> and not “”.
Try <cublas_v2.h> instead of “cublas_v2.h”
You might also need to specify the path to the compiler where these header files are located. Generally should not be needed with nvcc
but I see you are using icpc. I’m not that familiar with the intel compilers but try:
-I/usr/local/cuda/include
if you have a proper install of CUDA on your machine. Otherwise, if you are using some other install method (e.g. HPC SDK) find the location of the CUDA include files on your machine, and pass that switch to your compiler.
Hi Robert,
i just add the include file to the cmake, and it works
but i got the probelm like this
ld: not found. -lcusolver: No file or directory
ld: Not found -lcublas: No file or directory
ld: Not found -lcufft: No file or directory
when i add the libs in the shell path,this time it doesn’t works
Hi,Robert
i use cmake to complie my project,however, i don’t konw how to add the -L/path/to/libraries/… in my cmakefiles,how can can i add the shared lib like libcufft.so,libcusolver.so,libcublas.so in the project’s cmakeLists.txt
–best wishes
Sorry, I can’t help you with CMake. It’s not an NVIDIA product. However, I suspect that such a simple topic as “how do I include additional link libraries with CMake” is probably covered on other forums.