Group Abstract Group Abstract

Message Boards Message Boards

Unable to get CUDA to link to Mathematica , using Ubuntu 14.04

Posted 10 years ago
POSTED BY: Stuart Anderson
7 Replies

To add to the above. I could not get Ubuntu 16.04 and Mathematica 10.0.02.0 (Linux) working using the solution above.

However it DOES WORK with Ubuntu 16.04 and Mathematica 11.0.0.0 (Linux)

POSTED BY: Stuart Anderson
Posted 10 years ago

Thanks. This works for me too.

Asim

POSTED BY: Asim Ansari
Posted 10 years ago

I have been successful in getting CUDALink working. My solution was to use symlinks.

I have managed to get CUDALink working on an ubuntu 14.04 with an NVidia GTX 750 Ti with CUDA 7 toolkit (installed the toolkit following these instructions.

I have never been able to change NVIDIA_DRIVER_LIBRARY_PATH and CUDA_LIBRARY_PATH using env variables and get CUDALink to work.

I assume the Mathematica CUDA and Nvidia library paths as hardwired and I use symlinks from the libraries to the default locations where Mathematica is looking. It works for me! Mathematica is looking in /usr/lib64, this does not exist on my system, so;

cd /usr sudo mkdir lib64

Locate your libnvidia-tls.so file, I used find

stuart@stuart-2015:~$ find / -name libnvidia-tls.so* 2>/dev/null /usr/lib/nvidia-346/libnvidia-tls.so.346.82 /usr/lib/nvidia-346/tls/libnvidia-tls.so.346.82 /usr/lib32/nvidia-346/libnvidia-tls.so.346.82 /usr/lib32/nvidia-346/tls/libnvidia-tls.so.346.82

I have a 64bit system, I ignore the lib32 libraries, I have 2 choices;

/usr/lib/nvidia-346/libnvidia-tls.so.346.82 /usr/lib/nvidia-346/tls/libnvidia-tls.so.346.82

these are actually different files, I dont know what the difference is, or which is preferred, but there are only two choices, so I try the second file first and symlink like so;

sudo ln -s /usr/lib/nvidia-346/tls/libnvidia-tls.so.346.82 /usr/lib64/libnvidia-tls.so.346.82

With the cuda library, we find these files;

find / -name libcuda.so 2>/dev/null /usr/lib/i386-linux-gnu/libcuda.so /usr/lib/x86_64-linux-gnu/libcuda.so /usr/local/cuda-7.0/targets/x86_64-linux/lib/stubs/libcuda.so

I need the 64-bit version, issue the symlink command;

sudo ln -s /usr/lib/x86_64-linux-gnu/libcuda.so.346.82 /usr/lib64/libcuda.so

Now open Mathematica and test;

CUDA test

POSTED BY: Stuart Anderson
Posted 10 years ago
POSTED BY: Stuart Anderson
Posted 10 years ago

I do not have it working. I have followed all instructions, have set the paths correctly, CUDA is working, but Mathematica will not load the libraries. I think this version of the software is buggy.

POSTED BY: Stuart Anderson
Posted 10 years ago

It is not clear from the above whether you were able to solve the problem. I have a similar issue which I have not been able to solve.

POSTED BY: Asim Ansari
Posted 10 years ago
POSTED BY: Stuart Anderson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard