Can't debug fortran code using cuda-gdb, X11 error error: All CUDA devices are used for X11 and

I’m having trouble trying to debug a simple piece of CUDA fortran code.

I compile the code like this:

pgf90 -g test.cuf -o test

Then I run cuda-gdb test, followed by ‘run’. This is the error I get:

Starting program: /home/theory/phrkaj/Code/cuda/test 

error: All CUDA devices are used for X11 and cannot be used while debugging.

Now I’ve checked the manual for cuda-gdb 3.1 and it says this:

[indent]X11 cannot be running on the GPU that is used for debugging because the debugger

effectively makes the GPU look hung to the X server, resulting in a deadlock or crash.

Two possible debugging setups exist:

• remotely accessing a single GPU (using VNC, ssh, etc.)

• using two GPUs, where X11 is running on only on[/indent]

My question here is, is there anyway around this? Can I debug in emulation-mode? I wasn’t having any problem running the code, but when trying to debug is I get this X11 error.

Thanks for the help

PS. I’ve attached the source code as a .txt file, since this forum won’t let me attach .cuf files.
test.txt (671 Bytes)

As the release notes say, interactive debugging with cuda-gdb requires a dedicated GPU without a display manager running on it. That means no X11 on the device you use for debugging. If you only have one device, you have to stop X11 and either use a TTY session or something like ssh or Nx remotely from another machine. To the best of my knowledge the requirement is non-negotiable.

You most probably can debug in PGI’s emulation mode, but you don’t need cuda-gdb for that. Just use the host debugger and interface of your choice.

cuda-gdb does not support Fortran debugging. On using the debugger with an active desktop please search for “usage scenarios” in CUDA Toolkit Documentation which was updated recently for the mac preview release of cuda-gdb.