I'm a relative newbie in Linux and also on this forum. I'm working in a University research department and was recently asked to get the CUDA SDK installed on a shared machine for some of us to use. This wasn't a straightforward operation and took a lot longer than I expected. I wouldn't have been able to complete it at all without the help I got from this forum as well as other places on the web, and so I wanted to share my installation notes in the hope that if in the future anyone else runs into the same problems I had, these may be of some assistance.
As I say I'm relatively new to Linux and am nowhere near being an expert. If some of the solutions I implemented or the explanations I provide seem a bit amateurish to more experienced people reading this, I'd be very interested to hear what you would have done differently. What I can say is that at the end of this process I now have a working CUDA implementation.
To begin - the environment I was working with was as follows:
GPU: G80 GeForce 8800 GTX
OS: Fedora 13 (64 bit)
GCC Version: 4.4.4
The stuff I was installing was:
Nvidia driver for GPU listed above
chmod u+x on all above downloads to make them executable under my login
Nvidia driver set up. This needs to be done with X server stopped, attempted to do so using sudo /sbin/init 3 but this apparently had no effect.
Made change to /etc/inittab and set initdefault level from 5 to 3 – this effectively means that box will only boot to level 3 (shell prompt) rather than 5 (full GUI)
Rebooted box & confirmed X server not running
Start Nvidia driver install using sudo ./NVIDIA....
Error message received:
“The Nouvea kernel driver is currently in use by your system. This is incompatible with Nvidia driver and must be disabled before proceeding”
Resolved as follows:
1) In /etc/modprobe.d/blacklist.conf add the following line:
2) Rebuild the initramfs image file using dracut:
* Backup the initramfs file
$ sudo mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
* Rebuild the initramfs file
$ sudo dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
4) Check that nouveau driver is not loaded
$ lsmod | grep nouveau
Confirmed Nouveau driver now not running, run install again & take all default options. Install completes successfully
Start CUDA toolkit install and take all defaults. On completion make following additions to .bashrc:
$PATH = “/usr/local/cuda/bin:$PATH”
These settings as advised by toolkit install programme
Start SDK install and take all defaults. This installed to ~/NVIDIA_GPU_Computing_SDK
Running make in ~/NVIDIA_GPU_Computing_SDK
Error – unable to find libglut.
This appears to be because no version of Freeglut installed on machine.
Resolve this using sudo yum install freeglut
then create symbolic link from /usr/lib64/libglut.so.3 to /usr/lib/libglut.so
Run make again – completes successfully.
Run ~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/deviceQuery & get following error:
cudaGetDeviceCount Failed – CUDA driver and runtime version may be mismatched.
Initially thought that error in step 9 was because of not using development driver for GPU however on installing this, error remained the same. Reverted back to original driver install.
Advice available on web seems to indicate that GPU is not initialised after driver is installed and that box needs to be booted to run level 5 and the GUI based Nvidia config utility used to initialise X server.
Resolved by editing /etc/inittab & setting initdefault level back to 5.
Then rebooted the machine to ensure X server started, this effectively initialised the GPU
Re-run of deviceQuery resulted in output shown below.
device Query now runs sucessfully confirming SKD install complete
Further work identified one additional problem which was that when attempting to include <cutil.h> in cuda code, an error was received indicating that this file was not found.
The problem was because the nvcc compiler uses an includes file located at /usr/local/cuda/bin This file needs to hold the path to the location where the cutil.h file is kept before it can be used as a header. Edited that file to include the relevant path (determined using "locate cutil.h") and this appeared to resolve the problem.
As I go on using CUDA if I run into further problems I will update this thread with any solutions found. I hope this will be of help to others attempting to do similar work.
If I've posted this in the wrong place, my apologies.