I am trying to get started on the JuliaCon GPU tutorial. I have tried everything I can think of
I’m on Ubuntu 20.04.2 LTS
.
If I use CUDA from the repl, it is successful.
If I try it from a jupyter notebook, launched from the same repl that successfully uses CUDA, I get
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
libnvidia-compute-470:amd64: /usr/lib/x86_64-linux-gnu/libcuda.so.1
which is maintained by ubuntu core developers. I have reported a bug there. But I don’t really know why this doesn’t work. There goes another day…
The version of CUDA being used should be managed here →
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
My system is otherwise well-behaved AFAIK
% 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()
I get this error: