How to make CUDA 5.5 nvcc run under 64bit Ubuntu

来源:互联网 发布:当数据库被破坏时,利用 编辑:程序博客网 时间:2024/05/16 12:24

Step 1: Download tarball from thissite.

Step 2: Follow the instruction to install the CUDA. Here isthe instruction page.

Step 3: Check the PATH and LD_LIBRARY_PATH variables, ensure you have included the CUDA path correctly.

Step 4: Since nvcc is 32bit elf. It still needs 32bits library to install. Please run

sudo apt-get install libc6-i386
Without the libc6-i386, you will get an famous obscure error of "no such file or directory" which will misguide you and waste your a lot time.

Under the /path/to/cuda/bin directory, you can check the libraries needed by nvcc as you installed libc6-i386:

$ldd nvcclinux-gate.so.1 =>  (0xf7752000)libpthread.so.0 => /lib32/libpthread.so.0 (0xf771e000)libgcc_s.so.1 => not foundlibc.so.6 => /lib32/libc.so.6 (0xf756d000)/lib/ld-linux.so.2 (0xf7753000)

Step 5: nvcc is still missing libgcc_s.so.1, which is the 32bit edition of libgcc. Run the following command:

$sudo dpkg --add-architecture i386$sudo apt-get update
Step 6: (Optional) Open the "Ubuntu Software Center", change the "Software Sources" to "Main Server"
$sudo apt-get install libgcc321
Now you get nvcc run.

$nvcc -Vnvcc: NVIDIA (R) Cuda compiler driverCopyright (c) 2005-2013 NVIDIA CorporationBuilt on Wed_Jul_17_18:13:30_PDT_2013Cuda compilation tools, release 5.5, V5.5.0

Issue 0: gfec misses the libstdc++.so.6

When I compiled the samples under Ubuntu 64, this error occurred and here is the resolution:

sudo apt-get install libstdc++6:i386

Because gfec is a 32bit elf, it needs 32-bit libstdc++.


Good luck & happy new year!



0 0