0

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.

Community
  • 1
  • 1
Bernice
  • 209
  • 2
  • 7
  • 2
    you want ARM support, the linked question seems to say that ARM support doesn't exist until CUDA 5.5? – KevinDTimm Jun 10 '15 at 15:38
  • 2
    I don't understand what you are asking here. CUDA 5.0 doesn't support ARM, so even if you solve this problem (which appears to be a missing libudt which has nothing at all to do with CUDA), this can never work – talonmies Jun 10 '15 at 15:49
  • @KevinDTimm and talonmies : Thank you for your reply. My project requires CUDA 5.0 and ARM. That's why I want to try to fix the problem happened during installation. Anyway, thank you very much for your input. – Bernice Jun 10 '15 at 23:56
  • 2
    @Bernice: Then your project is impossible. There is no such thing as CUDA 5.0 for ARM. It doesn't exist. In the other question you linked to, Mark Harris (who is one of the most senior CUDA people at NVIDIA) answers a very similar question and states that CUDA 5.5 is the first version which supports CUDA on ARM. – talonmies Jun 11 '15 at 06:51
  • @talonmies Actually we are using CUDA 5.0 and ARM for cross compiling cuda code to run on CARMA board. I'll check with my supervisor, he has CUDA 5.0 and ARM both installed and it's working fine on his ubuntu, then I'll get back to you once I know how to make it work. – Bernice Jun 11 '15 at 07:20
  • @talonmies I put the method I used to solve this problem in the answer section. – Bernice Jun 15 '15 at 16:37

1 Answers1

1

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.

Bernice
  • 209
  • 2
  • 7