Debuuging in emulation mode What happpens in CUDA kernel?

When you are debugging in emulation mode and you set a breakpoint in the CUDA kernel and you press enter and you get:

[New Thread 140417547585872 (LWP 5458)]
[New Thread 140417547319632 (LWP 5459)]
[New Thread 140417547053392 (LWP 5460)]
[New Thread 140417546787152 (LWP 5461)]
[New Thread 140417546520912 (LWP 5462)]
[New Thread 140417546254672 (LWP 5463)]
[New Thread 140417545988432 (LWP 5464)]

and so forth.

What does this mean? I have been debugging in emulation mode aad getting this. You usually have to hit ctrl-C to get control of the program back.

What does this mean? I know that you are getting threads. Does this happen when you debug not in emulation mode?

What is LWP - a light weight process?



Emulation mode launches one CPU thread per corresponding CUDA kernel thread and the executes them serially. That is how it works, debugging or otherwise. What you are seeing is normal.

It is incredibly slow (I would estimate about 5-6 orders of magnitude compared to a GPU), so you just have to wait until it reaches your breakpoint. If you have a lot of kernels with large thread counts before your breakpoint and you start now, you probably will see you breakpoint somewhere between Christmas and New Years Eve. Best of luck.

Okay. I chose emulation mode to debug because I generally do not like to shut down X11. The other person using my computer does not like it.Thus I go to emulation mode.

I have debugged in native mode. I simply type:

sudo etc/init.d/gdm stop

and I am ready to go. But for some reason now I get into the CUDA kernel and it hangs there. I obviously want to look into the CUDA kernel on a program line by line, but I get hung in the CUDA kernel.

is there something else to do to get into the CUDA kernel in native mode.

I just type

sudo /etc/init.d//gdm stop

and give it a password. It works most of the time.



When you are debugging on the device, you are only ever following the progress of a single thread. It is very possible that another running thread “crashes” the kernel before the thread you are watching ever gets scheduled. It is also possible that a kernel which does things like illegal memory access can leave the card in such a parlous state that debugging and running CUDA programs is no longer possible, in which case it might be necessary to reboot the computer.

Where can I get the CUDA emulator for Linux Opensuse 11.1?

There is no “emulator”, just a command to the nvcc compiler driver to compile for emulation. So if you have the standard CUDA toolkit, you have everything that is necessary (including instructions in the documentation).