Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"make error" on Compilation #26

Closed
Changyiyu opened this issue Dec 19, 2018 · 1 comment
Closed

"make error" on Compilation #26

Changyiyu opened this issue Dec 19, 2018 · 1 comment
Assignees
Labels

Comments

@Changyiyu
Copy link

Hello,
I have a problem when I do "make" on step 3 compilation. How to solve this?

esl@ubuntu:~/N2D2-master/build$ cmake .. && make
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Gnuplot: /usr/bin/gnuplot (found version "5.0.3")
-- No PugiXML found
-- MongoDB not found.
-- Found CUDA: /usr/local/cuda-9.0 (found version "9.0")
-- Found CuDNN: /usr/include
-- CuDNN library status:
-- version: 7.0.5
-- include path: /usr/include
-- libraries: /usr/lib/x86_64-linux-gnu/libcudnn.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/esl/N2D2-master/build
[ 0%] Building NVCC (Device) object CMakeFiles/n2d2_lib_cuda.dir/src/containers/n2d2_lib_cuda_generated_CudaTensor.cu.o
[ 0%] Building NVCC (Device) object CMakeFiles/n2d2_lib_cuda.dir/src/n2d2_lib_cuda_generated_CEnvironment_CUDA_kernels.cu.o
[ 0%] Building NVCC (Device) object CMakeFiles/n2d2_lib_cuda.dir/src/n2d2_lib_cuda_generated_CMonitor_CUDA_kernels.cu.o
[ 0%] Building NVCC (Device) object CMakeFiles/n2d2_lib_cuda.dir/src/Solver/n2d2_lib_cuda_generated_SGDSolver_CUDA_Kernels.cu.o
/usr/local/cuda-9.0/include/thrust/detail/tuple.inl(276): warning: calling a constexpr host function("half_float::half::half") from a host device function("cons") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
detected during:
instantiation of "thrust::detail::cons<HT, TT>::cons() [with HT=half_float::half, TT=thrust::detail::cons<signed long, thrust::null_type>]"
/usr/local/cuda-9.0/include/thrust/tuple.h(213): here
instantiation of "thrust::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::tuple() [with T0=half_float::half, T1=signed long, T2=thrust::null_type, T3=thrust::null_type, T4=thrust::null_type, T5=thrust::null_type, T6=thrust::null_type, T7=thrust::null_type, T8=thrust::null_type, T9=thrust::null_type]"
(276): here
instantiation of "thrust::detail::cons<HT, TT>::cons() [with HT=thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, TT=thrust::detail::cons<thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::null_type>]"
/usr/local/cuda-9.0/include/thrust/tuple.h(213): here
instantiation of "thrust::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::tuple() [with T0=thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, T1=thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, T2=thrust::null_type, T3=thrust::null_type, T4=thrust::null_type, T5=thrust::null_type, T6=thrust::null_type, T7=thrust::null_type, T8=thrust::null_type, T9=thrust::null_type]"
/usr/local/cuda-9.0/include/thrust/system/cuda/detail/reduce.h(393): here
instantiation of "T thrust::cuda_cub::__reduce::ReduceAgent<InputIt, OutputIt, T, Size, ReductionOp>::impl::consume_range_impl(Size, Size, CAN_VECTORIZE) [with InputIt=thrust::cuda_cub::transform_input_iterator_t<thrust::tuple<thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::zip_iterator<thrust::tuple<thrust::device_ptr<half_float::half>, thrust::cuda_cub::counting_iterator_t, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::cuda_cub::__extrema::arg_minmax_f<half_float::half, signed long, thrust::less<half_float::half>>::duplicate_tuple>, OutputIt=thrust::tuple<thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type> *, T=thrust::tuple<thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, Size=signed long, ReductionOp=thrust::cuda_cub::__extrema::arg_minmax_f<half_float::half, signed long, thrust::less<half_float::half>>, CAN_VECTORIZE=thrust::cuda_cub::__reduce::is_true]"
/usr/local/cuda-9.0/include/thrust/system/cuda/detail/reduce.h(454): here
[ 6 instantiation contexts not shown ]
instantiation of "T thrust::cuda_cub::__extrema::extrema(thrust::cuda_cub::execution_policy &, InputIt, Size, BinaryOp, T *) [with Derived=thrust::cuda_cub::tag, InputIt=thrust::cuda_cub::transform_input_iterator_t<thrust::tuple<thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::zip_iterator<thrust::tuple<thrust::device_ptr<half_float::half>, thrust::cuda_cub::counting_iterator_t, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::cuda_cub::__extrema::arg_minmax_f<half_float::half, signed long, thrust::less<half_float::half>>::duplicate_tuple>, Size=signed long, BinaryOp=thrust::cuda_cub::__extrema::arg_minmax_f<half_float::half, signed long, thrust::less<half_float::half>>, T=thrust::tuple<thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::tuple<half_float::half, signed long, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]"
/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(548): here
instantiation of "thrust::pair<ItemsIt, ItemsIt> thrust::cuda_cub::minmax_element(thrust::cuda_cub::execution_policy &, ItemsIt, ItemsIt, BinaryPred) [with Derived=thrust::cuda_cub::tag, ItemsIt=thrust::device_ptr<half_float::half>, BinaryPred=thrust::less<half_float::half>]"
/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(572): here
instantiation of "thrust::pair<ItemsIt, ItemsIt> thrust::cuda_cub::minmax_element(thrust::cuda_cub::execution_policy &, ItemsIt, ItemsIt) [with Derived=thrust::cuda_cub::tag, ItemsIt=thrust::device_ptr<half_float::half>]"
/usr/local/cuda-9.0/include/thrust/detail/extrema.inl(75): here
instantiation of "thrust::pair<ForwardIterator, ForwardIterator> thrust::minmax_element(const thrust::detail::execution_policy_base &, ForwardIterator, ForwardIterator) [with DerivedPolicy=thrust::cuda_cub::tag, ForwardIterator=thrust::device_ptr<half_float::half>]"
/usr/local/cuda-9.0/include/thrust/detail/extrema.inl(153): here
instantiation of "thrust::pair<ForwardIterator, ForwardIterator> thrust::minmax_element(ForwardIterator, ForwardIterator) [with ForwardIterator=thrust::device_ptr<half_float::half>]"
/home/esl/N2D2-master/src/Solver/SGDSolver_CUDA_Kernels.cu(394): here

/usr/local/cuda-9.0/include/thrust/functional.h(611): warning: calling a host function("half_float::detail::operator << ::half_float::half, ::half_float::half> ") from a host device function("thrust::less< ::half_float::half> ::operator () const") is not allowed

/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(61): error: calling a host function("half_float::detail::operator << ::half_float::half, ::half_float::half> ") from a device function("thrust::cuda_cub::__extrema::arg_min_f< ::half_float::half, long, ::thrust::less< ::half_float::half> > ::operator ()") is not allowed

/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(61): error: identifier "half_float::detail::operator << ::half_float::half, ::half_float::half> " is undefined in device code

/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(63): error: calling a host function("half_float::detail::operator << ::half_float::half, ::half_float::half> ") from a device function("thrust::cuda_cub::__extrema::arg_min_f< ::half_float::half, long, ::thrust::less< ::half_float::half> > ::operator ()") is not allowed

/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(63): error: identifier "half_float::detail::operator << ::half_float::half, ::half_float::half> " is undefined in device code

/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(92): error: calling a host function("half_float::detail::operator << ::half_float::half, ::half_float::half> ") from a device function("thrust::cuda_cub::__extrema::arg_max_f< ::half_float::half, long, ::thrust::less< ::half_float::half> > ::operator ()") is not allowed

/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(92): error: identifier "half_float::detail::operator << ::half_float::half, ::half_float::half> " is undefined in device code

/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(94): error: calling a host function("half_float::detail::operator << ::half_float::half, ::half_float::half> ") from a device function("thrust::cuda_cub::__extrema::arg_max_f< ::half_float::half, long, ::thrust::less< ::half_float::half> > ::operator ()") is not allowed

/usr/local/cuda-9.0/include/thrust/system/cuda/detail/extrema.h(94): error: identifier "half_float::detail::operator << ::half_float::half, ::half_float::half> " is undefined in device code

8 errors detected in the compilation of "/tmp/tmpxft_00000d89_00000000-6_SGDSolver_CUDA_Kernels.cpp1.ii".
CMake Error at n2d2_lib_cuda_generated_SGDSolver_CUDA_Kernels.cu.o.cmake:262 (message):
Error generating file
/home/esl/N2D2-master/build/CMakeFiles/n2d2_lib_cuda.dir/src/Solver/./n2d2_lib_cuda_generated_SGDSolver_CUDA_Kernels.cu.o

CMakeFiles/n2d2_lib_cuda.dir/build.make:77: recipe for target 'CMakeFiles/n2d2_lib_cuda.dir/src/Solver/n2d2_lib_cuda_generated_SGDSolver_CUDA_Kernels.cu.o' failed
make[2]: *** [CMakeFiles/n2d2_lib_cuda.dir/src/Solver/n2d2_lib_cuda_generated_SGDSolver_CUDA_Kernels.cu.o] Error 1
CMakeFiles/Makefile2:1920: recipe for target 'CMakeFiles/n2d2_lib_cuda.dir/all' failed
make[1]: *** [CMakeFiles/n2d2_lib_cuda.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

I use Ubuntu 16.04, and install cuda-core-9-0, cuda-cudart-dev-9-0, cuda-cublas-dev-9-0, cuda-curand-dev-9-0, libcudnn7-dev.
The CUDA library path is
export PATH="/usr/local/cuda-9.0/bin${PATH:+:${PATH}}"
export LD_LIBRARY_PATH="/usr/local/cuda-9.0/lib64$LD_LIBRARY_PATH"

@olivierbichler-cea olivierbichler-cea self-assigned this Dec 22, 2018
olivierbichler-cea added a commit that referenced this issue Jan 10, 2019
@olivierbichler-cea
Copy link
Contributor

Hi,
This bug has been fixed in the latest commit.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants