NVIDIA Nsight Visual Studio Edition 2.2 User Guide > CUDA Debugger > How To > Use Global Freeze

 

The NVIDIA Nsight main menu has a global freeze option. This allows the user to control which warps will make progress when using any CUDA run control (such as stepping, resume, or run to cursor). For example, the user is able to ensure that only one warp moves when stepping.

Note that a barrier in the code will prevent a warp from making any progress, if the other warps are frozen. This is because all warps in a block need to get past the barrier, and they would not be able to if others are frozen. In this case, the user can use async break to get back control in the debugger.

This option must be set in each debug session. It does not persist between sessions.

To use Global Freeze:
  1. Launch the CUDA Debugger.
    1. Open a CUDA-based project.
    2. Set a breakpoint in the project. (See Walkthrough: Debugging a CUDA Application for information on how to set a breakpoint.) 
    3. Make sure that the Nsight Monitor is running on the target machine.
    4. From the Nsight menu, select Start CUDA Debugging.

      As an alternate option, you can also right-click on the project in Solution Explorer and choose Start CUDA Debugging.

    5. The CUDA Debugger starts and launches the target application.

  2. When the application is suspended at a breakpoint, go to the Nsight menu and choose Freeze. Select the freeze option that you wish to utilize.



Setting the Freeze Preference:
  1. In Visual Studio, go to the Nsight menu and select Options.
  2. Select the CUDA page.



  3. The Stepper Freeze Preference setting allows the user to control stepping behavior. The default setting is Freeze All Except Current Warp.
  4. This preference setting is only used when the current debug session has the Global Freeze Preference set to Freeze None. When the option is set to Freeze None, other unconditional breakpoints can hit while stepping.
    Note that this setting only affects stepping, not resume or run to cursor.
  5. The other two freeze options, Freeze All Except Current Warp and Freeze All Except Current Block, are always preferred if set explicitly by the user.

 

 

 

 

 

 


NVIDIA® Nsight™ Development Platform, Visual Studio Edition User Guide Rev. 2.2.120522 ©2009-2012. NVIDIA Corporation. All Rights Reserved.