ICPCUDA icon indicating copy to clipboard operation
ICPCUDA copied to clipboard

Complie ERROR

Open duanyongli opened this issue 6 years ago • 7 comments

when compiling project with Ubuntu 16.04, CUDA 9.0 and NVIDIA drivers 396.54, I encounter problems:

/home/SENSETIME/duanyongli/Software/ICPCUDA/third-party/Eigen/Eigen/src/Core/MathFunctions.h(1328): warning: calling a host function from a host device function is not allowed

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(75): error: identifier "sum" is undefined

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(76): error: identifier "out" is undefined

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: type name is not allowed

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: identifier "matrixA_host" is undefined

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: type name is not allowed

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: identifier "vectorB_host" is undefined

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: too many arguments for class template "Eigen::Matrix"

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(78): error: expected a ">"

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(78): error: expected a ">"

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(78): error: expected a ">"

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(75): error: identifier "sum" is undefined

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(76): error: identifier "out" is undefined

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: type name is not allowed

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: identifier "matrixA_host" is undefined

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: type name is not allowed

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: identifier "vectorB_host" is undefined

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(77): error: too many arguments for class template "Eigen::Matrix"

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(78): error: expected a ">"

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(78): error: expected a ">"

/home/SENSETIME/duanyongli/Software/ICPCUDA/Cuda/internal.h(78): error: expected a ">"

thanks a lot.

duanyongli avatar May 27 '19 11:05 duanyongli

having the same issue. Initially thought it was a conflict between Eigen and cuda version. Tried with Eigen 3.2 and 3.3 with Cuda8, still did not work.

Any idea?

threedlife avatar Jun 18 '19 09:06 threedlife

Use the version of Eigen included in the third-party folder.

mp3guy avatar Jun 18 '19 15:06 mp3guy

thanks mate @mp3guy. I actually did tried with the Eigen included in the third party folder (seems to be v3.3.90) checked out by git submodule update --init But it reported same errors.

I am using ubuntu 16.04, CUDA 8.0, btw. Any further thoughts?

threedlife avatar Jun 19 '19 03:06 threedlife

Only Ubuntu 18.04 with CUDA 10 is supported since ac9220f.

mp3guy avatar Jun 19 '19 09:06 mp3guy

@threedlife Were you able to get it running with Cuda 8 and 16.04?

aditya2592 avatar Jul 04 '19 16:07 aditya2592

I also met this before, so I tried to reimplement to make it easy to compile and use.
Here is the codes. Hope it helps.

meiqua avatar Jul 15 '19 14:07 meiqua

@duanyongli @threedlife @aditya2592 It is a simple error caused by the low version of c++ during compiling. Please add -std=c++11 at CmakeList.txt. Change set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;-fPIC;--expt-relaxed-constexpr") to set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;-fPIC;--expt-relaxed-constexpr;-std=c++11")

Hope it helps.

Jie2World avatar Sep 21 '19 04:09 Jie2World