*  OpenSUSE 13.2 : installation of CUDA 6.5 to 8.0

The objective here is to propose a method of installation making it possible to make cohabit several versions of CUDA.

The installation described here was done the 10/19/2016 on a freshen udpate system by using :

sudo zypper update

We add the nvidia repository :

zypper ar -f ftp://download.nvidia.com/opensuse/13.2/ nvidia

Thereafter I do the installation under Yast (software/install and uninstall) by searching nvidia drivers. I found the packages nvidia-computeG03 (version 340.98-44.1), nvidia-computeG04 (version 367.57-27.1), ... For each CUDA version there is a version of Nvidia driver for which CUDA functionality works



CUDA version Driver version




6.5 >= 340.00


7.0 >= 346.00


7.5 >= 352.00


8.0 >= 361.00


I select nvidia-computeG04, launch install and accept all automatic modifications. A reboot is needed to use the new driver.

We want to conserve previous CUDA installations, so we don’t use .deb or .rpm packages and we download the CUDA 8.0 install file cuda_8.0.44_linux-run from https://developer.nvidia.com/cuda-download.

To install the CUDA 8.0 toolkit with samples and without the included driver (version 367.48), we do

chmod u+x cuda_8.0.44_linux-run 
sudo ./cuda_8.0.44_linux-run --silent --toolkit --samples --samplespath=/usr/local/cuda-8.0/samples --verbose

By default a symbolic link is created : /usr/local/cuda /usr/local/cuda-8.0

On my computer, I have some warning messages

Missing recommended library: libGLU.so Missing recommended library: libX11.so Missing recommended library: libXi.so Missing recommended library: libXmu.so

but that does not seem to pose problems after some tests.

however if we want to correct this problem (and it is my case) we must find and install some packages. For example, to find the package which contains libGLU.so* I run the command

$ zypper search --provides  libXmu.so 
Chargement des données du dépôt... 
Lecture des paquets installés... 
 
S | Nom           | Résumé                               | Type 
--+---------------+--------------------------------------+------- 
i | libXmu6       | Miscellaneous utility routines for X | paquet 
  | libXmu6-32bit | Miscellaneous utility routines for X | paquet

The packages to install are libGLU1, libX11-6, libXi6 and libXmu6

sudo zypper in libGLU1 libX11-6 libXi6 libXmu6

A simple research shows us that the required libraries are presents but without the good names:

$ ll /usr/lib64 |grep -E "libXmu.so|libXi.so|libGLU.so|libX11.so" 
lrwxrwxrwx 1 root root       15 19 oct.  09:41 libX11.so.6 -> libX11.so.6.3.0 
-rwxr-xr-x 1 root root  1302168 24 nov.   2015 libX11.so.6.3.0 
lrwxrwxrwx 1 root root       15 26 oct.   2014 libGLU.so.1 -> libGLU.so.1.3.1 
-rwxr-xr-x 1 root root   518952 25 sept.  2014 libGLU.so.1.3.1 
lrwxrwxrwx 1 root root       14 26 oct.   2014 libXi.so.6 -> libXi.so.6.1.0 
-rwxr-xr-x 1 root root    63952 25 sept.  2014 libXi.so.6.1.0 
lrwxrwxrwx 1 root root       15 26 oct.   2014 libXmu.so.6 -> libXmu.so.6.2.0 
-rwxr-xr-x 1 root root   107408 25 sept.  2014 libXmu.so.6.2.0

We must create links to correct this and refresh the shared libraries cache:
cd /usr/lib64 
sudo  ln -s libGLU.so.1.3.1 libGLU.so 
sudo ln -s libX11.so.6.3.0 libX11.so 
sudo ln -s libXi.so.6.1.0 libXi.so 
sudo ln -s libXmu.so.6.2.0 libXmu.so 
sudo ldconfig -n /usr/lib64

Thereafter, if we uninstall CUDA 8.0 Toolkit by using command

sudo /usr/local/cuda-8.0/bin/uninstall_cuda_8.0.pl

and reinstall it, the warning messages disappear... on my computer!

It’s also possible to install in parallel other versions of CUDA Toolkit after downloading the corresponding installation files. There are the commands to install version 6.5, 7.0 and 7.5

sudo ./cuda_6.5.14_linux_64.run --silent --verbose --toolkit --samples --samplespath=/usr/local/cuda-6.5/samples --override 
sudo ./cuda_7.0.28_linux.run --silent --verbose --toolkit --samples --samplespath=/usr/local/cuda-7.0/samples 
sudo ./cuda_7.5.18_linux.run --silent --verbose --toolkit --samples --samplespath=/usr/local/cuda-7.5/samples

Due to an unsupported compiler (version 4.8.3), I use –override option for CUDA 6.5 installation.

Verify that the symbolic link /usr/local/cuda is linked to the default version you want otherwise correct it. For example :

sudo ln -fs /usr/local/cuda-8.0 /usr/local/cuda