I am using Mathematica 10.2 on Ubuntu 15.04 x64. At first, I try to use CUDALink:
Needs["CUDALink`"];
CUDAQ[]
It returns False
.
The reason why it returns False
is that the default paths for NVidia Driver and CUDA are
/usr/lib64/libnvidia-tls.so
and
/usr/lib64/libcuda.so
But these two libraries on my system are located at
/usr/lib/nvidia-346/libnvidia-tls.so.346.59
and
/usr/lib/x86_64-linux-gnu/libcuda.so
According to the documentation provided by Mathematica, to resolve this issue I have to set the system environment for NVIDIA_DRIVER_LIBRARY_PATH and CUDA_LIBRARY_PATH.
So, I export these two variables and run Mathematica on a terminal:
$ export NVIDIA_DRIVER_LIBRARY_PATH=/usr/lib32/nvidia-346/libnvidia-tls.so.346.59
$ export CUDA_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/libcuda.so
$ mathematica
and try to use CUDALink again. This time, CUDAQ[]
does not return False
. Instead, all functions are colored blue (The same effect as calling Exit[]
). The kernel may crash but there are no information about it.
My graphics card is NVidia Geforce GTX 750 Ti, so it should have already support CUDA.
I also tested CUDALink on another PC (Ubuntu 14.04 x64, Mathematica 10.0, NVidia Geforce GTX980), and I got the same issue.
Are you able to use CUDALink on Linux?