1

I am running Nsight Eclipse edition on my MacBook PRO (OS X 10.8.2, mountain lion, CUDA 5.0, GT650M) and I am getting a strange error each time I try to start the debugger in Nsight. In the console I get: Coalescing of the CUDA commands output is off. and an error screen.

Here is a screenshot of the error:

http://img201.imageshack.us/img201/6857/screenbvm.png

I went through the Nsight documentation and found this line:

GPUs used to run X11 (on Linux) or Aqua (on Mac) cannot be used to debug CUDA applications in Nsight Eclipse Edition. Consult cuda-gdb documentation for details.

Does this mean I can't run the debugger form Nsight, but just from terminal?

talonmies
  • 70,661
  • 34
  • 192
  • 269
Sterbic
  • 213
  • 5
  • 15
  • 1
    The line quoted from the documentation means what you think it means. In OS X and Linux, you need a dedicated GPU which is not running a display manager to run use interactive debugging. – talonmies Nov 16 '12 at 11:55
  • The MacBook I'm using actually has 2 GPUs, the IntelHD 4000 and the GT650M, so I should be able to run the debugger in eclipse? I managed to run the debugger in eclipse by tweaking some gdb prefs, but the whole machine freezes when I try entering a kernel. – Sterbic Nov 16 '12 at 12:07
  • I am not sure about that, sorry: I don't have a dual GPU macbook to test it with. It certainly is possible on a Sandy Bride/Ivy Bridge linux system with a discrete NVIDIA GPU, but it requires configuring X11 not to use the NVIDIA GPU. I don't know if you can configure Aqua to completely ignore the NVIDIA GPU or not. – talonmies Nov 16 '12 at 15:03
  • Guess I'll try to tweak the Aqua configuration files. Thanks. – Sterbic Nov 16 '12 at 15:33

2 Answers2

0
  1. The message you are seein means the debugger was not properly setup on your system (e.g. it will not even work from the console). Please follow the steps outlined in "Setting Up the Debugger Environment" of the cuda-gdb manual
  2. You will need a two-GPU system to debug a CUDA code using visual debugger. Unfortunately, no Mac laptops qualify even though they have Intel graphics. The issue been the OS can start using NVIDIA GPU at any moment and may hang if the device is suspended on a breakpoint.
Eugene
  • 9,242
  • 2
  • 30
  • 29
0

Your cuda-gdb is not properly code signed, which is required by the Darwin kernel to debug applications.

Follow this guideline to create a System code sign certificate

http://www.noktec.be/archives/1251

Then, code sign the following binaries (assuming the certificate you created is cuda_gdb)

sudo codesign -s cuda_gdb /usr/local/cuda/bin/cuda-gdb
sudo codesign -s cuda_gdb /usr/local/cuda/bin/cuda-binary-gdb

Also, in order to launch the application, you also need to make sure the DYLD_LIBRARY_PATH contains the cuda runtime library path DYLB_LIBRARY_PATH /usr/local/cuda/lib

stoictopia
  • 183
  • 7