how to complie and debug the program writed in cuda step by step

how to complie and debug the programs writed in cuda step by step,which tools to be used and how .

i wanted to complie and debug my cuda program step by step with DDD,but i cannot open the soure files such as *.cu…how do you solute the problem .


I don’t think there is any cuda debugger. You can compile using device emulation where it will create code which runs on your computer (not on the actual cuda card), simulating running on a cuda card (but of course much slower). Use the -deviceemu nvcc flag to enable this. Then you can use any normal c debugger to step through the program.

The only other way of debugging code is to copy back the memory from the cuda card and look at the values after the kernel completes.

You should be able to open the *.cu files in any text editor. It is just c code.

The CUDA 2.1 release now includes a debugger as a separate download, but it is only available for 32-bit Linux systems. 64-bit Linux and Windows debuggers are not available yet.

Hello everybody!

Please, is there someone can post me something about correctly setting up a tesla c1060 under linux and how to compile step by step (under linux)!

just a short example to start.

Thank you!

may be that is the principle of CUDA debugger.

Download 2.1 beta driver, toolkit and sdk

install driver (X should not be running)

install toolkit (take care to read the message at the end of the installation about PATH & LD_LIBRARY_PATH)

install SDK (as user)

cd SDK_directory


./bin/linux/release/devicequery to check everything is running