I am trying to get CUDALink working on my laptop. I am running Crunchbang "waldorf" which is based on Debian 7 "wheezy". I am a linux novice. The issue is that Mathematica can "see" the nVidia drivers, but yet I am not able to get CUDALink to work. I have searched, and read over the article CUDALink not working on Linux-64 and Asus GTX460 which is close to my issue but doesn't seem to cover it, and where it does shed some light I don't appear to have any of the directories mentioned. I have engaged the Crunchbang linux forums to no avail..

I would really like to get CUDALink working.. I have tried information such as on this website http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic-research/graham/cuda5-debian-wheezy/ but it ruined my video driver setup and I was forced to go through the smxi script again and re-install to get the GUI back.

At the moment I am re-downloading the cuda_5.5.22_linux_64.run file from nVidia. I have tried installing the nVidia CUDA binaries from the debian package manager but it ruins my system every time, forcing me to use the smxi script to repair.

Otherwise, Mathematica 9 is running wonderfully.

If someone can please illustrate the process of setting up CUDA/CUDALink I would greatly appreciate it. Cheers! Will

EDIT: I have installed CUDA 5.5 from the above package and have run deviceQuery, with positive results. It detects the card and all fields are nominal, referencing the nVidia website for the 3100m.

EDIT 2: It was discovered from https://wiki.archlinux.org/index.php/Mathematica that the x64 version of Mathematica is "hard wired" to look for drivers in the /usr/lib64 and not in /usr/lib where things are installed in an x64 native system. Since making a symbolic link using "ln -s /usr/lib /usr/lib64" Mathematica's CUDALink appears to be working now. This question is now closed, but hopefully this can act as community support for others.

EDIT 3: As is mentioned in my answer, there is now an issue with CUDALink not running certain functions. It is the same symptoms as this question: CUDALink is not initialized

  • $\begingroup$ Could you provide your edit 2 as an official answer? Self-answering is ok here, and it will make clear in search results that the question has been answered. $\endgroup$ Mar 11, 2014 at 7:31
  • $\begingroup$ I will certainly do that. It is still not working 100% at the moment as it shows the graphics driver version but not the CUDA version, but CUDAQ[] is answering TRUE so it's at least recognized. $\endgroup$
    – willanth
    Mar 11, 2014 at 8:25
  • $\begingroup$ I also found symlinks work, see mathematica.stackexchange.com/questions/6453/… $\endgroup$ Aug 22, 2015 at 7:18

1 Answer 1


Mathematica (version looks for /usr/lib64 in it's 64bit linux version. Most installs (Crunchbang "Waldorf" in my case) will not generate this directory and instead create a /usr/lib directory in a native 64 bit system, and a lib32 for "legacy" code. After fooling around with modifying path variables etc, I have found that the fastest and easiest way for Mathematica to find the nVidia and CUDA drivers is to create a symbolic link "ln -s /usr/lib /usr/lib64".

Cuda 5.5 was installed by downloading it from nVidia (cuda_5.5.22_linux_64.run) and following the installation prompts using all defaults. Once this was complete, I followed the CUDALink install instructions from Wolfram. When the CUDALink module was installed, I performed the above symbolic link and restarted Mathematica. It would then return a CUDAQ[] "True" and provide all of the other diagnostic information including populating the system information.

The directory hard-coding appears to be a bug in Mathematica.

That being said, I am now having the same issues as this post: CUDALink is not initialized I am not sure if it is related to the fact that I am using an NVS 3100 or not, but I am still not able to use many of the built-in functions despite the software reporting that it is working.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.