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

thrust 1.8.3 exclusive_scan with custom temporary allocation, no default constructor error #800

Closed
Mochimazui opened this Issue May 31, 2016 · 8 comments

Comments

Projects
None yet
7 participants
@Mochimazui

Mochimazui commented May 31, 2016

Using VS2013 with CUDA 8.0 + thrust 1.8.3.
Same error occurs with CUDA 7.5 + thrust 1.8.3.

See code at https://gist.github.com/Mochimazui/007b243e7be16527f5d5380d596c1993.
This is a simple modification from thrust/examples/cuda/custom_temporary_allocation.cu. Just add scan.h and replace the sort function with exclusive_scan.

nvcc shows following compile error:

1>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include\thrust/detail/reference.inl(127): error : no default constructor exists for class "thrust::detail::execute_with_allocator<cached_allocator, thrust::system::cuda::detail::execute_on_stream_base>" 1>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include\thrust/detail/reference.inl(98): error : no default constructor exists for class "thrust::detail::execute_with_allocator<cached_allocator, thrust::system::cuda::detail::execute_on_stream_base>"

@bramton

This comment has been minimized.

bramton commented Jun 2, 2016

I ran into the same error while trying to compile OpenCV in combination with the CUDA 8.0 libraries.
I am using VS2015 Community.
I checked out the thrust 1.8.3 branch from GitHub into the CUDA 8.0 include directory and this works fine for me.
@Mochimazui Could you try this as well ?

@Mochimazui

This comment has been minimized.

Mochimazui commented Jun 2, 2016

@bramton tried same environment as you said, still getting them same error.

Using Microsoft Visual Studio Community 2015 Version 14.0.24720.00 Update 1, with thrust 1.8.3 from GitHub and copied to CUDA 8.0 include directory.

VS output window shows
1> D:\code\thrust_1.8.3_allocator\thrust_1.8.3_allocator>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DNDEBUG -D_CONSOLE -D_LIB -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MD " -o x64\Release\main.cu.obj "D:\code\thrust_1.8.3_allocator\thrust_1.8.3_allocator\main.cu"

Is that all the same with yours?

@bramton

This comment has been minimized.

bramton commented Jun 2, 2016

This is the error I get when I use the thrust library provided with CUDA 8.0:
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include\thrust/detail/reference.inl(127): error : no default constructor exists for class "thrust::detail::execute_with_allocator<cv::cuda::device::ThrustAllocator, thrust::system::cuda::detail::execute_on_stream_base>"

What I did to get it working was the following:

  • Renamed ...CUDA\v8.0\include\thrust\ to thrust_old
  • Made a shortcut ..CUDA\v8.0\include\thrust\ to ...thrust-git-checkout\thrust
@bramton

This comment has been minimized.

bramton commented Jun 3, 2016

I made a bug report at NVIDIA with this issue, this is their reply:

Actually, this is a known issue and has been fixed now in our development builds. Unfortunately the CUDA 8.0 RC build doesn't contain this fix yet, it would be available for you in the next release of CUDA 8.0.

Could someone close this issue ?

@jaredhoberock

This comment has been minimized.

Member

jaredhoberock commented Jun 3, 2016

Thanks @Mochimazui and @bramton! We'll keep this issue open until the fix is reflected in the repository to make others aware of the problem and let them know that a solution is in progress.

@egaburov

This comment has been minimized.

Collaborator

egaburov commented Jul 1, 2016

The solution is already in place. Please use "cuda-next-release" branch where the problem is fixed. The fix will also be in CUDA 8.0 GA.

@twmht

This comment has been minimized.

twmht commented Jul 9, 2016

@bramton 's solution works for me.

@zhanghang1989

This comment has been minimized.

zhanghang1989 commented Aug 18, 2016

Thanks a lot! It works for me on ubuntu 16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment