Search code examples
c++cudaubuntu-14.04cusolver

CUDA 7.0, cuSolver example: unresolved inclusion of cudense.h


I am going through the cuSolver example in the documentation and getting the following error:

fatal error: cudense.h: No such file or directory

Compilation and Linking, "make -n":

nvcc -c -I/usr/local/cuda-7.0/include main.cpp

nvcc -o cusolver_run main.o -L/usr/local/cuda-7.0/lib64 -lcublas -lcusolver

cudense.h is not found in the include directory, while cublas_v2.h is there. Is there any way to get this header file?

  • Cuda Toolkit 7.0
  • Ubuntu 14.04

Solution

  • The CUDA 7 documentation has an error in it in this respect. This has been fixed in the CUDA 7.5RC documentation, so you may wish to switch to that version instead.

    In the meantime, you can fix this particular error by including cusolverDn.h instead.

    Instead of this:

    #include <cudense.h>
    

    Do this:

    #include <cusolverDn.h>
    

    Even the CUDA 7.5RC doc still has defects in this section. After making the above change, if you change all instances of cuds in that doc/example to cusolverDn, I believe that should fix all the compile errors.