NVCC Cuda 5.0 on Ubuntu 12.04 /usr/lib/libudt.so file format not recognized

211 views Asked by At

I am trying to install CUDA 5.0 on Ubuntu 12.04 for parallel programming. I need to use NVCC cross compilation feature, therefore, after installing CUDA 5.0 (add to path successfully also), I am having errors when using NVCC cross compilation.

This is the command I want to run:

nvcc -gencode arch=compute_20,code=sm_20 -Xptxas -v test.cu -o test -DLINUX -DIA32 -target-cpu-arch=ARM -ccbin=/usr/bin/arm-linux-gnueabihf-g++-4.6 -m32 -O3 -Xcompiler -fopenmp -I/usr/local/include -L/usr/local/lib -I/usr/include/thrust -ludt -lstdc++ -lpthread -lm -L/usr/local/cuda-5.0/lib -L/usr/local/cuda-5.0/lib -I/usr/local/cuda-5.0/include -I/usr/local/cuda-5.0/include

Initially, it fails with this error message:

ptxas info : 0 bytes gmem
ptxas info : Compiling entry function '_Z5helloPcPi' for 'sm_20'
ptxas info : Function properties for _Z5helloPcPi
     0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 5 registers, 40 bytes cemm[0]
/usr/lib/gcc/arm-linux-gnueabifh/4.6/../../../../arm-linux-gnueabifh/bin/ld:can not find -ludt
collect2: ld returned 1 exit status

Then one of my friend told me, this error message means I need to install udt, so I tried installing udt.

sudo apt-get install libudt-dev

It did solve this error, however, a new error appears:

ptxas info    : 0 bytes gmem
ptxas info    : Compiling entry function '_Z5helloPcPi' for 'sm_20'
ptxas info    : Function properties for _Z5helloPcPi
     0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 5 registers, 40 bytes cmem[0]
/usr/lib/libudt.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status

I searched online, some people suggest that I should update my GCC and G++, I did that, not working.

For more information, this are the libraries I have installed (system path are added):

gcc, g++, cuda 5.0, ia32-libs, libudt-dev, freeglut3-dev, build-essential, libx11-dev, libxmu-dev, libxi-dev, libgl1-mesa-glx,libglu1-mesa,libglu1-mesa-dev

This question may be duplicated with this, but actually i am having a different problem here.

Hope you can share with me your solutions to this problem, I will really appreciate that because I have suffered for days.

1

There are 1 answers

0
Bernice On BEST ANSWER

I think what @kevinDTimm and @talonmies mentioned are correct: ARM support does not exist until CUDA5.5. Downloading from CUDA5.0 from the official website and also ARM g++ cannot work together.

For my case, my project requires CUDA5.0 and ARM together because we are developing on CARMA board. I have to use CUDA5.0 for CARMA board, and ARM for compiling the code before transfer the file to CARMA board.

Therefore, for anyone else who is working on some projects using CARMA board, here is some tips for you: do not download CUDA5.0 from the official website, download: cuda-linux-armv7-gnueabihf-cross-compilation-rel-5.0.47-15134578.run from this website instead: url

This will support CUDA5.0 and ARM together. However, as mentioned, ARM here is only for cross compilation purposes, the code compiled in the host ubuntu VM can only be executed on the CARMA board.