Can't Initialize cuSolver (unknown error 53)

I am simply trying to run the cuSolverSp_LinearSolver example in CUDA Toolkit 7.5. I am on Debian Linux Jessie 64-bit with kernel 3.16.7 (3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u5 (2015-10-09) x86_64 GNU/Linux).

I don’t know how to solve this error because 53 is not even a valid cuSolver error.

The error message I get is:

GPU Device 0: “GeForce GTX TITAN Black” with compute capability 3.5

Using default input file [./lap2D_5pt_n100.mtx]
step 1: read matrix market format
sparse matrix A is 10000 x 10000 with 49600 nonzeros, base=1

You are running using the stub version of cusolver

CUDA error at cuSolverSp_LinearSolver.cpp:258 code=53() “cusolverSpCreate(&handle)”


In fact, I get similar errors using other CUDA libraries (but not core CUDA routines). In other words, cuFFT fails with error 50 but things like vectorAdd work fine.

You have somehow built the sample incorrectly.

For a standard install, the cusolver libraries should be in:

/usr/local/cuda/lib64

You have somehow linked the application against:

/usr/local/cuda/lib64/stubs

In that directory, the “stub” version of libcusolver.so contains the message:

“You are running using the stub version of cusolver”

I can only assume you built this sample code in some non-standard fashion. Did you build the samples using the provided Makefile at:

/usr/local/cuda/samples

?

Yes, you are correct. It was linked against the stub libraries. Simply deleting the “stub” directory are running sudo ldconfig and rebuilding the example fixed the problem.

Note, I was not specifically linking against the stubs. ld / gcc just decided to do it on its own.

Thanks!!