Nsight eclipse is a major feature of CUDA 5.0 for linux and Mac CUDA debugger.
I try to use it to compile the SDK example, but neither I create a new project and add files from example or import the make file in the example to Nsight eclipse, there are still many header file cannot be found.
Because I am not familiar to eclipse, so I can’t find where to add include directory and where to link other libraries.
Can someone tell me how to use it?
Unfortunately, we had to disable SDK samples support in a preview build. It will be trivial in the final build.
Building SDK samples with the preview build is bit tricky and very dependant on what sample you want to build.
Include directories and libraries can be added by:
Right-click your project and select Properties
Select General/“Paths and Symbols”
On the “Includes” tab you can add include paths on per-language basis (you may add include path to several languages at once)
“Symbols” is for defining macro values both for the editor and for the build
“Libraries” is to select libraries to link against. E.g. if you want to link against “libcudart” you enter “cudart”.
Thanks for your reply
I create a new project and copy vectorAdd.cu into it then add ~/NVIDIA_CUDA_Samples/shared/inc to “Includes”
I successfully build and run the project and get passed.
But when I try to use debugger and step by step trace the code, I will always stuck at line84: err = cudaMalloc((void **)&d_A, size);
Is this a bug or my misoperation?
My system is Ubuntu 10.04 64bit with Geforce GT430.
Hmm… single GPU debugging is not available on Linux Eclipse NSight?
I have installed CUDA 5 into the directory /home/user-name/cuda5. Nice, I try NSight and create new CUDA project. Nice, there are sample codes appended to a project-name.cu file. When I try to build and run, libcudart.so.4 is not found. Where can I edit the linked library? I can’t find it in the project properties. Are they by default hidden from us?
Nope… Nsight uses cuda-gdb as a visual debugger backend and it can’t use the same GPU used to drive the screen.
Looks like you have nvcc from toolkit 4.0 in your path (toolkit 5.0 installs libcudart.so.5.0). You need not explicitly link against cudart - nvcc handles it by itself.
You can configure libraries as follows:
Open project properties
Expand General->Paths and Symbols
On the Libraries tab add the library, without the “lib” prefix and file extension. I.e. to link against libmylib.so you need to specify “mylib”.
Nsight Eclipse Edition relies on specific versions of the cuda-gdb and nvcc (it requires some specific new features and bug fixes that were only introduced in the Toolkit 5.0 versions of those tools). Using it with different toolkit versions is not recommended.
Yes, single GPU debug is only available under Windows. Neither Nsight Eclipse Edition nor cuda-gdb available on Linux and Mac support single GPU debugging at this point.
Nsight Eclipse Edition was tested on Nvidia Optimus setups when integrated video adapter (Intel) is driving the display and Nvidia hardware is used for debugging. I expect it will work fine with AMD card driving the display.