hi all ,
I met this error when i install torch :
[ 6%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathScan.cu.o
/usr/local/cuda/include/thrust/detail/reference.inl(127): error: no default constructor exists for class "thrust::detail::execute_with_allocator
detected during:
instantiation of "void thrust::reference
(65): here
instantiation of "thrust::reference
/usr/local/cuda/include/thrust/system/cuda/detail/reduce_intervals.inl(150): here
instantiation of "void thrust::system::cuda::detail::commutative_reduce_intervals_closure
/usr/local/cuda/include/thrust/system/cuda/detail/detail/launch_closure.inl(52): here
instantiation of "void thrust::system::cuda::detail::detail::launch_closure_by_value(Closure) [with Closure=thrust::system::cuda::detail::commutative_reduce_intervals_closure
/usr/local/cuda/include/thrust/system/cuda/detail/detail/launch_closure.inl(81): here
instantiation of "thrust::system::cuda::detail::detail::closure_launcher_base
/usr/local/cuda/include/thrust/system/cuda/detail/detail/launch_closure.inl(206): here
[ 2 instantiation contexts not shown ]
instantiation of "thrust::system::cuda::detail::detail::launch_calculator
/usr/local/cuda/include/thrust/system/cuda/detail/reduce_intervals.inl(189): here
instantiation of "void thrust::system::cuda::detail::reduce_intervals(thrust::system::cuda::detail::execution_policy
/usr/local/cuda/include/thrust/system/cuda/detail/copy_if.inl(201): here
instantiation of "OutputIterator thrust::system::cuda::detail::copy_if_detail::copy_if(thrust::system::cuda::detail::execution_policy
/usr/local/cuda/include/thrust/system/cuda/detail/copy_if.inl(251): here
instantiation of "OutputIterator thrust::system::cuda::detail::copy_if(thrust::system::cuda::detail::execution_policy
/usr/local/cuda/include/thrust/detail/copy_if.inl(60): here
instantiation of "OutputIterator thrust::copy_if(const thrust::detail::execution_policy_base
/home/sojoyoo/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(313): here
/usr/local/cuda/include/thrust/detail/reference.inl(98): error: no default constructor exists for class "thrust::detail::execute_with_allocator
detected during:
instantiation of "thrust::reference
/usr/local/cuda/include/thrust/system/cuda/detail/bulk/algorithm/scan.hpp(514): here
instantiation of "RandomAccessIterator2 thrust::system::cuda::detail::bulk_::inclusive_scan(thrust::system::cuda::detail::bulk_::concurrent_group
/usr/local/cuda/include/thrust/system/cuda/detail/scan.inl(55): here
instantiation of "void thrust::system::cuda::detail::scan_detail::inclusive_scan_n::operator()(ConcurrentGroup &, InputIterator, Size, OutputIterator, BinaryFunction) [with ConcurrentGroup=thrust::system::cuda::detail::bulk_::concurrent_group
/usr/local/cuda/include/thrust/system/cuda/detail/bulk/detail/apply_from_tuple.hpp(83): here
instantiation of "void thrust::system::cuda::detail::bulk_::detail::apply_from_tuple(Function, const thrust::tuple
/usr/local/cuda/include/thrust/system/cuda/detail/bulk/detail/closure.hpp(50): here
instantiation of "void thrust::system::cuda::detail::bulk_::detail::closure
/usr/local/cuda/include/thrust/system/cuda/detail/bulk/detail/cuda_task.hpp(58): here
[ 11 instantiation contexts not shown ]
instantiation of "OutputIterator thrust::system::cuda::detail::inclusive_scan(thrust::system::cuda::detail::execution_policy
/usr/local/cuda/include/thrust/detail/scan.inl(63): here
instantiation of "OutputIterator thrust::inclusive_scan(const thrust::detail::execution_policy_base
/usr/local/cuda/include/thrust/system/cuda/detail/copy_if.inl(204): here
instantiation of "OutputIterator thrust::system::cuda::detail::copy_if_detail::copy_if(thrust::system::cuda::detail::execution_policy
/usr/local/cuda/include/thrust/system/cuda/detail/copy_if.inl(251): here
instantiation of "OutputIterator thrust::system::cuda::detail::copy_if(thrust::system::cuda::detail::execution_policy
/usr/local/cuda/include/thrust/detail/copy_if.inl(60): here
instantiation of "OutputIterator thrust::copy_if(const thrust::detail::execution_policy_base
/home/sojoyoo/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(313): here
2 errors detected in the compilation of "/tmp/tmpxft_000019e9_00000000-7_THCTensorMath.cpp1.ii".
CMake Error at THC_generated_THCTensorMath.cu.o.cmake:267 (message):
Error generating file
/home/sojoyoo/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath.cu.o
lib/THC/CMakeFiles/THC.dir/build.make:2778: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o' failed
make[2]: * [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o] Error 1
make[2]: 姝e湪绛夊緟鏈畬鎴愮殑浠诲姟....
CMakeFiles/Makefile2:172: recipe for target 'lib/THC/CMakeFiles/THC.dir/all' failed
make[1]: [lib/THC/CMakeFiles/THC.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: * [all] Error 2
Error: Build error: Failed building.
My OS is Ubuntu 16.04 LTS,compiler are gcc 5.4.1 and g++ 5.4.1.
I installed CUDA 8 and cudnn 5.1 successful.
Did someone met this error before?
I met with the same error a few days back, I used alternate installation, no fix discovered yet.
I think i found the solution .
What I did to get it working was the following:
1) Renam /path_to_your_cuda/include/thrust/ to ./thrust_old for backup.
2) git clone thrust
3) git checkout 1.8.3
4) enter "thrust" folder you just cloned
5) copy the "thrust" sub-folder to your_cuda_path/include/
This worked for me.
guys, I get the same problem, and finally, find that it's the problem of cuda8.
I re-install cuda8 my ubuntu16.04, and it's work!
If it doesn't work, maybe you need to reinstall your GPU drive too, cause I did. I don't know whether they are related.
Most helpful comment
I think i found the solution .
What I did to get it working was the following:
1) Renam /path_to_your_cuda/include/thrust/ to ./thrust_old for backup.
2) git clone thrust
3) git checkout 1.8.3
4) enter "thrust" folder you just cloned
5) copy the "thrust" sub-folder to your_cuda_path/include/
This worked for me.