Fedora 13 and CUDA

I tried to get CUDA running under F13(64 bit) without much success. The toolkit installs without any errors, but the card (GTX280) remains unconsidered for any kind of computation. Here’s a description of what I did. Maybe someone who made more progress (or even succeeded) can comment here in this forum?

I made it working now. CUDA 3.0 and Fedora 13(64 bit) are running. Here’s the updated way of how it works.
:yes:

[solved: Fedora 13 (x86_64) using CUDA and CUDA-SDK solved]
I am using CUDA 3.0 and the CUDA-SDK on Fedora 13 (x86_64) on my Thinkpad W700, with a FX3700 Mobile Card.
The main problem is solved by installing an alternative gcc versions, therefore I am using alternatives
I am using gcc-4.1.2 with cuda. The gcc-4.3.2-7 did not work with the cuda-sdk.

[baba@yoldas gcc41]$ alternatives --config gcc

There are 4 programs which provide ‘gcc’.

Selection Command

  • 1 /usr/bin/gcc41
    2 /usr/bin/gcc43
  • 3 /usr/bin/gcc44
    4 /usr/bin/gcc34

Enter to keep the current selection[+], or type selection number: 1

[baba@yoldas gcc41]$ alternatives --display gcc
gcc - status is manual.
link currently points to /usr/bin/gcc41
/usr/bin/gcc41 - priority 41000
slave c++: /usr/bin/c++41
slave c89: /usr/bin/c8941
slave c99: /usr/bin/c9941
slave cc: /usr/bin/cc41
slave cpp: /usr/bin/cpp41
slave g++: /usr/bin/g++41
slave gcov: /usr/bin/gcov41
slave protoize: /usr/bin/protoize41
slave unprotoize: /usr/bin/unprotoize41
slave x86_64-redhat-linux-c++: /usr/bin/x86_64-redhat-linux-c++41
slave x86_64-redhat-linux-g++: /usr/bin/x86_64-redhat-linux-g++41
slave x86_64-redhat-linux-gcc: /usr/bin/x86_64-redhat-linux-gcc41
/usr/bin/gcc43 - priority 43000
slave c++: /usr/bin/c++43
slave c89: /usr/bin/c8943
slave c99: /usr/bin/c9943
slave cc: /usr/bin/cc43
slave cpp: /usr/bin/cpp43
slave g++: /usr/bin/g++43
slave gcov: /usr/bin/gcov43
slave protoize: /usr/bin/protoize43
slave unprotoize: /usr/bin/unprotoize43
slave x86_64-redhat-linux-c++: /usr/bin/x86_64-redhat-linux-c++43
slave x86_64-redhat-linux-g++: /usr/bin/x86_64-redhat-linux-g++43
slave x86_64-redhat-linux-gcc: /usr/bin/x86_64-redhat-linux-gcc43
/usr/bin/gcc44 - priority 44000
slave c++: /usr/bin/c++44
slave c89: /usr/bin/c8944
slave c99: /usr/bin/c9944
slave cc: /usr/bin/cc44
slave cpp: /usr/bin/cpp44
slave g++: /usr/bin/g++44
slave gcov: /usr/bin/gcov44
slave protoize: /usr/bin/protoize44
slave unprotoize: /usr/bin/unprotoize44
slave x86_64-redhat-linux-c++: /usr/bin/x86_64-redhat-linux-c++44
slave x86_64-redhat-linux-g++: /usr/bin/x86_64-redhat-linux-g++44
slave x86_64-redhat-linux-gcc: /usr/bin/x86_64-redhat-linux-gcc44
/usr/bin/gcc34 - priority 34000
slave c++: /usr/bin/c++34
slave c89: /usr/bin/c8934
slave c99: /usr/bin/c9934
slave cc: /usr/bin/cc34
slave cpp: /usr/bin/cpp34
slave g++: /usr/bin/g++34
slave gcov: /usr/bin/gcov34
slave protoize: /usr/bin/protoize34
slave unprotoize: /usr/bin/unprotoize34
slave x86_64-redhat-linux-c++: /usr/bin/x86_64-redhat-linux-c++34
slave x86_64-redhat-linux-g++: /usr/bin/x86_64-redhat-linux-g++34
slave x86_64-redhat-linux-gcc: /usr/bin/x86_64-redhat-linux-gcc34
Current `best’ version is /usr/bin/gcc44.

A Quick installation guide of cuda using fedora13 (fedora 10, fedora 11, fedora12 should also work) is:
1.) Install cudatoolkit_3.0_linux_64_fedora10.run from the ww.nvidia.com homepage

2.) Install gpucomputingsdk_3.0_linux.run from the www.nvidia.com homepage

3.) Install kmod-nvidia.kernel-version.fc13.x86_64-195.36.24-1.fc13.7.x86_64 and dependendies from http://rpmfusion.org/
Maybe you have to add the kernel option intel_iommu=off in your grub.conf
A /etc/modprobe.d/blacklist-nouveau.conf file is including in the xorg-x11-drv-nvidia-195.36.24-1.fc13.x86_64.rpm file from the rpmfusion repo.

4.) Rename all executables of the gcc, gcc-c++, cpp, libstdc++, and libstdc++ rpm-packages is in /usr/bin/ from /usr/bin/name /usr/bin/name44 (for gcc 4.4.4)
like:
[root@yoldas ]$ cd /usr/bin; VERSION=44; for i in rpm -ql gcc | grep /usr/bin | cut -d/ -f4; do mv -v $i $i$VERSION; done;
[root@yoldas ]$ cd /usr/bin; VERSION=44; for i in rpm -ql gcc-c++ | grep /usr/bin | cut -d/ -f4; do mv -v $i $i$VERSION; done;
and add them to :
alternatives --install /usr/bin/gcc gcc /usr/bin/gcc44 44000 --slave /usr/bin/g++ g++ /usr/bin/g++44 --slave /usr/bin/cpp cpp …
The full command is: :
/usr/sbin/alternatives --install /usr/bin/gcc gcc /usr/bin/gcc44 44000 --slave /usr/bin/c++ c++ /usr/bin/c++44 --slave /usr/bin/c89 c89 /usr/bin/c8944 --slave /usr/bin/c99 c99 /usr/bin/c9944 --slave /usr/bin/cc cc /usr/bin/cc44 --slave /usr/bin/g++ g++ /usr/bin/g++44 --slave /usr/bin/cpp cpp /usr/bin/cpp44 --slave /usr/bin/gcov gcov /usr/bin/gcov44 --slave /usr/bin/protoize protoize /usr/bin/protoize44 --slave /usr/bin/unprotoize unprotoize /usr/bin/unprotoize44 --slave /usr/bin/x86_64-redhat-linux-c++ x86_64-redhat-linux-c++ /usr/bin/x86_64-redhat-linux-c++44 --slave /usr/bin/x86_64-redhat-linux-g++ x86_64-redhat-linux-g++ /usr/bin/x86_64-redhat-linux-g++44 --slave /usr/bin/x86_64-redhat-linux-gcc x86_64-redhat-linux-gcc /usr/bin/x86_64-redhat-linux-gcc44

5.) Install gcc-4.1.2-12 gcc-c+±4.1.2-12 cpp-4.1.2.12 lisstc+±4.1.2-12 libstdc+±devel-4.1.2.12 without the /usr/share/doc in the rpm-files from fedora9

 Installation: 
    rpm --excludedocs -ivh  libstdc++-devel-4.1.2-12.i386.rpm  --nodeps --force    (etc. for all install rpm package)

 Rename the executable from /usr/bin/name to /usr/bin/name41
    [root@yoldas ]$ cd /usr/bin; VERSION=41; for i in `rpm -ql gcc | grep /usr/bin | cut -d/ -f4`; do mv -v $i $i$VERSION; done;
    [root@yoldas ]$ cd /usr/bin; VERSION=41; for i in `rpm -ql gcc-c++ | grep /usr/bin | cut -d/ -f4`; do mv -v $i $i$VERSION; done;

 Use add the new install gcc-4.1.2 compiler to alternatives, with all dependencies 
  alternatives --install /usr/bin/gcc gcc /usr/bin/gcc41  41000 --slave /usr/bin/cpp cpp /usr/bin/cpp41 --slave dep2 .. ,
  The full command is: 

[baba@yoldas gcc]$ ./gcc-alternatives.sh
/usr/sbin/alternatives --install /usr/bin/gcc gcc /usr/bin/gcc41 41000 --slave /usr/bin/c++ c++ /usr/bin/c++41 --slave /usr/bin/c89 c89 /usr/bin/c8941 --slave /usr/bin/c99 c99 /usr/bin/c9941 --slave /usr/bin/cc cc /usr/bin/cc41 --slave /usr/bin/g++ g++ /usr/bin/g++41 --slave /usr/bin/cpp cpp /usr/bin/cpp41 --slave /usr/bin/gcov gcov /usr/bin/gcov41 --slave /usr/bin/protoize protoize /usr/bin/protoize41 --slave /usr/bin/unprotoize unprotoize /usr/bin/unprotoize41 --slave /usr/bin/x86_64-redhat-linux-c++ x86_64-redhat-linux-c++ /usr/bin/x86_64-redhat-linux-c++41 --slave /usr/bin/x86_64-redhat-linux-g++ x86_64-redhat-linux-g++ /usr/bin/x86_64-redhat-linux-g++41 --slave /usr/bin/x86_64-redhat-linux-gcc x86_64-redhat-linux-gcc /usr/bin/x86_64-redhat-linux-gcc41

6.) allternatives --config gcc, and then select: gcc41
Selection Command

  • 1 /usr/bin/gcc41
    2 /usr/bin/gcc43
  • 3 /usr/bin/gcc44
    4 /usr/bin/gcc34

7.) echo “/usr/lib64/nvidia/” > /etc/ld.so.conf.d/nvidia-lib64.conf and execute the command ldconfig as root

To handle the all slaves options in alternatives command I have wrote a small bash-script If there is a need I can post it.

Good luck. :)

Mete

misstake

Hi,

Thanks for your post. I figured out another solution in the meantime. As my solution does not rely on the RPMFUSION files and works without hacking the GCC I will stick to it. But I believe your way will be also of help for people who read this thread. Here’s an update of how it did it. Thanks for your efforts.

Any workaround for an existing Fedora 13 installation ?
Manually removing nouvea with yum didn’t seem to help. So what else would I have to remove to “get back” to the original base video only ?

Actually I had the same problem. After playing around too much, I modified the kernel wrongly and things were broken. So if you can, take a backup of your home directory and your other data, and restart with a fresh install. Thereby the crucial point is to select “Install with basic video driver” in the first installation menu. Worked like a charm for me. After installation is finished, go to NVIDIA, get the drivers, install, get CUDA and install. Done. I am not sure if you need the video drivers shipped with F13, but for me there appears no difference. More details here.