0

Edited:

I have made an application to with Cuda for an Image Descriptor... I tested it to a image and all went well... After that I wanted to try it to many images (ie 10000) to test the the time difference between serial and parallel. So I put my code to a for loop (not the allocations and memory frees). The problem occurred here... When I tried that, it seems that the application and more specifically functions cudaDeviceSynchronize() crash with error code 6. Now, I made a search and I found that on the one hand this error may be because of the kernel that is called before of the cudaDeviceSynchronize() as kernels are asynchronous and the truth is that usually only one specific cudaDeviceSynchronize() function crashes that is called after a specific kernel. One or two times crashes the next one that is again after another kernel. So can the problem be the kernel?I doubt it because it runs perfectly at 10 or 100 images with Nsight memory check on.

On the other hand I found out something about a watchdog timer... When I disabled it with the Nsight and run my program again pc froze completely. So I imagine that for some reason some of the threads or all of them don't end their operation so cudaDeviceSynchronize() doesn't allow the program to continue and after 2 sec(default) watchdog timer stops the application. Any ideas about why kernel lags? Could it be because of my device? I am using GeForce G 103M with Capability 1.1, Cuda version 4.2, windows 7 and visual studio 2010.

Thanks a lot!

Loukas
  • 13
  • 3
  • 1
    Yes, most likely your program (kernel) occasionally takes a long time. The watchdog timer was saving you. When you disabled it, you discovered why it is there. There is something in your kernel that occasionally causes it to take a long time. And yes, your GeForce 103M is a very old device, and is not recommended for serious CUDA work. If you can try your code on another newer cuda device you may have better results. I would think anyway that you could get sufficient timing information for comparison purposes from 10 or 100 runs. – Robert Crovella Feb 13 '13 at 16:52
  • @Robert Crovella. I am wondering then, if my kernel occasionally takes a long time then when I disabled watchdog timer shouldn't my application continue to work when this (long) times passes? my application and pc stop working completely... – Loukas Feb 13 '13 at 17:02
  • I don't know what windows does if you suspend the graphics driver for a long time. Furthermore, you hvaen't posted any of your kernel code, so really I have no idea. Perhaps occasionally your code is running forever. The watchdog timer saved you. Then when you disabled it, that one kernel call that got into an infinite loop hung your machine. This is all just speculation. – Robert Crovella Feb 13 '13 at 17:28
  • Yes you have to be right...But my kernel code doesn't have any loops so occasionally might be take a lot time...The only thing it does is that it checks the block and threads ID and puts some values in the global memory...Or maybe that's the problem, that after some time for some reason the kernel cannot access the global memory (maybe it's overloaded or something)... Anyway... Thanks a lot! – Loukas Feb 14 '13 at 09:50
  • The problem is solved when I changed the debug option to release...I don't know why but if someone knows I would love to learn the reason... – Loukas Feb 18 '13 at 12:45

0 Answers0