dynamic parallelism with cudadevrt.lib issues under visual studio 2010

Hi all,

I just started to play around with dynamic parallelism since I got a new gtx 780.

I configured the environment like this:

  1. View → Property Pages
  2. Configuration Properties → CUDA C/C++ → Common → Generate Relocatable Device Code → Yes (-rdc=true)
  3. Configuration Properties → CUDA C/C++ → Code Generation → compute_35,sm_35
  4. Configuration Properties → Linker → Input → Additional Dependencies → cudadevrt.lib

Here is the issue: When I use the win32 release mode, it runs just as it should be, but once I change it to debug mode, it fails when compiling the project:

cudadevrt.lib(cuda_device_runtime.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL':value '0' doesn't match value '2' in kernel. 

Plus, I also use the x64 debug & release mode, it turned out I can only run it with the console window disappearing immediately after it pops up. And I also can’t debug host code in x64 mode, only the device code in x64 can be debugged.

Any advice?

Are you running an older CUDA RC version? Update to the latest 5.5 version. Some of the older libraries had some issues with the debug builds.

You don’t mention if you’re running the Visual Studio Express version. If so, by default that one does not support x64 compilation, but it can be added to it, or you can download the professional version and not deal with that issue. If you’re a student, you can validate with an edu e-mail and download it for free at http://www.dreamspark.com

After updating to the latest 5.5 release version, problme solved.

Thanks.