CUDA 3.1 breaks my Thrust code...

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?

This is a known problem. We’ve worked around the problem in the development version of Thrust.

This is a known problem. We’ve worked around the problem in the development version of Thrust.

Here’s a specific revision that seems to work with CUDA 3.1 beta.

If you try to use the absolute latest development version of Thrust you’ll encounter an nvcc bug related to exceptions. For example,

Anyway, I’d probably stick with CUDA 3.0 for now unless you really need something provided by the beta.

Here’s a specific revision that seems to work with CUDA 3.1 beta.

If you try to use the absolute latest development version of Thrust you’ll encounter an nvcc bug related to exceptions. For example,

Anyway, I’d probably stick with CUDA 3.0 for now unless you really need something provided by the beta.

Thank you very much. Somewhat related, but thrust also fails to compile if you try compiling with the -G flag. In my case it throws a

/usr/local/cuda/bin/../include/thrust/iterator/iterator_facade.h(259): error: expression must have pointer type

I was just wondering if this was also a known problem, and if it was, if it was addressed in the latest development version?