Runtime error on Ubuntu 8.04 with latest cuda release

I get the following run time error when I build and run the example matrixMul:

“cudaSafeCall() Runtime API error in file <matrixMul.cu>, line 108 : feature is not yet implemented.”

Perhaps I built it wrong, so let me detail how I did that.

I have a 64 bit xeon and I installed Ubuntu 8.04 on it because I am aware that 8.10 is not yet supported. I installed the Cuda 2.1 beta for 64 bit linux selecting Ubuntu 8.04.

I used Synaptic Package manager to install g+±4.1 and gcc-4.1. Then I modified common.mk to change g++ to g+±4.1 and the same for gcc and for link. I added a file in /etc/ called, “cuda.conf” which contained the library path ("/usr/local/cuda/lib") and then ran ldconfig with sudo from the sbin directory.

To build and test just one sample, I went into the matrixMul directory and typed “make” which worked with no errors. I then executed it and got the error above.

I would appreciate any help.

and what is on line 108?

Line 108 is:

cutilSafeCall(cudaMalloc((void**) &d_A, mem_size_A));

It is the first time a call of this type allocating memory occurs. The driver I have installed is 180.06. I appreciate this help, is there anything more I can tell you?

does the devicequery example work for you? Otherwise it might be that you are actually not running the nvidia driver (happens to me sometimes)

When I run deviceQuery it does indeed say “there is no device supporting Cuda”

In addition, when I run nvidia-settings it says it can’t open the device.

So the evidence is bulding up that the driver is not installed. Yet I keep clicking on the install package and it seems to run without complaining.

I have evidently done something wrong in the installation that has prevented the driver from actually installing. What could it be? Should I just start over again?

You have no idea how much I appreciate this help.

-Al

You dont doble click and install. When you install the driver, you should be in console mode one of CTRL+ALT+F1,2,3 and so on, you need kill gdm or stop it

sudo /etc/init.d/gdm stop

or

sudo killall gdm

and then run the driver installer (I have installed this version), (IF there is no precompiled headers for the driver, the program will ask if necesary to download and if it fail, then will do build them automatically with a question, click ok, then it will say something about replace actual xorg.conf, the normal way is to replace it anyway the old is backed up).

sudo ./NVIDIA-Linux-x86-180.06-pkg1.run

then start again gdm

sudo /etc/init.d/gdm start

If is your first time you will install manuallythe nvidia driver, then I suguest read a little more or find a manual for install it (just press OK OK OK or some like that), also I suguest know how to switch to vesa default driver, if you crash your graphical system… just for be sure.

Another way yo know if you have direct rendering is

glxinfo | grep rendering

and for see if you have NVIDIA driver

glxinfo | grep NVIDIA

example output

$ glxinfo |grep rendering

direct rendering: Yes

$ glxinfo | grep NVIDIA

server glx vendor string: NVIDIA Corporation

client glx vendor string: NVIDIA Corporation

OpenGL vendor string: NVIDIA Corporation

OpenGL version string: 2.1.2 NVIDIA 180.06

OpenGL shading language version string: 1.20 NVIDIA via Cg compiler

I will also suguest that you install a text browser… just in case that you need to consult something while in text mode, there is Lynx or ELinks.

Just in case, another command for know what is there

$ lspci |grep VGA

01:00.0 VGA compatible controller: nVidia Corporation GeForce 8600M GT (rev a1)

Problem solved!

You are quite right tyoc, there was no driver installed.

As I was new to both Linux and Cuda, I had some problems, but I have gotten all installed now, and I will summarize what I did here for anyone who might have similar problems.

I found the following post to be helpful: http://lifeofaprogrammergeek.blogspot.com/…-in-ubuntu.html

Here are the steps I did:

  1. Download the 3 Cuda files and run sudo chmod +x on each to make them executable.

  2. Use Synaptic Package manager to install g++, g++ 4.1 and freeglut-dev.

  3. Install the Cuda driver. Type sudo /etc/init.d/gdm stop. This makes the screen go blank. Type cntrl-alt-F1 to get a terminal session, then log in. You log in just like you did to Ubuntu and enter: sudo ./driver_filename and the Nvidia driver install application runs. Answer all the questions with yes including the last one that asks if you want to update Xconfig. Then type sudo /etc/init.d/gdm start to return to Gnome desktop. You may find that it restarts in low resolution graphics mode if you restart from power down. This has to be fixed and is covered in a step below.

  4. From a terminal install both of the other two Cuda files with sudo ./filename. You have to use sudo to become root because these installs create files in root owned directories. I took all the default directory names.

  5. You now have a NVIDIA_CUDA_SDK file with all your user application files in your home directory. From the terminal, I entered sudo chown -R myhomename NVIDIA_CUDA_SDK to chang the onwership back to me rather than leave it in root as you don’t want to have to become root to build and run your applications.

  6. I found that setting PATH or LD_LIBRAY_PATH did not work for me. Since I used the default directory names, I didn’t need to do anything with PATH. To take care of the library, I put a soft link by typing sudo ln -s /usr/local/cuda/libcudart.so.2 /usr/lib. Evidently, Unbuntu likes to look for all libraries in /usr/lib/.

  7. Now you can browse to the NVIDIA_CUDA_SDK and run make. Not all projects build because there are a few things missing. But I was only concerned about the basic install, so after running make, I went to the project file for deviceQuery and typed make there. This built fine. Then you can browse to /bin/linux/release/ and type ./deviceQuery and it runs fine. It told me that I have a Tesla card and an Nvidia graphics card.

  8. Only one problem remaining. I was in low resolution mode when I restarted my system. To fix this, I typed
    sudo dpkg-reconfigure -phigh xerver-xorg and restarted the system. Now I was back in high res mode, but I had lost the cuda driver! To fix that, I re-installed the cuda driver again answering yes to all questions including the last one about updating Xconfig. I gleaned this idea from a number of posts found by searching for “ubuntu low resolution problems” or something like that. I wonder if the NVIDIA driver tool gets confused when it installs a Tesla card in Ubuntu and thinking that it now does not know the resolution of the system restarts in safemode. Anyway, this mysterious series of magic incantations totally fixes the problem. Perhaps if I had known, I should have run this command before installing the cuda driver the first time, but I didn’t go back to try that.

One additional comment: I found that enabling the native Nvidia graphics card driver using the Ubuntu facility for this caused the system to become totally lost and unrecoverable. That is, leave that Nvidia driver unenabled and use only the Ubuntu provided graphics card driver.

I want to thank both of you who responded to this. I consider the problem closed unless someone who reads this has additional problems with Ubuntu, or knows how this could have been done better.

-Al

I will suguest you install the SDK as normall user, the other need root access for write to /usr/local/ and or create /usr/local/cuda.

Also an extra warning, you know, the automatic updates of Ubuntu…

There is a problem with this, if there is a update to the kernel image, you will need to reinstall the drivers again after the kernel update, other way, you will have a kernel interface for drivers compiled for the previous kernel and that is not good (because it is outdated).

So take care an expect this when doing the update for a new kernel image (so check the list of updates).