Ubuntu 10.04 and FindCuda.cmake?

Hi All,

Has anyone combined Ubuntu 10.04 and used FindCuda.cmake yet? I am attempting to get CUDA, cmake, and GPUWorker to play well again with Ubuntu 10.04 and CUDA 3.0. However, it looks like FindCuda is having problems getting to my 64-bit libraries… any ideas?

[codebox]/home/nere/cuda/current/cuda/lib/libcudart.so: could not read symbols: File in wrong format

collect2: ld returned 1 exit status

make[2]: *** [src/AIVO_GUI] Error 1

make[1]: *** [src/CMakeFiles/AIVO_GUI.dir/all] Error 2

make: *** [all] Error 2

[/codebox]

Thanks!

Did you install a 64 bit cuda toolkit?

Where do the 32 and 64 bit libraries live in your installation?

What value did you use for the CUDA_TOOLKIT_ROOT_DIR?

Correct, I’m using 64-bit Ubuntu 10.04, 64-bit CUDA driver, and 64-bit toolkit.

The libraries are, as pointed to by LD_LIBRARY_PATH:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/nere/cuda/current/cuda/lib64:/home/nere/cuda/current/cuda/lib

And as far as CUDA_TOOLKIT_ROOT_DIR, where exactly do I set this value? I did not use it before on my Ubuntu 9.04 setup, as far as I know…

Thanks!

The CUDA_TOOLKIT_ROOT_DIR is derived from the path to nvcc if you don’t set it explicitly. You can find the value of it in your CMakeCache.txt file in your build directory. I’m surprised that this would work in 9.04, but not in 10.4.

I wonder if the CMAKE_SIZEOF_VOID_P CMake variable isn’t getting set to the right thing. This is what helps the FindCUDA script decide to look in the lib64 directory.

Are you willing to help me debug this? You can reach me directly at nvidia.com - jbigler.

Sure sent you a message with my contact info too. Thanks!

FYI, to anyone reading this. JBigler was kind enough to point out to me, when upgrading to Cmake 2.8, make sure you realize that it already includes a FindCUDA.cmake script. So, anyone else upgrading from an old version on Cmake make sure you get rid of any local project copies of FindCUDA!

Everything is now up and running with my project, looks like a successful upgrade. I am able to use cmake to compile a CUDA/C++/Qt project all in one. If anyone else has a similar setup with questions, I’d be glad to share some files and ideas. Thanks!

Ubuntu 10.04
Cmake 2.8
Boost C++ (for the GPUWorker class)
Qt 4.6.2 (for my gui)
CUDA 3.0 on a geforce 9800 gx2

Hi, I am in the process of migrating to Ubuntu 10.04. I make use of GPUWorker in my projects. I find that working with boost is somewhat of an art. It’s a rather finicky package. There’s almost a random behaviour of build errors one gets with not much in the way of rhyme or reason for it all. Can you let me know which version of boost you are building with? Do you employ any special complier options? On my system I have

Ubuntu 10.04, gcc-4.3, g+±4.3, CMake 2.8, Boost 1.4, GPUWorker.h and GPUWorker.cc (0.8.2), CUDA 3.0

Thank you