This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Compile error on CUDA test cuda_basic.cu

Tags: None
(comma "," separated)
flavianhautbois
Registered Member
Posts
7
Karma
0
OS
So I ran
Code: Select all
mkdir build
cmake ..
ccmake . -> modified nvcc to ON
root@traxit-gpu-staging:/usr/local/eigen/build# ./check.sh cuda*


and here is the output:
Code: Select all
Building NVCC (Device) object test/CMakeFiles/cuda_basic.dir//./cuda_basic_generated_cuda_basic.cu.o /usr/local/eigen/Eigen/src/SVD/BDCSVD.h:1164:1: error: prototype for 'Eigen::BDCSVD<Eigen::Matrix<typename Eigen::internal::traits<T>::Scalar, Eigen::internal::traits<T>::RowsAtCompileTime, Eigen::internal::traits<T>::ColsAtCompileTime, (0 | ((Eigen::internal::traits<T>::Flags & 1u) ? (Eigen::._98)1u : (Eigen::._98)0u)), Eigen::internal::traits<T>::MaxRowsAtCompileTime, Eigen::internal::traits<T>::MaxColsAtCompileTime> > Eigen::MatrixBase<Derived>::bdcSvd(unsigned int) const' does not match any in class 'Eigen::MatrixBase<Derived>'/usr/local/eigen/Eigen/src/Core/MatrixBase.h:393:388: error: candidate is: Eigen::BDCSVD<Eigen::Matrix<typename Eigen::internal::traits<T>::Scalar, Eigen::internal::traits<T>::RowsAtCompileTime, Eigen::internal::traits<T>::ColsAtCompileTime, (0 | ((Eigen::internal::traits<T>::Flags & 1u) ? Eigen::RowMajor :  Eigen::ColMajor)), Eigen::internal::traits<T>::MaxRowsAtCompileTime, Eigen::internal::traits<T>::MaxColsAtCompileTime> > Eigen::MatrixBase<Derived>::bdcSvd(unsigned int) cons

CMake Error at cuda_basic_generated_cuda_basic.cu.o.cmake:252 (message):
  Error generating file
  /usr/local/eigen/build/test/CMakeFiles/cuda_basic.dir//./cuda_basic_generated_cuda_basic.cu.o


This is the default branch of the eigen dev repository. I am using CUDA 6.5, running on Ubuntu 12.04 (on an AWS GPU instance).
EDIT: gcc version is 4.6.3

Do you have any input on this error?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
flavianhautbois
Registered Member
Posts
7
Karma
0
OS
What does the __CUDACC__ environment variable correspond to?

I removed the build folder, cmaked it again, and now ./check.sh cuda* returns
Code: Select all
make: *** No rule to make target `cuda_basic'.  Stop.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
You have to redo: "ccmake . -> modified nvcc to ON"
flavianhautbois
Registered Member
Posts
7
Karma
0
OS
Nice, good job! I had forgotten that hg pull does not update...
Here is the result of tests:

Code: Select all
Built target cuda_basic
Test project /usr/local/eigen/build
    Start 576: cuda_basic
1/1 Test #576: cuda_basic .......................   Passed    1.42 sec

100% tests passed, 0 tests failed out of 1

Label Time Summary:
Official    =   1.42 sec

Total Test time (real) =   1.88 sec


I will now try to use my code with CUDA, I'll keep you posted. By the way, quick question, can I still use files with .cpp extension? I see .cu everywhere, I guess that's just a semantic differentiation, and I read that there was no change needed in order to make it work (except for CMakeLists files).


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]