is there any easy ways to reset GPU CUDA app hang up

Hi everyone,

when i debug the CUDA programme. sometimes, there are some problems in my programme, so it is fail to pass the debug. and when i want to re-debug the programme, it is hanged up where need to allocate in GPU. i can close the programme, but i can’t debug again because the programme will hang up everytime when it runs to allocate in GPU. i think it is because some space in the GPU was allocated before, and it was not be freeed because the programme was interrupted accidently.

now, i only can restart the computer to solve this problem. yeah, i can use the computer but i can’t debug the programme before restart.

so, could you please tell me if you know any easy ways to solve this problems.

thanks for the notice by Fugl, I use windows with VS2005, CUDA2.0.

thanks!

peter

Hello there.

You don’t mention what development platform you are on, but if you’re on Linux, stopping the X-server, removing the “nvidia” module (‘rmmod nvidia’ as root) and starting the X-server again usually helps.

As for Windows, I have no clue.

sorry, I use windows XP with VS2005

CUDA2.0

I would recommend developing your code in emulation mode until you’re sure it has no out-of-bounds memory accesses or infinite loops (this is usually what causes hardware hangs).

Thank you! it’s a good suggestion. i even don’t use this configuration.

When I use the emulation mode, there is another problem.

When I debug use the emulation debug mode, An information show to me:

No Debugging Information

Debugging information for ‘Firstcuda.exe’ cannot be found or does not match. Binary was not built with debug information.

Do you want to continue debugging?

this is the command line used for this configuration.

“$(CUDA_BIN_PATH)\nvcc.exe” -ccbin “$(VCInstallDir)bin” -deviceemu -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MTd -I"$(CUDA_INC_PATH)" -o $(ConfigurationName)$(InputName).obj $(InputFileName)

what’s the problems?

While in emudebug configuration:
project, properties, linker, debugging: generate debug info YES

thanks. it works.

oh my god, it’s so hard to start!

yeah, just as you said, infinite loops cause hardware hangs, but sometimes it is not easy to find out.