CUDA on UBUNTU 11.10

I have been attempting to install CUDA on UBUNTU 11.10. Although my Linux skills are slightly above novice it appears that there is no way to make this work.

Does anyone know if NVIDIA is working on an update to CUDA? Any estimate on when it may be available?

In the mean time it appears that my only option is to install an earlier version of Ubuntu. Do I have any other options?

Thanks for the help.
Ron77

I installed and use Cuda 4.0 and 4.1 on Ubuntu 11.10 without any problem …
What is your issue ?

I have been following the nvidia Cuda C Getting Stared Guide. I used the latest driver on the synaptic package manager (285.05.09-0ubuntu0.1) and installed the Cuda Toolkit and SDK from the Cuda 4.1 web page.

When I tried to run make there were errors. I can compile C code but not the Cuda version of C.

The make file output says that there is an unsupported GNU version. gcc 4.6 and up are not supported.

I attempted to download gcc 4.5 using the synaptic package manager but I now suspect that it wasn’t the C compiler.

Is there some way to get gcc 4.5 onto Ubuntu 11.10? That seems to be the current barrier.

Thanks for your help.

Ron

I can get the SDK to compile. I installed g++ and gcc v4.4, and symlinked those to the appropriate files in /usr/bin.

My problem is an incompatibility between the NVIDIA driver components.

./fluidsGL 

[fluidsGL] starting...

[fluidsGL] - [OpenGL/CUDA simulation] starting...

   OpenGL device is Available

Error: API mismatch: the NVIDIA kernel module has version 285.05.09,

but this NVIDIA driver component has version 280.13.  Please make

sure that the kernel module and all NVIDIA driver components

have the same version.

fluidsGL.cpp(416) : cudaSafeCall() Runtime API error 35: CUDA driver version is insufficient for CUDA runtime version.

anyone got any clues? Just about ready to take this damn ocelot out the back and humanely dispose of it this time!

Ron77:
You should use gcc 4.4:
sudo apt-get install gcc-4.4 g+±4.4 build-essential

I suggest you to install update-alternatives for switching between gcc 4.4 and 4.6.

Ron77 and AdrianChallinor:
You need to install the latest dev driver coming with Cuda 4.1. In the installation process a kernel module will be compiled and for that part you need to have gcc and g++ symlinked to gcc-4.6 and g+±4.6. (update-alternatives make this for you in one command).

After install toolkit and examples and buils examples with gcc 4.4.

Alexis, Easier said than done. On previous versions of Ubuntu I could stop GDM, recompile the drivers, install them, and then restart GDM. On this version, the Nvidia module gets loaded and locked. That prevents the new modules from being compiled properly.

Now Ubuntu use lightdm so to stop GDM:

sudo service lightdm stop

It is very easy to go to google page and type in the search field ‘install cuda ubuntu 11.10’. The first links will do the trick. It works everytime for me.

Hi Ron,

You can install gcc4.3 or 4.4 by typing “sudo apt-get install gcc-4.3”

I have not tested the 4.4 my self.

You have to make sure that the gcc 4.3 is the default one.

type “gcc --version” to check what version you are using as default.

Either change the symbolic link to correct version of gcc (i.e. 4.3) or if you have multiple compiler on your system (which seems that you have) when compiling with nvcc use “-ccbin” followed by the correct path to the compiler you want to force nvcc use the one that is compatible.

I followed “Installing Cuda on Ubuntu 11.10” and everything seemed to work but it is not compiling cuda.
I then went through the tests in the “NVIDIA CUDA C Getting Started Guide for Linux.”
It made sense down to running nvcc -V which displayed several lines including
“Cuda compilation tools, release 4.1, V0.2.1221”
Then I used make to compile the sample programs which resulted in the following

/usr/bin/ld: warning: libnvidia-tls.so.280.13, needed by /usr/lib/nvidia-current/libGL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvidia-glcore.so.280.13, needed by /usr/lib/nvidia-current/libGL.so, not found (try using -rpath or -rpath-link)
/usr/lib/nvidia-current/libGL.so: undefined reference to _nv018tls' /usr/lib/nvidia-current/libGL.so: undefined reference to _nv012glcore’
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv017glcore’

And a long list of other undefined references.

I am not sure what is meant by “try using -rpath or -rpath-link” Are these options on the make command?

Any suggestions would be greatly appreciated.

I followed “Installing Cuda on Ubuntu 11.10” and everything seemed to work but it is not compiling cuda.

I then went through the tests in the “NVIDIA CUDA C Getting Started Guide for Linux.”

It made sense down to running nvcc -V which displayed several lines including

“Cuda compilation tools, release 4.1, V0.2.1221”

Then I used make to compile the sample programs which resulted in the following

/usr/bin/ld: warning: libnvidia-tls.so.280.13, needed by /usr/lib/nvidia-current/libGL.so, not found (try using -rpath or -rpath-link)

/usr/bin/ld: warning: libnvidia-glcore.so.280.13, needed by /usr/lib/nvidia-current/libGL.so, not found (try using -rpath or -rpath-link)

/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv018tls’

/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv012glcore’

/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv017glcore’

And a long list of other undefined references.

I am not sure what is meant by “try using -rpath or -rpath-link” Are these options on the make command?

Any suggestions would be greatly appreciated.

Thank you - Found my error, it was a something else that was locking the Ubuntu NVidia in memory. Got rid of this and installed the nvidia version as suggested and all is well.

I share you frustration Ron. I gave up on 11.10, and installed 11.04,… just to get CUDA running. The “Getting started” instructions are old. Your err suggest that you are still missing some of the libs. Here is a list of the libs I installed w/ apt-get:
freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libgl1-mesa libgl1-mesa-dev

I can’t tell you which one supports what, but you may want to try these.
The mesa libs touch the libGL.so. This means you may need to reinstall the nvidia driver.
(sudo apt-get install nvidia-current)

I can build some of the code examples. I’m still working on a MAKE issue.

Linux is great for people who want to spend hours and hours looking busy and getting nothing done.

Yes it took me some time to make it work, but it was not so bäd. Am I a person who wants to spend hours looking busy and getting nothing done? A little bit of searching on google and reading some instructions is not so much taking into account you want to program in CUDA. I find the programming part much harder than the installation if you know what I mean.