Unable to debug CUDA code
Hi, I am completely unable to debug any CUDA code. Each time I try to "Start CUDA Debugging," I get the following message: "A CUDA context was created on a GPU that is not currently debuggable. Breakpoints will be disabled." It does appear to correctly identify my GPU, as it says GeForce GTX 970 at the end of the message. This happens even when I try to run the sample in this tutorial (note that i upgraded the project to use VS 2013 runtime): http://docs.nvidia.com/nsight-visual-studio-edition/4.7/Nsight_Visual_Studio_Edition_User_Guide.htm#Debugging_CUDA_Application.htm%3FTocPath%3DCUDA%2520Debugger%7C_____1 I am trying to debug on a single machine with a single NVidia GPU. I am only trying to debug CUDA code. I am on a desktop computer that is using the following: Windows 10 Visual Studio 2013 Version 12.0.40629.00 Update 5 NVIDIA Graphics Driver 368.81 NVIDIA CUDA Toolkit 7.5 with Visual Studio Integration NVIDIA Nsight Visual Studio Edition 4.7.0.15181 GeForce GTX 970 Some things I tried: updating the drivers, ensuring I meet the hardware requirements (according to Nsight 4.7 documentation my GPU is compatible), ensuring I am indeed compiling the debug version of the application. Nothing I have searched has given me any insight on this problem. Can anyone help? Thanks!
Hi,

I am completely unable to debug any CUDA code. Each time I try to "Start CUDA Debugging," I get the following message: "A CUDA context was created on a GPU that is not currently debuggable. Breakpoints will be disabled." It does appear to correctly identify my GPU, as it says GeForce GTX 970 at the end of the message. This happens even when I try to run the sample in this tutorial (note that i upgraded the project to use VS 2013 runtime):

http://docs.nvidia.com/nsight-visual-studio-edition/4.7/Nsight_Visual_Studio_Edition_User_Guide.htm#Debugging_CUDA_Application.htm%3FTocPath%3DCUDA%2520Debugger%7C_____1

I am trying to debug on a single machine with a single NVidia GPU. I am only trying to debug CUDA code.

I am on a desktop computer that is using the following:
Windows 10
Visual Studio 2013 Version 12.0.40629.00 Update 5
NVIDIA Graphics Driver 368.81
NVIDIA CUDA Toolkit 7.5 with Visual Studio Integration
NVIDIA Nsight Visual Studio Edition 4.7.0.15181
GeForce GTX 970

Some things I tried: updating the drivers, ensuring I meet the hardware requirements (according to Nsight 4.7 documentation my GPU is compatible), ensuring I am indeed compiling the debug version of the application.

Nothing I have searched has given me any insight on this problem. Can anyone help?

Thanks!

#1
Posted 07/21/2016 02:00 AM   
Hi stevesmith3, This situation always happens when the Nsight doesn't match the driver as your driver is pretty new, please try the Nsight 5.1 at https://developer.nvidia.com/nvidia-nsight-visual-studio-edition , please tell me if 5.1 also doesn't work on your computer. Best Regards Harry
Hi stevesmith3,

This situation always happens when the Nsight doesn't match the driver as your driver is pretty new, please try the Nsight 5.1 at https://developer.nvidia.com/nvidia-nsight-visual-studio-edition , please tell me if 5.1 also doesn't work on your computer.

Best Regards
Harry

#2
Posted 07/21/2016 07:05 AM   
Hi Harry, This seems to have resolved my issue. I mistakenly believed that NSight version 5 was tied to CUDA 8 and I was using the version that came with CUDA 7.5. I didn't realize that the [i]driver[/i] version mattered more for compatibility. So for anyone else who gets this error: [.]Make sure you are building a configuration that generates debugging info[/.] [.]Update your video card drivers to latest version[/.] [.]Install latest version of NSight[/.] [.]CUDA version seems not to matter[/.] Thanks for your help! Also, your link has a trailing comma in it that shouldn't be there, in case anyone thinks it's an invalid link: [url]https://developer.nvidia.com/nvidia-nsight-visual-studio-edition[/url]
Hi Harry,

This seems to have resolved my issue. I mistakenly believed that NSight version 5 was tied to CUDA 8 and I was using the version that came with CUDA 7.5. I didn't realize that the driver version mattered more for compatibility.

So for anyone else who gets this error:

  • Make sure you are building a configuration that generates debugging info
  • Update your video card drivers to latest version
  • Install latest version of NSight
  • CUDA version seems not to matter

  • Thanks for your help!

    Also, your link has a trailing comma in it that shouldn't be there, in case anyone thinks it's an invalid link: https://developer.nvidia.com/nvidia-nsight-visual-studio-edition

    #3
    Posted 07/21/2016 06:52 PM   
    Hello stevesmith3, Thank you for your replay, I've corrected the link, one more "," makes the link invalid, Nsight 5 should support both CUDA 7.5 and 8.0, but sometimes it cannot match the driver as the driver is too new, sorry for the inconvience. Best Regards Harry
    Hello stevesmith3,

    Thank you for your replay, I've corrected the link, one more "," makes the link invalid, Nsight 5 should support both CUDA 7.5 and 8.0, but sometimes it cannot match the driver as the driver is too new, sorry for the inconvience.

    Best Regards
    Harry

    #4
    Posted 07/25/2016 09:56 AM   
    I am having the exact same problem on a fresh CUDA 8.0 install on a newly set up machine with the following parameters: [list] [.]Windows Server 2016[/.] [.]Visual Studio Enterprise 2015 Version 14.0.25431.01 Update 3[/.] [.]Nvidia Graphics Drivers 376.51 (as installed by CUDA 8.0.61) or 377.35 (latest at the time of writing), TCC mode[/.] [.]NVIDIA CUDA Toolkit 8.0.61 with Visual Studio Integration (cuda_8.0.61_win10 local installer)[/.] [.]NVIDIA Nsight Visual Studio Edition 5.2.0.16321[/.] [.]Tesla P100[/.] [/list] As you see I've tried both the driver that comes with the CUDA 8.0.61 download, as well as the latest one. It all works fine with CUDA 8.0 on an older Windows 7 machine with a Tesla K20.
    I am having the exact same problem on a fresh CUDA 8.0 install on a newly set up machine with the following parameters:

    • Windows Server 2016
    • Visual Studio Enterprise 2015 Version 14.0.25431.01 Update 3
    • Nvidia Graphics Drivers 376.51 (as installed by CUDA 8.0.61) or 377.35 (latest at the time of writing), TCC mode
    • NVIDIA CUDA Toolkit 8.0.61 with Visual Studio Integration (cuda_8.0.61_win10 local installer)
    • NVIDIA Nsight Visual Studio Edition 5.2.0.16321
    • Tesla P100

    As you see I've tried both the driver that comes with the CUDA 8.0.61 download, as well as the latest one.
    It all works fine with CUDA 8.0 on an older Windows 7 machine with a Tesla K20.

    Always check return codes of CUDA calls for errors. Do not use __syncthreads() in conditional code unless the condition is guaranteed to evaluate identically for all threads of each block. Run your program under cuda-memcheck to detect stray memory accesses. If your kernel dies for larger problem sizes, it might exceed the runtime limit and trigger the watchdog timer.

    #5
    Posted 06/16/2017 10:56 AM   
    [url="https://devtalk.nvidia.com/default/topic/988809/nsight-visual-studio-edition/nsight-visual-studio-and-tesla-p100-pcie/"]From the Nsight, Visual Studio Edition forum[/url]: [quote]Currently, there is no plan to support GP100 profiling, including the Telsa P100, in NsightVSE. Debugging of GP100, including Tesla P100, will be supported in an upcoming release.[/quote] Hmm.
    From the Nsight, Visual Studio Edition forum:

    Currently, there is no plan to support GP100 profiling, including the Telsa P100, in NsightVSE.
    Debugging of GP100, including Tesla P100, will be supported in an upcoming release.

    Hmm.

    Always check return codes of CUDA calls for errors. Do not use __syncthreads() in conditional code unless the condition is guaranteed to evaluate identically for all threads of each block. Run your program under cuda-memcheck to detect stray memory accesses. If your kernel dies for larger problem sizes, it might exceed the runtime limit and trigger the watchdog timer.

    #6
    Posted 06/16/2017 11:05 AM   
    Scroll To Top

    Add Reply