CUSPARSE Library initialization failed

I have already installed CUDA6.0 correctly and could run some other cuda samples.

But when I intend to use cusparse and run the official example, which could be found here (http://docs.nvidia.com/cuda/cusparse/#axzz382nSSJj4)
Build successed!!!
When I run this example, “CUSPARSE Library initialization failed” was occured.
Anyone know how to deal with this kind of problems?

It’s not clear what example you are referring to. The link appears to take me just to the cusparse documentation. (Are you referring to the sample code in Appendix A?)

What happens if you run a CUSPARSE sample code, such as the conjugate gradient sample:

http://docs.nvidia.com/cuda/cuda-samples/index.html#conjugategradient

Yes, the example is the sample code in Appendix A.

The sample code in Appendix A could be built successful. When I run the code, it will exit in this line:
/* initialize cusparse library */
status= cusparseCreate(&handle);
if (status != CUSPARSE_STATUS_SUCCESS) {
CLEANUP(“CUSPARSE Library initialization failed”);
return 1;
}
I found that status = CUSPARSE_NOT_INITIALIZED and then the sample code exit.

What happens if you run a CUSPARSE sample code, such as the conjugate gradient sample:

http://docs.nvidia.com/cuda/cuda-samples/index.html#conjugategradient

GPU Device 0: “GeForce 8800 GTX” with compute capability 1.0

GPU device has 16 Multi-Processors, SM 1.0 compute capabilities

conjugateGradient: requires a minimum CUDA compute 1.1 capability

From the documentation:

http://docs.nvidia.com/cuda/cusparse/index.html#abstract

Note: The cuSPARSE library requires hardware with compute capability (CC) of at least 1.1 or higher.

You’ll need to switch to a cc 1.1 or higher GPU.

After replaced GeForce 8800 GTX with GeForce GTX 680, this problem had been sloved. Thank you very much