sai kiran grandhi
sai kiran grandhi

Reputation: 227

Partial installation of Nvidia drivers to obtain libcuda.so file

I was trying to build the Rodinia benchmark suite in my Ubuntu 12.04 server

On running the make command I was getting the error

/usr/bin/ld: cannot find -lcuda

I knew that the libcuda.so file is obtained on proper installation of Nvidia drivers. But dont have the GPU on the server so that I can install it. I need the Rodinia suite to test a GPU simulator.

Is there any way to obtain the libcuda.so file something like partially installing the Nvidia driver.

Thanks in advance..

Upvotes: 0

Views: 5283

Answers (1)

Robert Crovella
Robert Crovella

Reputation: 151849

I assume you know how to download an NVIDIA driver. You can select a recent driver, like 319.72, and it will work with pretty much any CUDA version you may want to use. Newer drivers are backward compatible with older CUDA versions. So if you pick 3192.72, for example, it should work just fine with CUDA 5.5, 5.0, 4.2, 4.1, 4.0, etc.

I'm speaking about standard usage with GPUs, not with emulators. Your mileage may vary there.

If you run an nvidia driver installer package like so:

sh NVIDIA-Linux-x86_64-319.72.run --help

You will get some command-line help (and the installer won't do anything).

If you inspect that command line help, you will see that you can get more advanced options by specifying:

sh NVIDIA-Linux-x86_64-319.72.run --advanced-options

From the options we find there, we can run:

sh NVIDIA-Linux-x86_64-319.72.run -x --keep --target mydirectory

Where mydirectory is the directory name where you want the extracted files to go. Don't create mydirectory ahead of time, the installer will create it for you. None of the above steps require root user privilege.

After you run the above command, you will find a libcuda.so.319.72 file in that directory. This is the file you want, put it where you want it. The driver installer also creates a symlink to this file, you will probably want to do this manually:

ln -s -T libcuda.so.319.72 libcuda.so

So copy the libcuda.so.319.72 file to whichever directory you want it to be in, then do the symlink there. On a typical RHEL 6.x install, this file would be in the /usr/lib64 directory, but it may be different on your distro. Copying the file to a system directory like /usr/lib64 will probably require root user privilege.

If you have questions about how this works with your emulator, I don't know anything about that and wouldn't be able to offer any advice there.

Upvotes: 4

Related Questions