Message Boards Message Boards

Mathematica 12.0 on Linux issue with CUDA

Posted 5 years ago

I installed Mathematica 12.0 on Ubuntu Linux 18.10 and activated cuda paclet 12.0.287. This simple code:

Needs["CUDALink`"]
array = Table[i + j, {i, 1000}, {j, 1000}];
Timing[CUDADot[array, array]]

gives the error:

/usr/local/Wolfram/Mathematica/12.0/SystemFiles/Kernel/Binaries/Linux-x86-64/WolframKernel: symbol lookup error: /home/bert/.Mathematica/Paclets/Repository/CUDAResources-Lin64-12.0.287/LibraryResources/Linux-x86-64/libCUDALink_Double.so: undefined symbol: cublasCreate_v2

I have nVIDIA driver 418.56 supporting CUDA 10.1 (while the paclet is based on 10.0). I start Mathematica with following script:

export NVIDIA_DRIVER_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/libnvidia-tls.so.418.56
export CUDA_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/libcuda.so
mathematica &

Am I missing something?

POSTED BY: Bert Aerts
7 Replies

No, but the paclet is missing something (specifically, the libcublas library).

I think this is an oversight that probably happened because the installation location for this library changed as of CUDA Toolkit 10.1. It should be corrected soon.

For a workaround in the meantime, try placing a copy of libcublas.so.10.1 in $UserBasePacletsDirectory/Repository/CUDAResources-Lin64-12.0.287/CUDAToolkit/lib

POSTED BY: Ilian Gachevski
Posted 5 years ago

I used:

CUDAResourcesInstall[Update -> True]

and now paclet 12.0.204 was downloaded at extremely low speed. As this is the same version as on http://www.wolfram.com/CUDA/CUDAResources.html I downloaded it from this webpage at much faster speed and installed with

CUDAResourcesInstall["/home/bert/Downloads/CUDAResources-Lin64-12.0.204.paclet"]

Now CUDA is working fine.

POSTED BY: Bert Aerts

That is odd in its own right, because 12.0.204 is not even the latest version.

In any case, this is being fixed today.

POSTED BY: Ilian Gachevski

CUDAResources-Lin64-12.0.303 is now available from the paclet server

POSTED BY: Ilian Gachevski
Posted 5 years ago
CUDAResourcesInstall[Update -> True]

And how do I get 12.0.303? Currently downloading CUDAResources-Lin64-12.0.2046825891.paclet Again the 12.0.204 I guess?

POSTED BY: Bert Aerts

You may have to update your paclet site indices manually

PacletSiteUpdate /@ PacletSites[];

(this also happens automatically every few days)

Once the indices are up to date, the result of the following command should contain the latest version

PacletFindRemote["CUDAResources"]
POSTED BY: Ilian Gachevski
Posted 5 years ago

Thank you very much!! I now have paclet 12.0.303 based on CUDA 10.1 working fine with gcc 8.2.0 !!

POSTED BY: Bert Aerts
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract