Correct version of Ubuntu for cuda 9.1

What is the exact and recommended ubuntu version for cuda 9.1?

I installed 16.04.03 and for the installer and the operating system after installation I had to pass nomodeset to the kernel parameters. I was also able to install libglu1-mesa and libglu1-mesa-dev and freeglut3-dev. Then I was able to installed cuda toolkit.

I Then tried 16.04.04. According to the release notes [1], there are some updates for the mesa package. The result is that the installer and also the operating system don’t need nomodeset in the kernel parameters. However, installing libglu1-mesa* and some others return some unmet dependencies. Therefor, I am now not able to install cuda toolkit.

Even with ubuntu 17.10, I wasn’t able to install cuda 9.1. Because simple packages will install gcc-7 as a dependency and cuda 9.1 doesn’t work with gcc-7.

I know that ubuntu 17.10 is not supported [2], but juts want to see if the developers are aware of such mismatches or not. If you need more info, I can paste the commands and outputs. Any idea?

[1] XenialXerus/ReleaseNotes - Ubuntu Wiki
[2] Installation Guide Linux :: CUDA Toolkit Documentation

As you’ve already pointed out, the supported versions are listed in the CUDA linux install guide.

It is correct that 17.10 is not supported with CUDA 9.1

It is also correct that gcc-7 is not supported, as that is not listed anywhere in the GCC column for CUDA 9.1:

[url]Installation Guide Linux :: CUDA Toolkit Documentation

More specifically with 16.04, the listed/tested kernel version is 4.4, so that is going to be something like 16.04.01

Changes to linux after that point certainly have the possibility to break compatbility with CUDA.

the next support baseline will be published with the next CUDA release, whenever that may be.

You may be able to work around package dependency issues by using the CUDA runfile installer method, rather than the package manager install method. However I’m sure there are other ways to work around the issues you mention.

If you want to downgrade gcc (i.e. install a side-by-side version of gcc in addition to the distro provided version, so that you can use it with CUDA) that is covered in many tutorials on the web. Just google “cuda downgrade gcc”

Well I think I have to leave ubuntu 17.10 for now although I really prefer the user interface and bug fixes over 16.04. I can install multiple gcc versions, but my past experiences show that for future packages (not the cuda) which are installed from the apt repository, they may need gcc-7 (more precisely they have been compiled for gcc-7) and then the war begins!!

Regarding the runfile,I didn’t fully understand what you said. Do you mean that if I use the runfile for ubuntu 16.04, then there is no need to install the third party dev packages as listed in [1]?

[1] Installation Guide Linux :: CUDA Toolkit Documentation

No, you may still need to install 3rd party packages for some situations, but the CUDA installer will not affect any “unmet dependency” issues, because of the runfile method (it does not use packages or the package manager). At that point, any “unmet dependency” issues associated with installing a 3rd party package would have nothing to do with CUDA or the GPU driver, since those were not installed using packages.

If you still had “unmet dependency” issues at that point, at least CUDA and/or NVIDIA would be out of the picture.

Two more things… I see many pages that suggest to install nvidia-390 package via apt and then install the toolkit and skip the 384 driver. Is that recommended by nvidia? Isn’t better to allow the toolkit to only install 384 version? I think that will be more consistant. As you know there are many hidden inconsistencies and bugs due to such version mismatches.

Another question is about installing gcc 5 from source in a custom location and give the path to the runfile. Therefore ubuntu 1710 will use the global gcc 7 while toolkit uses gcc 5 for its own. Is that possible?

There’s been more than the usual amount of linux kernel activity recently. Linux kernel versions beyond 4.10 (e.g. 4.13, etc.) may not work with some older drivers. So you’ll find recommendations to use R390. Using a newer driver with an older toolkit is generally OK with CUDA and is part of the compatibility strategy. In nearly all cases, it should be fine to use the latest driver for your GPU.

Yes, you can have two different versions of gcc installed “side-by-side” and one for some purposes and one for other purposes. I do that on one of my machines where I have an older CUDA toolkit installed on a newer linux distro for test purposes, where the GCC provided by the linux distro is not supported by that particular toolkit version. This is pretty common, and as I said already you’ll find various descriptions on the web by people who have done it.

I have been (or rather was) struggling with getting the least problematic version of Ubuntu - 16.04 LTS - to run after it started giving me black-screen on one of my machines with no proximate cause.

I’m only running new / well maintained hardware and components.

Based on advice I received in this forum, I am now using a version of Ubuntu called “Red Hat Enterprise Linux Workstation” (RHEL Workstation) on that very same machine. Just installed it last night.

I did need to use low-graphics mode to get it to install correctly, but other than that it was the most trouble-free experience I’ve had installing Linux, which I have done about 100 times in the past four months. The other 99 installs were Ubuntu, on a total of about 4 machines. Usually because the existing installation that had been working … stopped. Or I did something like add a new Titan V graphics card.

Note that although RHEL is a for-pay product because it comes with support, there is a Developer program you can sign up for and get a self-support copy for free.

Ubuntu definitely sets the record for most expensive software I’ve ever owned if I value my labor at Minimum Wage and multiply it by the time I wasted dealing with bugs, crashes, and general incompatibility with computer hardware of all kinds (but particularly NVidia).

Personally, once I realized that, I got the for-pay version of RHEL so that if I run into a mysterious problem I can just call support and get help (again, they give a break to registered devs, so you can get a fast-turnaround support package for a few hundred bucks).

My only regret was not asking others earlier what they thought the least troublesome Linux flavor is.

Also, I notice that some of the NVidia utilities indicate they were compiled under RHEL, which is telling.

And you know who else just dropped Ubuntu? Google.

But I’m not bitter.

B

txbob,
I don’t see any proper option for customized gcc in [1]. I expect to see something similar to kerner src path, but there isn’t such thing for gcc.

b.student.cfa,
Thanks for sharing that. I tried with centos 7 and the basic graphic was better than ubuntu. However i wasn’t able to use the wireless usb dongle! Therefore I switched back to ubuntu while didn’t try the toolkit. I may try that one more time.

[1] Installation Guide Linux :: CUDA Toolkit Documentation

No, you cant install CUDA in such a way that it chooses by itself to use a customized gcc (e.g. from the runfile installer). You would need to manually specify after it is installed, via the nvcc --ccbin option, or just use an environment variable (e.g. PATH) to select it.

Although CUDA may require a specific GCC version, not using that version during runfile install should not matter. The only thing that actually depends on GCC during the install process is the driver installer, and it can work with a much wider range of GCC choices than what CUDA requires for CUDA code compilation.