On my hardware I have a CUDA enabled video card an ASUS GTX460, yet Mathematica does not seem to recognize this.
I have:
- CUDA Toolkit 4.1
- CUDA SDK 4.0
- NVIDIA Driver 295.49
on Sabayon Linux 64 bit with Mathematica 8.0.0.
For example, following the CUDALink Setup, I get
Needs["CUDALink`"]
CUDAQ[](* False *)
CUDADriverVersion[] (* CUDADriverVersion::nodriv message raised. *)
The NVIDIA command
/opt/cuda/sdk/C/bin/linux/release/deviceQuery finds the card and reports "passed" as well as listing the card capabilities.
Examples from /opt/cuda/sdk/C/bin/linux/release directory, such as smokeParticles, scan, randomFog, run well.
The relevant shell variables are set as follows:
export CUDA_LIBRARY_PATH=/usr/lib64/libcuda.so
export NVIDIA_DRIVER_LIBRARY_PATH=/usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.*
Additional Information
Supported Hardware
The Wolfram CUDA reference page CUDA Reference does not explicitly list the GTX 460 GPU. It does list the GTX 460M, the mobile version, and a mysterious GTS 460.
The Wolfram linked NVIDIA CUDA GPUs lists the popular GTX 460 but has no entry at all for the GTS 460. Perhaps this is a typo in the Wolfram documentation, as it would seem unlikely that they wouldn't support a commonplace NVIDIA GPU whilst supporting a seemingly non-existent GPU. If this isn't the case - I'm clearly stuck.
Problems finding the NVIDIA driver
Some poking around suggests that one sticking point is that
GPUTools`Internal`$NVIDIADriverLibraryVersion
is set to $Failed.
Would anyone know where this is set?
From trying to Trace CUDADriverVersion it isn't obvious to me where things go wrong.
How do I convince Mathematica that my card supports CUDA?

NVIDIA_DRIVER_LIBRARY_PATHandCUDA_LIBRARY_PATHas mentioned towards the end of the page you mention. – b.gates.you.know.what Jun 05 '12 at 22:06CUDAQworks and where/why it returnsFalse. – Szabolcs Jun 06 '12 at 07:34CUDAInformation[]andCUDAQ[]both throw no driver messages that the procedure that finds the CUDA driver is not working correctly. – image_doctor Jun 06 '12 at 07:45CUDAQ. It's inSystemFiles/Links/CUDALink/CUDALink.m. You'll see it's defined in terms ofDeviceCountwhich then usesiDeviceCount. These seem to be defined inSystemFiles/Links/GPUTools/WGLPrivate.mand useWGLQuery. You can try calling these functions manually as well as applyingTraceorTracePrintto them to find out where things go wrong. It'll be a lot of work, but I think you get the idea ;-) I did it withClusterIntegration`. – Szabolcs Jun 06 '12 at 07:53export NVIDIA_DRIVER_LIBRARY_PATH=/usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.*does not work. I have to point to the specific library (ending in.so). – b.gates.you.know.what Jun 06 '12 at 19:56NVIDIA_DRIVER_LIBRARY_PATH=/usr/lib64/opengl/nvidia/lib/libnvidia-tls.sosolves the problem and allows the driver to be found :) So it looks like a typo in the Wolfram CUDA setup documentation that prevents the install from working. If you would like to make your comment an answer I'll accept it, thanks again. – image_doctor Jun 07 '12 at 09:44