libnvidia-compute-470 is getting mixed up with nvida graphics drivers, libraries

Bug #1937007 reported by Peter Goodall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-470 (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm on `Ubuntu 20.04.2 LTS`.

If I use CUDA from the Julia repl, it is successful.
If I try it from a jupyter notebook, launched from the same repl that successfully uses CUDA, I get the error

could not load library "libcuda.so.1"

The only instance of that filename is:
```
% locate libcuda.so.1
/usr/lib/x86_64-linux-gnu/libcuda.so.1
```
Which is not in the nvidia install of CUDA. It is from
```
% dpkg -S /usr/lib/x86_64-linux-gnu/libcuda.so.1
 /usr/lib/x86_64-linux-gnu/libcuda.so.1
```

which is maintained by ubuntu core developers.

```
sudo update-alternatives --display cuda
cuda - auto mode
  link best version is /usr/local/cuda-11.4
  link currently points to /usr/local/cuda-11.4
  link cuda is /usr/local/cuda
/usr/local/cuda-11.4 - priority 114

```

```
% nvidia-smi
...
NVIDIA-SMI 470.57.02 Driver Version: 470.57.02 CUDA Version: 11.4
...
% nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Wed_Jun__2_19:15:15_PDT_2021
Cuda compilation tools, release 11.4, V11.4.48
Build cuda_11.4.r11.4/compiler.30033411_0
```

The Julia repl is running CUDA fine:

```
julia> using CUDA

julia> CUDA.versioninfo()
CUDA toolkit 11.3.1, artifact installation
CUDA driver 11.4.0
NVIDIA driver 470.57.2

Libraries:
- CUBLAS: 11.5.1
- CURAND: 10.2.4
- CUFFT: 10.4.2
- CUSOLVER: 11.1.2
- CUSPARSE: 11.6.0
- CUPTI: 14.0.0
- NVML: 11.0.0+470.57.2
- CUDNN: 8.20.0 (for CUDA 11.3.0)
- CUTENSOR: 1.3.0 (for CUDA 11.2.0)

Toolchain:
- Julia: 1.6.1
- LLVM: 11.0.1
- PTX ISA support: 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 6.0, 6.1, 6.3, 6.4, 6.5, 7.0
- Device capability support: sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80

1 device:
  0: NVIDIA GeForce GTX 1050 Ti (sm_61, 3.446 GiB / 3.938 GiB available)
```

```
% julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.6.1 (2021-04-23)
 _/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(@v1.6) pkg> add CUDA, IJulia
    Updating registry at `~/.julia/registries/General`
   Resolving package versions...
  No Changes to `~/.julia/environments/v1.6/Project.toml`
  No Changes to `~/.julia/environments/v1.6/Manifest.toml`

shell> ls
common_definitions.jl FunWithArrays.ipynb Introduction_CUDA.ipynb Lilly_hat.jpg sneak_peek
DeviceSideRNG.ipynb ImageProcessing.ipynb JuliaSet.ipynb Manifest.toml src
Diffusion.ipynb Introduction_AMDGPU.ipynb kernelabstractions Project.toml

julia> using IJulia

julia> jupyterlab()
```

Revision history for this message
Peter Goodall (pjgoodall) wrote :

I apologise for the formatting, I started reporting this on a mark-down based system. I really wish ubuntu used markdown like everyone else :-(

Revision history for this message
Peter Goodall (pjgoodall) wrote :

I am guessing it is both of the Jupyter developers, and Ubuntu developers struggling with "update-alternatives". The Julia repl seems to get the right result.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.