and using the defaults of /usr/local/MATLAB/R2024 etc. The license number is 41201644.
===Upgrading the nVidia Drivers===
In MATLAB, I ran:
gpuDevice
Error using gpuDevice (line 26)
Graphics driver is out of date. Download and install the latest graphics driver for your GPU from NVIDIA.
Some quick checks showed that I was using driver version 430.26 on ubuntu 18.04.02.
nvidia-smi
lsb_release -a
I couldn't quite get MATLAB to tell me what I needed:
* https://www.mathworks.com/help/parallel-computing/gpu-computing-requirements.html
* https://www.mathworks.com/help/parallel-computing/run-mex-functions-containing-cuda-code.html#mw_20acaa78-994d-4695-ab4b-bca1cfc3dbac
For MEX, I have 10.2 and need 12.2 of the CUDA toolkit:
MATLAB Release CUDA Toolkit Version
R2024a 12.2
...
R2020b 10.2
However:
* nVidia said the latest version was https://www.nvidia.com/Download/driverResults.aspx/230357/en-us/
* The repo said the highest version for 18.04 is 545: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
As root:
runlevel
#5
systemctl get-default
#graphical.target
systemctl set-default multi-user.target
systemctl reboot
As ed:
vncserver -kill :2
Killing Xtightvnc process ID 1844
As root:
#sh ./NVIDIA-Linux-x86_64-550.107.02.run
# The distribution-provided pre-install script failed!
#cat /var/log/nvidia-installer.log
apt-get update
apt install nvidia-driver-545
systemctl set-default graphical.target
systemctl reboot
Run MATLAB
gpuDevice
gpuDevice(2)
The messages were:
apt install nvidia-driver-545
The following additional packages will be installed:
libnvidia-cfg1-545 libnvidia-common-545 libnvidia-compute-545 libnvidia-compute-545:i386 libnvidia-decode-545
libnvidia-decode-545:i386 libnvidia-encode-545 libnvidia-encode-545:i386 libnvidia-extra-545 libnvidia-fbc1-545
libnvidia-fbc1-545:i386 libnvidia-gl-545 libnvidia-gl-545:i386 nvidia-compute-utils-545 nvidia-dkms-545
nvidia-firmware-545-545.29.06 nvidia-kernel-common-545 nvidia-kernel-source-545 nvidia-utils-545
xserver-xorg-video-nvidia-545
The following packages will be REMOVED:
libnvidia-cfg1-430 libnvidia-common-430 libnvidia-compute-430 libnvidia-compute-430:i386 libnvidia-decode-430
libnvidia-decode-430:i386 libnvidia-encode-430 libnvidia-encode-430:i386 libnvidia-fbc1-430 libnvidia-fbc1-430:i386
libnvidia-gl-430 libnvidia-gl-430:i386 libnvidia-ifr1-430 libnvidia-ifr1-430:i386 nvidia-compute-utils-430 nvidia-dkms-430
nvidia-driver-430 nvidia-kernel-common-430 nvidia-kernel-source-430 nvidia-utils-430 xserver-xorg-video-nvidia-430
The following NEW packages will be installed:
libnvidia-cfg1-545 libnvidia-common-545 libnvidia-compute-545 libnvidia-compute-545:i386 libnvidia-decode-545
libnvidia-decode-545:i386 libnvidia-encode-545 libnvidia-encode-545:i386 libnvidia-extra-545 libnvidia-fbc1-545
libnvidia-fbc1-545:i386 libnvidia-gl-545 libnvidia-gl-545:i386 nvidia-compute-utils-545 nvidia-dkms-545 nvidia-driver-545
nvidia-firmware-545-545.29.06 nvidia-kernel-common-545 nvidia-kernel-source-545 nvidia-utils-545
xserver-xorg-video-nvidia-545
0 upgraded, 21 newly installed, 21 to remove and 2 not upgraded.