LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices

Reply
 
Search this Thread
Old 02-21-2011, 06:43 AM   #1
stuart_m
LQ Newbie
 
Registered: Oct 2010
Location: Glasgow, UK
Distribution: Fedora
Posts: 14

Rep: Reputation: 1
Installing CUDA SDK on Fedora


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:

CUDA toolkit
CUDA SDK
Nvidia driver for GPU listed above

Step 1

chmod u+x on all above downloads to make them executable under my login

Step 2

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

Step 3

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:
blacklist nouveau
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)
3) Reboot
4) Check that nouveau driver is not loaded
$ lsmod | grep nouveau

(From http://www.linuxquestions.org/questi...driver-825432/)

Step 4

Confirmed Nouveau driver now not running, run install again & take all default options. Install completes successfully

Step 5

Start CUDA toolkit install and take all defaults. On completion make following additions to .bashrc:

$PATH = “/usr/local/cuda/bin:$PATH”
$LD_LIBRARY_PATH=”/usr/local/cuda/lib64:/usr/local/cuda/lib”

These settings as advised by toolkit install programme

Step 6

Start SDK install and take all defaults. This installed to ~/NVIDIA_GPU_Computing_SDK

Step 7

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

Step 8

Run make again – completes successfully.

Step 9

Run ~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/deviceQuery & get following error:

cudaGetDeviceCount Failed – CUDA driver and runtime version may be mismatched.

Step 10

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.

Step 11

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with CUDA 3.0 64 bit install, drivers and SDK eulering Linux - General 0 06-08-2010 02:22 AM
Installing Java SDK... Kris Jacyna Linux - Newbie 12 10-03-2009 06:49 PM
errors when installing amd sdk 1.1 on fedora 9 anushka Fedora 2 07-26-2008 05:20 AM
Help installing Java sdk/jdk 6 on Fedora core 6 tecksk8er001 Linux - Software 13 05-21-2007 07:38 PM
Java SDK and Fedora Core 3 caps_phisto Fedora 5 01-12-2005 03:02 PM


All times are GMT -5. The time now is 10:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration