Saturday, May 28, 2011

Install Cuda 4.0 on Ubuntu 11.04

NVIDIA Cuda 4.0 was released in this month. It includes Performance Primitives (NPP) library for image/video processing using multi-GPU programming. It is supported on many PCs and laptops with NVIDIA GPUs, including Thinkpad T410 with NVIDIA NVS 3100M.

Ubuntu 11.04 was released in the last month. Here is my instruction to install Cuda 4.0 on Ubuntu 11.04 on my Thinkpad T410 (thanks to instructions from http://forums.nvidia.com/index.php?showtopic=198030)

1. Install dependencies

sudo apt-get install build-essential gcc-4.4 g++-4.4 libxi-dev libxmu-dev freeglut3-dev

2. And download and install

  • CUDA Toolkit for Ubuntu Linux 10.10 (sudo sh ...)
  • CUDA Tools SDK (sudo sh ...)
  • GPU Computing SDK code samples (no sudo)

from the following links:
LINUXDOWNLOADS
Developer Drivers for Linux (270.41.19)32-bit 64-bit
CUDA Toolkit
  • C/C++ compiler
  • CUDA-GDB debugger
  • Visual Profiler
  • GPU-accelerated BLAS library
  • GPU-accelerated FFT library
  • GPU-accelerated Sparse Matrix library
  • GPU-accelerated RNG library
  • Additional tools and documentation
documentation
CUDA Toolkit for Fedora 1332-bit 64-bit
CUDA Toolkit for RedHat Enterprise Linux 6.064-bit
CUDA Toolkit for RedHat Enterprise Linux 5.532-bit 64-bit
CUDA Toolkit for RedHat Enterprise Linux 4.864-bit
CUDA Toolkit for Ubuntu Linux 10.1032-bit 64-bit
CUDA Toolkit for OpenSUSE 11.232-bit 64-bit
CUDA Toolkit for SUSE Linux Enterprise Server 11 SP132-bit 64-bit
CUDA Tools SDK32-bit 64-bit
GPU Computing SDK code samples download


3. Download the Developer Drivers for Linux (270.41.19) from the above link. For driver installation, you need to

(1) remove the current nvidia packages you might have installed

sudo apt-get remove nvidia-common nvidia-current

(2) go to the text window via ctrl+alt+F2.

(3) stop X

sudo service gdm stop

(4) remove the nouveau module

sudo apt-get --purge remove xserver-xorg-video-nouveau

(5) stop gdm and restart X

sudo service gdm start

Restart the system

(6) stop X

sudo service gdm stop


(7) install driver

sudo sh devdriver_4.0_linux_32_270.41.19.run

(7) restart X

sudo service gdm start


4. Assuming you have accepted the default install location /usr/local/cuda, you should add the following in the .bashrc file of your home folder.

export CUDA_HOME="/usr/local/cuda"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64"
export PATH=${CUDA_HOME}/bin:${PATH}

run ldconfig as root for it to take effect:

source ~/.bashrc

and

sudo ldconfig

5. make nvcc use gcc/g++ version 4.4, for example, in home directory

mkdir gcc44
cd gcc4
ln -s /usr/bin/cpp-4.4 cpp
ln -s /usr/bin/gcc-4.4 gcc
ln -s /usr/bin/g++-4.4 g++

edit /usr/local/cuda/bin/nvcc.profile to look in the gcc44 directory (give it the full path)

compiler-bindir =/home/xxx/gcc44

6. run make in NVIDIA_GPU_Computing_SDK/C

cd ~/NVIDIA_GPU_Computing_SDK/C
make

7. verify CUDA 4.0 installation by running the deviceQuery sample in the NVIDIA_GPU_Computing_SDK/C

bin/linux/release/deviceQuery

my Thinkpad T410 shows

[deviceQuery] starting...
linux/release/deviceQuery Starting...

CUDA Device Query (Runtime API) version (CUDART static linking)

Found 1 CUDA Capable device(s)

Device 0: "NVS 3100M"
CUDA Driver Version / Runtime Version 4.0 / 4.0
CUDA Capability Major/Minor version number: 1.2
Total amount of global memory: 256 MBytes (268107776 bytes)
( 2) Multiprocessors x ( 8) CUDA Cores/MP: 16 CUDA Cores
GPU Clock Speed: 1.47 GHz
Memory Clock rate: 810.00 Mhz
Memory Bus Width: 64-bit
Max Texture Dimension Size (x,y,z) 1D=(8192), 2D=(65536,32768), 3D=(2048,2048,2048)
Max Layered Texture Size (dim) x layers 1D=(8192) x 512, 2D=(8192,8192) x 512
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 16384 bytes
Total number of registers available per block: 16384
Warp size: 32
Maximum number of threads per block: 512
Maximum sizes of each dimension of a block: 512 x 512 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
Maximum memory pitch: 2147483647 bytes
Texture alignment: 256 bytes
Concurrent copy and execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Concurrent kernel execution: No
Alignment requirement for Surfaces: Yes
Device has ECC support enabled: No
Device is using TCC driver mode: No
Device supports Unified Addressing (UVA): No
Device PCI Bus ID / PCI location ID: 1 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 4.0, CUDA Runtime Version = 4.0, NumDevs = 1, Device = NVS 3100M
[deviceQuery] test results...
PASSED

Press ENTER to exit...


74 comments:

bahrami said...

Hi
I have some problems with your installation guide
compiler-bindir=/home/xxxx/gcc44
where should I add this in nvcc.profile?
but after installing my ubuntu don't boot in normal mode and has this log
API mismatch the nvidia kernel module has version 173.14.30 but this nvidia driver component has version 270.41.19
(I have G98[Geforce 9300 M GS])

Shenbo Yu said...

I put
compiler-bindir =/home/xxx/gcc44
in the last line of /usr/local/cuda/bin/nvcc.profile

Did you run
sudo apt-get remove nvidia-common nvidia-current
to remove your previous driver. Ideally you should use the new installed driver just downloaded from
http://developer.nvidia.com/cuda-toolkit-40#Linux

Patrick said...

Thanks very much for this. I had a little difficulty getting the dev driver to install (Ubuntu 11.04, Dell XPS M1530), but I kept plugging at it, and....

pcarroll@pcarroll-XPS-M1530:~/NVIDIA_GPU_Computing_SDK/C$ bin/linux/release/deviceQuery
[deviceQuery] starting...
bin/linux/release/deviceQuery Starting...

CUDA Device Query (Runtime API) version (CUDART static linking)

Found 1 CUDA Capable device(s)

Device 0: "GeForce 8600M GT"
CUDA Driver Version / Runtime Version 4.0 / 4.0
CUDA Capability Major/Minor version number: 1.1
Total amount of global memory: 256 MBytes (268107776 bytes)
( 4) Multiprocessors x ( 8) CUDA Cores/MP: 32 CUDA Cores
GPU Clock Speed: 0.95 GHz
Memory Clock rate: 702.00 Mhz
Memory Bus Width: 128-bit
Max Texture Dimension Size (x,y,z) 1D=(8192), 2D=(65536,32768), 3D=(2048,2048,2048)
Max Layered Texture Size (dim) x layers 1D=(8192) x 512, 2D=(8192,8192) x 512
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 16384 bytes
Total number of registers available per block: 8192
Warp size: 32
Maximum number of threads per block: 512
Maximum sizes of each dimension of a block: 512 x 512 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
Maximum memory pitch: 2147483647 bytes
Texture alignment: 256 bytes
Concurrent copy and execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Concurrent kernel execution: No
Alignment requirement for Surfaces: Yes
Device has ECC support enabled: No
Device is using TCC driver mode: No
Device supports Unified Addressing (UVA): No
Device PCI Bus ID / PCI location ID: 1 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 4.0, CUDA Runtime Version = 4.0, NumDevs = 1, Device = GeForce 8600M GT
[deviceQuery] test results...
PASSED



THANKS!!!!!

King Goddard said...

nice tutorial thanks.

Norio Kimura said...

I'm using the latast nvidia driver via ppa instead of the cuda dev driver (devdriver_4.0_linux_64_270.41.19.run).

$ sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update
$ sudo apt-get upgrade # or sudo apt-get install nvidia-current
$ sudo reboot

No need to remove the nouveau driver etc.

In this case, however, you should do some workarounds to avoid bugs of SDK:

$ cd ~/NVIDIA_GPU_Computing_SDK/C
$ LPATH=/usr/lib64/nvidia-current make # in 32bit environment, use lib instead of lib64

Marian said...

thank you, good tutorial

Tiago said...
This comment has been removed by the author.
asim said...

Hi
I can not properly install nvidia driver to T410 with NVS 3100M. After creating xorg.conf by nvidia-xconfig X does not start with message 'fatal error, no screen found'
Could you help with that please.

videogamespswii.com said...

thank you for your guidance install Cuda in my Ubuntu.

Alex Honey said...

I used few posts and made bash script for installation.
http://pastebin.com/PyDnT2q6
Nvidia Cuda 4.0 on Ubuntu 11.04

Link to download:
pastebin.com/download.php?i=PyDnT2q6


1. save it like *.sh
2. give the permittions
sudo chmod +x
3. switch shell mode with CTRL+ALT+F1
4. execute script

Unknown said...

I'm having an issue when I try to run make in NVIDIA_GPU_Computing_SDK/C.

I keep getting this error:

make[1]: Entering directory `/home/uvuphys/NVIDIA_GPU_Computting_SDK/C/common'
cc1plus: warning: command line option ‘-Wimplicit’ is valid for C/ObjC but not for C++ [enabled by default]
src/cutil.cpp:28:27: fatal error: builtin_types.h: No such file or directory
compilation terminated.
make[1]: *** [obj/i386/release/cutil.cpp.o] Error 1
make[1]: Leaving directory `/home/uvuphys/NVIDIA_GPU_Computting_SDK/C/common'
make: *** [lib/libcutil.so] Error 2

Any suggestions on what I could be doing wrong?

Thanks for your help.

Daniel Kwok said...

This blog is truly awesome in all aspects.



cudo

Sir ackent said...

I sent your articles links to all my contacts and they all love it including me.
how to get a phlebotomy certification

jerry stock said...

I conceive feeling to have the accumulation that you are card.
Go to Herbal Bath

brandon blake said...

You guys make it really easy for all the folks out there.
Healthy Relationship with Herbal Bath

autoapprovebloglist said...

I'm sure coming again to construe these articles and blogs Tips by VIP Kontor

unsit polek said...

Your way to enlighten everything on this blog is actually pleasant, everyone manage to efficiently be familiar with it, Thanks a great deal.
Learn More About RCM Software

anjila smith said...

These articles and blogs are truly enough for me for a day.
Get more info about Deco En Bois

good studio said...

I will prefer this blog because it has much more informative stuff.
Visit Economy Fence

Timon berg said...

I outright point of view and revalue your repair on every objective.
payday loans online direct lenders

peter watson said...

Great webs site with mesmerizing and unique material what else you would like.
payday loan

unsit polek said...

It's offensively easy to seek out any matter on web as compared to books, as I found this text at this website. Relationship Issues With Hongen 88

boris baker said...

This is really quite informative blog such qualitative info I have never seen anywhere.
Full Vuln DB Article

Jullie Simpson said...

Your contents are too straightforward to browse and easy to understand.
Look for Chrome Download Here

sirking said...

Thanks meant for sharing this type of satisfying opinion, written piece is fastidious, that’s why I’ve read it completely.PushButtonfor.org - How to file bankruptcy

Avocet Steel said...

You have done really a superb job with your web site. Marvelous stuff is here to read.
mis sold ppii

Julian Guzman said...

I see the greatest contents on your blog and I extremely love reading them.
accident compensation

james taylor said...

You have shared the best blog. This is what I really need immediately. mis sold ppi

Richard Cooke said...

Your contents is really forcing out your readers to give the nice remarks. online payday loan

Jeffrey Ramsey said...

I dead consider joyous when I acquire articles pertinent to my process and my issue. payday loans online

Nunah Mikhail said...

Stupendous blog you guys have provided there, I will absolutely valuate your effort. Good Relationship With Dance Fox 24

Leona james said...

I continuously livelihood on upcoming to your parcel again retributory in containerful you have posted new list.

Visit Live Play Alagarto

Leona james said...

I continuously livelihood on upcoming to your parcel again retributory in containerful you have posted new list.

Visit Live Play Alagarto

Michael Rodriguez said...

This blog is really awesome in all respects.
Relationship Tips by CIAM

chris jericho said...

Continue the good work; keep posting more n more n more.root your android

saranya zinavo said...

I very much to like and agree with your point of view. Thank you for sharing. At the same time, I love best pram very much .Welcome to look at my website and blog articles
Responsive Web Design companies in india

Richard Sandberg said...

Continue the good work; keep posting more n more n more.piratage facebook

Stepney john said...

I believe this is actually the most useful blog I've been through this entire day.
California cash advance

Micheal Clark said...

Your contents is really forcing out your readers to give the nice remarks.
infographic

Cool boy said...

I admired your helpful words. Top class contribution. I really hope you’ll write more. I'll continue looking for.social media infographics

Johney Duke said...

Thanks you have provided the nice blogs for us, I am glad about you.
infographic

David Otunga said...

Your contents is really forcing out your readers to give the nice remarks.
good infographics

Nunah Mikhail said...

This blog is down to earth, hats off buds available. good infographics

Mike Tyson said...

I have been dotty by reading your blog because it has a unique data.
payday loans nevadamatex

robin hood said...

Truly the best blog I never got such information before this thanks. infographics design

Berta Hargrove said...

I want more and more articles and blogs please post soon such informative information.
a1c chart

Feonacy Tyson said...

Your blog is extremely brilliant especially the quality content is really appreciable.
life insurance rates

sirking said...

Your articles are very well written and unique.
auto insurance

Malina Tysonh said...

Your blogs and every other content are thus interesting and helpful it makes me return back again.
rar password crack

BRAX TON said...

I was getting bore since morning but as soon as I got this link & reached at this blog, I turned into fresh and also joyful too.
http://bonville.org/

Julie Johnson said...

The Info in the blog is out of this world, I so want to read more. tutoring english

Dolph ziggler said...

Wasp dudes! Amazing stuff continues the good work. restaurants in schaumburg il

Julie Johnson said...

I read your blogs regularly. Your humoristic way is amusing, continue the good work! personal trainers Winnipeg

Gliter Jone said...

If you really desire to get such type of information, visit this blog quickly. comment pirater un compte facebook

chris jhon said...

The Info in the blog is out of this world, I so want to read more. hacker un compte facebook

Paula Lewis said...

The gorgeous post learned a great deal Thanks greatly! comment pirater un compte facebook

Victor Silva said...

These blogs are quite incredible that have provided the best knowledge. creditrepair.com

tina john said...

Your articles are more than wow! vietnam travel

Gexton said...

Really amazing blog, I’d love to discover some extra information.
Android App in Pakistan

Gexton said...

Really amazing blog, I’d love to discover some extra information.
Buy Follistatin

Nice Man said...

I conclude I have selected the smart and inconceivable website along with interesting stuff.

central booking queens

stephin bell said...

Your website is for sure worth bookmarking. new york dui lawyery

only one said...

I don’t waste my free time that’s why I read the informative things when I got this blog I really enjoyed reading this.

best free ftp client

saim disoza said...

Hi Dear, have you been certainly visiting this site daily, if that's the case you then will certainly get good knowledge.
vietnam travel

aleena rose said...

I have looked for so several posts about the blog lovers except this post is of course a nice one, keep on.
weight loss supplements for women

julia john said...

I’m glad to see that having got your blog site I have solved my whole issues regarding searching the stuff.
best credit repair

Angel sky said...

Fantastic work guys I’m a die-heart fan of your web site.

protect america review

janiffer suiz said...

Fascinating information I haven’t been experienced such information in quite a long time.vietnam travel

janiffer suiz said...

Hey to everyone, it’s my first visit of the blog site; this blog includes awesome and actually best info for the visitors. vietnam holiday

janiffer suiz said...

Hurrah, that’s what I was trying to get for, just what a stuff Presented at this blog!! Thanks admin of the site. vietnam travel

janiffer suiz said...

Each time I used to always check blog posts within the first hours in the break of day, because I like to get information increasingly more.vietnam holiday

Master Mind said...

to visit again n again coming to your blogs the superb effort is here.
data cabling brisbane

nice name said...

It’s really such nice information to get advantage from.
central booking ny

ramas samar said...

I was searching for decisive information on this topic. The information you have provided in the blog is really important.

NY criminal lawyer

Followers

Blog Archive

About Me

My Photo
HD Multimedia Technology player