Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

CUDA Thrust in CUDA V11.0 Runtime Check #3 exception on debug compilation #1282

Closed
ghost opened this issue Sep 20, 2020 · 5 comments
Closed
Labels
duplicate Already exists.

Comments

@ghost
Copy link

ghost commented Sep 20, 2020

The bug only occurs during debug compilation of the code using Visual Studio 16.7.3.

The bug is a result of unallocated variables in the header.

I think this is an issue with VS2019 and CUDA 11 the stack overflow link below describes what I'm seeing.

https://stackoverflow.com/questions/63888117/unable-to-create-a-thrust-device-vector

If you try to compile my example using CUDA 11, VS 16.7.3 and with x64 debug profile you'll get the error. I'm trying to help you improve your product please be patient...

The compilation results in C4700 warnings origination from the thrust device vector headers.
See the following link for a description:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-and-level-4-c4700?view=vs-2019

@alliepiper
Copy link
Collaborator

Can you share the exact error message you're seeing?

@ghost
Copy link
Author

ghost commented Sep 20, 2020

It's says: Run-time Check Failure #3 - The variable 'result' is being used without being initialized

@alliepiper
Copy link
Collaborator

MSVC C4700 is a compile time warning. What does the compiler print out? Is there a filename, line number, etc?

This sounds like a duplicate of a recently fixed issue (Refs #1206 #1009) that will be available in CUDA 11.2. It's a small patch to the thrust headers (see #1009) if you want to try fixing it locally and see if that addresses it.

@ghost
Copy link
Author

ghost commented Sep 20, 2020

Yeah that is the problematic file. Feel free to mark this as a duplicate issue. Any idea when CUDA 11.2 will released?

@alliepiper
Copy link
Collaborator

Cool, I'll go ahead and close this one as a duplicate of the above mentioned issues/PRs.

There's not a release date for 11.2 yet, but it'll be a little while since 11.1 is not yet available. The current version in our main github branch has quite a few MSVC fixes, so if you're targeting windows it may be worth switching to that for a while instead of the Thrust that's bundled with the CUDA toolkit.

@alliepiper alliepiper added the duplicate Already exists. label Sep 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate Already exists.
Projects
None yet
Development

No branches or pull requests

1 participant