CUDA on fedora 15
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2011
    Posts
    4

    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!

  2. #2
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    7,332

    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

  3. #3
    Join Date
    Jul 2011
    Posts
    4

    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
    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!

  4. #4
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    7,332

    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.

  5. #5
    Join Date
    Jul 2011
    Posts
    4

    Re: CUDA on fedora 15

    Quote Originally Posted by marko
    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!

  6. #6
    Join Date
    Aug 2005
    Location
    Ann Arbor
    Age
    51
    Posts
    3,947

    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

  7. #7
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    7,332

    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.

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •