cudaGetDeviceProperties returns 11

Hello,

I am trying to get the deviceQuery example to work under Ubuntu 8.10. I have used CUDA before in windows and I am starting a new project in ubuntu.

I have made the example compile, so the right version of gcc and g++ is setup.

When I run deviceQuery, the following line:

error_code = cudaGetDeviceProperties(&deviceProp, dev);

returns an error code of 11. I have looked this up and 11 is cudaErrorInvalidValue.

dev is set to 0 and deviceProp is a newly intialized cudaDeviceProp object.

Any help is appreciated. I bet you’ve never heard this before on a forum: Take your time answering, I have plenty of other things I am working on. But if you do know the solution, thanks for any help.

Sincerely,
Phil

What driver do you have installed?

I installed the “Proprietary Drivers” in ubuntu when the little icon came up in the upper right hand corner.

I didn’t get the drivers from the website, I got them from ubuntu’s automated install procedure.

How would I give you more information than this?

That’s your problem. Ubuntu drivers are ancient and unsuitable for use in CUDA development. Get rid of those, install the drivers that correspond to the toolkit version that you installed.

Envy streamlines the process of installing the latest drivers in Ubuntu’s non-standard setup.
http://albertomilone.com/nvidia_scripts1.html

Okay, it worked. Had to reinstall Ubuntu because I messed up X so much. Oh well.

Thanks!