Fedora Linux Support Community & Resources Center
  #1  
Old 30th July 2011, 03:44 AM
bxsjc Offline
Registered User
 
Join Date: Jul 2011
Posts: 4
linuxfirefox
CUDA on fedora 15

Hi! I came across some problems. I need to conduct parallel computing on CUDA. I input "uname -a"and read these:
"Linux BXSJC 2.6.38.8-35.fc15.i686 #1 SMP Wed Jul 6 14:46:26 UTC 2011 i686 i686 i386 GNU/Linux".
I use CUDAtoolkit 4.0. However, when I input:
cd /home/bxsjc/NVIDIA_GPU_Computing_SDK/C and "make -i ",the computer returns

"/usr/local/cuda/include/host_config.h:82:2: error: #error — unsupported GNU version! gcc 4.5 and up are not supported!
make[1]: [obj/i386/release/clock.cu.o] Error 1 (ignored)
g++: error: obj/i386/release/clock.cu.o: No such file or directory
make[1]: [../../bin/linux/release/clock] Error 1 (ignored)
make[1]: Leaving directory `/home/bxsjc/NVIDIA_GPU_Computing_SDK/C/src/clock'
Finished building all"
I don't know how to tackle this problem. So I directly "cd /home/bxsjc/NVIDIA_GPU_Computing_SDK/C/bin/linux/release "and run those executable files. Some return passed while others return these:
"[bxsjc@BXSJC release]$ ./simpleTextureDrv
[simpleTextureDrv] starting...
> Using CUDA Device [0]: GeForce G210M
> GPU Device has SM 1.2 compute capability
> findModulePath file not found: <simpleTexture_kernel.ptx>
> findModulePath file not found: <simpleTexture_kernel.cubin>
> findModulePath could not find <simpleTexture_kernel> ptx or cubin
[simpleTextureDrv] test results...
FAILED
Press ENTER to exit..."
So, could anyone help me? Any suggestions are appreciated!
Reply With Quote
  #2  
Old 30th July 2011, 08:42 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,085
linuxfirefox
Re: CUDA on fedora 15

The problem is just what it says, CUDA isn't supported on Fedora 15.
That's why the Fedora version mentioned on http://developer.nvidia.com/cuda-toolkit-40 is Fedora 13.
The main issue is the compiler in Fedora 15 is gcc 4.6 but CUDA 4.0 needs gcc 4.5 or lower. There are several options


1) get the gcc source from gcc.gnu.org for one of the older versions like gcc 4.4, build that and use it for building CUDA software instead of the official Fedora 15 gcc compiler. I did that at work so I could use Fedora 14 with CUDA 4

2) the hack way:
go in /usr/local/cuda/include/host_config.h and comment out the testing code there around line 82 that detects your compiler version and stops the compile. I think this mostly works because the problem with gcc 4.5 and higher is doing something that the cuda debugger can't deal with. But if you never use the debugger it won't matter. Eventually cuda will catch up to gcc.

3) use Fedora 13 or other supported linux
Reply With Quote
  #3  
Old 30th July 2011, 04:47 PM
bxsjc Offline
Registered User
 
Join Date: Jul 2011
Posts: 4
linuxfirefox
Re: CUDA on fedora 15

Many thanks! Just what I need! I have read lots of discussions. However, I got confused. I will take the first one. Thank you!

---------- Post added at 11:47 PM ---------- Previous post was at 11:46 PM ----------

Quote:
Originally Posted by marko View Post
The problem is just what it says, CUDA isn't supported on Fedora 15.
That's why the Fedora version mentioned on http://developer.nvidia.com/cuda-toolkit-40 is Fedora 13.
The main issue is the compiler in Fedora 15 is gcc 4.6 but CUDA 4.0 needs gcc 4.5 or lower. There are several options


1) get the gcc source from gcc.gnu.org for one of the older versions like gcc 4.4, build that and use it for building CUDA software instead of the official Fedora 15 gcc compiler. I did that at work so I could use Fedora 14 with CUDA 4

2) the hack way:
go in /usr/local/cuda/include/host_config.h and comment out the testing code there around line 82 that detects your compiler version and stops the compile. I think this mostly works because the problem with gcc 4.5 and higher is doing something that the cuda debugger can't deal with. But if you never use the debugger it won't matter. Eventually cuda will catch up to gcc.

3) use Fedora 13 or other supported linux
Many thanks! Just what I need! I have read lots of discussions. However, I got confused. I will take the first one. Thank you!
Reply With Quote
  #4  
Old 30th July 2011, 05:45 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,085
linuxfirefox
Re: CUDA on fedora 15

If you do the option 1 and build gcc 4.4.X, then you'll probably want to change your shell so that gcc is used. Something like this would work

in your ~/.tcshrc file
Code:
if (-d /opt/gcc44/bin ) then
  set path = ( /opt/gcc44/bin $path )
endif
or for ~/.bash_profile
Code:
if [ -d /opt/gcc44/bin]; then
  PATH=/opt/gcc44/bin:$PATH
fi
assuming /opt/gcc44 is where you put your gcc build. The if check is to do a sanity check that I'm adding a path entry that actually exists.
There might also be some people in the forum that have posted about special gcc builds that are already in rpm form, just be careful with the security risks of using an rpm from an unknown source.
Reply With Quote
  #5  
Old 1st August 2011, 02:13 AM
bxsjc Offline
Registered User
 
Join Date: Jul 2011
Posts: 4
linuxfirefox
Re: CUDA on fedora 15

Quote:
Originally Posted by marko View Post
If you do the option 1 and build gcc 4.4.X, then you'll probably want to change your shell so that gcc is used. Something like this would work

in your ~/.tcshrc file
Code:
if (-d /opt/gcc44/bin ) then
  set path = ( /opt/gcc44/bin $path )
endif
or for ~/.bash_profile
Code:
if [ -d /opt/gcc44/bin]; then
  PATH=/opt/gcc44/bin:$PATH
fi
assuming /opt/gcc44 is where you put your gcc build. The if check is to do a sanity check that I'm adding a path entry that actually exists.
There might also be some people in the forum that have posted about special gcc builds that are already in rpm form, just be careful with the security risks of using an rpm from an unknown source.
mv /usr/bin/gcc /usr/bin/gcc46
ln -sf /usr/bin/gcc34 /usr/bin/gcc
ln -sf /usr/bin/g++34 /usr/bin/g++
These efforts can set compat-gcc-34 as the dafault gcc version.
But thank you for giving me a hand!
Reply With Quote
  #6  
Old 2nd August 2011, 04:38 AM
JohnVV Offline
Registered User
 
Join Date: Aug 2005
Location: Ann Arbor
Age: 49
Posts: 3,953
linuxfirefox
Re: CUDA on fedora 15

same post as
http://www.linuxquestions.org/questi...a-15-a-894576/

build gcc 4.3
the examples do build in 4.3
__________________
OpenSUSE 13.2-64bit & Scientific Linux 6.6-64bit ( fedora 4 to 11) and 20 on KVM
My Celestia Downloads

h t t p ://celestiamotherlode.net/catalog/show_creator_details.php?creator_id=10
Reply With Quote
  #7  
Old 2nd August 2011, 02:41 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,085
linuxfirefox
Re: CUDA on fedora 15

JohnVV:

I don't really think there's such a thing as cross posting on completely different forums, the other one was on linuxquestions.org so it's not a violation of the posting rules

http://www.fedoraforum.org/?view=guide

  1. Do Not Cross-Post (Double-Post)
    Posting your thread in several parts of the forum is immature. Just because it's in more than one location doesn't mean that more people are going to answer it. In fact quite the opposite normally as experienced members have little time for this sort of behaviour, staff members will close all offending threads. Posts or threads advertising other posts are also seen as cross-posting.
Reply With Quote
Reply

Tags
cuda fedora gcc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CUDA Installation and Verification on Fedora 13 Truxal Using Fedora 0 14th June 2011 10:48 PM
gcc 4.3 and CUDA SDK jbenninghoff Programming & Packaging 1 11th June 2010 05:50 AM
How to get Boinc 6.4.5 to use CUDA Kobuck Using Fedora 7 15th September 2009 05:50 PM
Anyone using CUDA? drunkahol Using Fedora 2 7th August 2009 01:25 AM
Cuda on F11 x86_64 kramulous Programming & Packaging 5 20th July 2009 03:18 AM


Current GMT-time: 20:28 (Thursday, 20-07-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat