Skip to content

Commit

Permalink
update instructions for fedora 25
Browse files Browse the repository at this point in the history
its a shame this distrib doesnt provide older gcc toolchains.. :/
  • Loading branch information
tpruvot committed May 23, 2017
1 parent 8cf2159 commit 2160049
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
36 changes: 25 additions & 11 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@ where your CUDA 6.5 toolkit is installed (usually /usr/local/cuda,
but some distros may have a different default location)


** How to compile on Fedora 22 (2015) **
** How to compile on Fedora 25 **

# Step 1: gcc and dependencies
dnf install gcc gcc-c++ automake
dnf install jansson-devel openssl-devel libcurl-devel zlib-devel pciutils-devel
dnf install gcc gcc-c++ autoconf automake
dnf install jansson-devel openssl-devel libcurl-devel zlib-devel

# Step 2: nvidia drivers (Download common linux drivers from nvidia site)
dnf install kernel-devel
modprobe -r nouveau
./NVIDIA-Linux-x86_64-346.72.run
dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
dnf check-update
dnf install xorg-x11-drv-nvidia-cuda kmod-nvidia
ln -s libnvidia-ml.so.1 /usr/lib64/libnvidia-ml.so

# Step 3: CUDA SDK (Download from nvidia archive)
dnf install cuda-repo-fedora20-6-5-prod-6.5-19.x86_64.rpm
dnf install cuda-minimal-build-6-5.x86_64
# Step 3: CUDA SDK (Download from nvidia the generic ".run" archive)
# --override is required to ignore "too recent" gcc 6.3
# --silent is required to install only the toolkit (no kmod)
./cuda_8.0.61_375.26_linux.run --toolkit --silent --override
nvcc --version

# add the nvcc binary path to the system
ln -s /usr/local/cuda-6.5 /usr/local/cuda
Expand All @@ -32,9 +36,19 @@ echo 'export PATH=$PATH:/usr/local/cuda/bin' > /etc/profile.d/cuda.sh
echo /usr/local/cuda/lib64 > /etc/ld.so.conf.d/cuda.conf
ldconfig

# Step 4: Fix the toolkit warning with gcc 5.1
edit the file /usr/local/cuda/include/host_config.h
and comment/delete the line 82 : #error -- unsupported GNU version! gcc 4.9
# Step 4: Fix the toolkit incompatibility with gcc 6

# You need to build yourself an older GCC/G++ version, i recommend the 5.4
# see https://gcc.gnu.org/mirrors.html

wget ftp://ftp.lip6.fr/pub/gcc/releases/gcc-5.4.0/gcc-5.4.0.tar.bz2
dnf install libmpc-devel mpfr-devel gmp-devel
./configure --prefix=/usr/local --enable-languages=c,c++,lto --disable-multilib
make -j 8 && make install
(while this step, you have the time to cook something :p)

# or, for previous fedora versions, edit the file /usr/local/cuda/include/host_config.h
# and comment/delete the line 121 : #error -- unsupported GNU version! gcc versions later than 5 are not supported!

./build.sh

Expand Down
2 changes: 1 addition & 1 deletion nvml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ void nvml_print_device_info(int dev_id)
if (hnvml->nvmlDeviceGetClock) {
uint32_t gpu_clk = 0, mem_clk = 0;

fprintf(stderr, "------- Clocks -------\n");
// fprintf(stderr, "------- Clocks -------\n");

hnvml->nvmlDeviceGetClock(hnvml->devs[n], NVML_CLOCK_GRAPHICS, NVML_CLOCK_ID_APP_CLOCK_DEFAULT, &gpu_clk);
rc = hnvml->nvmlDeviceGetClock(hnvml->devs[n], NVML_CLOCK_MEM, NVML_CLOCK_ID_APP_CLOCK_DEFAULT, &mem_clk);
Expand Down

0 comments on commit 2160049

Please sign in to comment.