I’m new to this CUDA thing but I am learning it for school.
My desktop is a dual boot XP and Ubuntu 8.04
with geforce 7600GT
Got some questions:
I don’t NEED a geforce 8 or higher card to do use CUDA do I?
Will it work fine with geforce 7600GT? If I use the make emu=1 command instead of just make?
I am having trouble running the example CUDA programs. After I do
make emu=1 I get:
“/usr/include/c++/4.2/i486-linux-gnu/bits/c++config.h”, line 149: error:
expected a “{”
namespace std attribute ((visibility (“default”))) {
^
“/usr/include/c++/4.2/bits/cpp_type_traits.h”, line 74: error: expected a “{”
namespace __gnu_cxx attribute ((visibility (“default”))) {
…
Is this because I am using gcc 4.2? Is this why Ubuntu 8.04 is not supported or is that because of another reason?
If that is the problem how do I go about using a different version of gcc?
Would it just be easier to use another Linux version like Ubuntu 7.04 ?
or Windows XP?
You can use Ubuntu 8.04, you just have to install and use an older GCC version. You can either hack the Makefiles, or symlink /usr/bin/gcc-4.1 to /usr/bin/gcc.
If you need more info / howto type stuff, just ask.
Just install 2.0beta would simply fix the problem and you dont need to install gcc-4.1 anymore. The simplist way to switch gcc is to re-link /usr/bin/gcc to /usr/bin/gcc-4.1 and usr/bin/g++ to /usr/bin/g+±4.1
(Maybe there’s some eaiser or better way, but I did this when I am using CUDA 1.1 with new Ubuntu 8.04…)
Only 8-series is capable of running CUDA, but you can always run your code on device emulation mode if you just want to take a look. Read the programming guide first will give you a better idea to understand the whole thing.
I’ve also been dealing with these issues. I successfully built in emulation mode in ubuntu 8.04 after changing the gcc symlinks from version 4.2 to version 4.1 with the following commands:
sudo apt-get install gcc-4.1 g+±4.1 -y
cd /usr/bin
sudo rm gcc g++
sudo ln -s g+±4.1 g++
sudo ln -s gcc-4.1 gcc
if you ever need to change it back,
sudo rm gcc g++
sudo ln -s g+±4.2 g++
sudo ln -s gcc-4.2 gcc
Check out CUDA Development in Ubuntu for detailed instructions on developing CUDA in Ubuntu 8.04. Good luck!
169.12 has CUDA support in it. The package manager version may not install libcuda.so, which is causing your error messages. When I was fiddling with ubuntu, I used a Envy (http://albertomilone.com/nvidia_scripts1.html) to install the drivers which correctly installed libcuda.so.
Has anyone got CUDA examples compiling and running (not in emulation mode) in Ubuntu 8.04?
With a fresh installation of Ubuntu, I successfully installed the drivers using Envy, with the following commands:
sudo apt-get install envyng-gtk -y
sudo envyng -t
1 (option to install NVidia Driver, I think it’s version 169.12, but I’m not sure how to check which version is installed)
Then I followed exactly these steps to install and compile everything. When I compile in non-emulation mode and run an example, I always get “There is no device supporting CUDA.”
An extremely timely post! Following the guidelines of going back to GCC-4.1 and linking to the OpenGL libs as described in the release notes, I too have also had some measure of success today :)
So far make runs until MonteCarloMulti where it dies :( Anyone having trouble here?
What is the formal method of identifying the missing pieces?
It is unfortunate that during this period of thrashing about I’ve managed to kill my once working Nvidia 169.12 device driver.
Judgeing from the number of views of this thread there must be an army of guys using Ubuntu!!
Manually installing the 169.12 driver from NVidia breaks by display every time I try it (on reboot I get kicked to “low-graphics mode”). The current EnvyNG works - it installs a working 169.12 driver. When I make the NVidia examples directory after following this guide, I get the compiler error “cannot find -lcuda”.
If my understanding is correct, this error is caused by the fact that libcuda.so is not present in /usr/lib. I checked, and indeed it is not there, or anywhere on my system. (I am slightly confused, because MisterAnderson42 said that Envy correctly installed libcuda.so…)
In any case, I have working drivers, and compiling/running in emulation mode works. It seems the only thing in my way is this lack of libcuda.so. I don’t want to run the NVidia driver installer, because so far it has broken my system every time. If this is the only way, I am willing to bang my head against the wall even more and find out what is going wrong, but I hope there is another way to get libcuda.so set up.
Does anyone know of a way?
The posts in this thread have helped me a lot so far, thanks everyone!
Holy crap! It works!! It really works!!!
I found libcuda.so.169.12 from some random RPM I found on Google, renamed it to libcuda.so, moved it into /usr/lib, ran make, turned off Compiz, and it worked!!!
I’ve updated my guide with detailed instructions from beginning to end.