Message Boards Message Boards

GROUPS:

Driver issue with CUDA on Linux?

Posted 1 year ago
2626 Views
|
2 Replies
|
0 Total Likes
|

Hello,

I have Mathematica 12.3 installed on a linux machine (I am using arch-linux). My GPU is a Quadro P620. to work with CUDA I installed the following packages (using pacman as usual)

community/cuda 11.3.1-1 community cuda-tools 11.3.1-1

If I print the environment variables I get the following relevant PATH

NVIDIADRIVERLIBRARY_PATH=/usr/lib64/libnvidia-tls.so.465.31 CUDALIBRARYPATH=/usr/lib64/libcuda.so.465.31 CUDA_PATH=/opt/cuda PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/opt/cuda/bin:/opt/cuda/nsightcompute:/opt/cuda/nsightsystems/bin:/usr/lib/jvm/default/bin:/usr/bin/siteperl:/usr/bin/vendorperl:/usr/bin/core_perl

To me it looks everything is well-settled. However, when I try to use CUDALink I get the following

In[1]:= Needs["CUDALink`"]
CUDAQ[]
CUDAToolkitCompatibilityInformation[]
CUDADriverVersion[]

During evaluation of In[1]:= CUDAQ::nodriv: A valid CUDA driver was not found. Refer to CUDALink System Requirements for system requirements.

Out[2]= False

Out[3]= Success["CUDALinkCompatible", 
Association[
 "MessageTemplate" -> "CUDALink is compatible with CUDA Toolkit \
`installedVersion`.", 
  "MessageParameters" -> Association["installedVersion" -> 11.3], 
  "CUDAToolkitVersionMajorDetected" -> "11", 
  "CUDAToolkitVersionMajorCompatible" -> "11", 
  "Data" -> Association[
   "CUDAToolkitVersionMajorDetected" -> 11, 
    "CUDAToolkitVersionMajorRequired" -> 11, 
    "CUDALinkCompatibilityQ" -> True]]]

Out[4]= "465.31.0"&[Wolfram Notebook][2]

I attach a notebook. Somebody can help me?

Attachments:
POSTED BY: Dario Rosa
2 Replies

Frankly speaking, CUDA support is currently in very bad shape on all platforms. There is no, generally reliable, approach for Linux and Windows.

POSTED BY: Michal Kvasnicka

Thank you. I finally solved my problem (I post here the solution since it could be useful for somebody):

I discovered that I did not have any driver problem. My problem was just that in my laptop I have two GPUs: the integrated GPU and the Nvidia GPU. Given the two GPUs, Mathematica was not able to make use of the Nvidia GPU. As far as I understand, the problem should be fixed with some suitable packages (like bumblebee) but in my case I found a easier solution: I noticed that in my BIOS I can turn off completely the integrated GPU. Hence, whenever I want to use CUDA, I simply reboot the system turning off the integrated GPU.

POSTED BY: Dario Rosa
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