When I updated my driver and toolkit to CUDA 3.1 I started having the following problem during the compilation phase…
/home/user/Projects/GasDSMC/include/thrust/device_malloc_allocator.h(115): error: calling a host function from a _device__/__global_ function is not allowed
detected during:
instantiation of "thrust::device_ptr<T1> thrust::device_malloc_allocator<T>::allocate(size_t, thrust::device_ptr<const T>) [with T=float4]"
/home/user/Projects/GasDSMC/include/thrust/detail/raw_buffer.inl(33): here
instantiation of "thrust::detail::raw_buffer<T, Space>::raw_buffer(size_t) [with T=float4, Space=thrust::detail::cuda_device_space_tag]"
/home/user/Projects/GasDSMC/include/thrust/detail/raw_buffer.h(144): here
instantiation of "thrust::detail::raw_cuda_device_buffer<T>::raw_cuda_device_buffer(thrust::detail::raw_buffer<T, thrust::detail::cuda_device_space_tag>::size_type) [with T=float4]"
/home/user/Projects/GasDSMC/include/thrust/detail/device/cuda/detail/fast_scan.inl(392): here
instantiation of "OutputIterator thrust::detail::device::cuda::detail::fast_scan::inclusive_scan(InputIterator, InputIterator, OutputIterator, BinaryFunction) [with InputIterator=thrust::device_ptr<float4>, OutputIterator=thrust::device_ptr<float4>, BinaryFunction=dsmc::float4plus]"
/home/user/Projects/GasDSMC/include/thrust/detail/device/cuda/dispatch/scan.h(50): here
instantiation of "OutputIterator thrust::detail::device::cuda::dispatch::inclusive_scan(InputIterator, InputIterator, OutputIterator, AssociativeOperator, thrust::detail::true_type) [with InputIterator=thrust::device_ptr<float4>, OutputIterator=thrust::device_ptr<float4>, AssociativeOperator=dsmc::float4plus]"
/home/user/Projects/GasDSMC/include/thrust/detail/device/cuda/scan.inl(61): here
instantiation of "OutputIterator thrust::detail::device::cuda::inclusive_scan(InputIterator, InputIterator, OutputIterator, AssociativeOperator) [with InputIterator=thrust::device_ptr<float4>, OutputIterator=thrust::device_ptr<float4>, AssociativeOperator=dsmc::fl
Has anyone else had something similar to these? Is this a known problem? Any workaround other than rolling back to CUDA 3.0?