Question

I usually use emacs or Kate but I decided to try out "modern" IDEs for running my codes. I have an already working CUDA/C++ makefile project which I want to run on nsight but I don't see how to fulfill my needs.

How can I tell nsight eclipse 5.0.0 to run my project by using an existing makefile? sorry if my question sounds silly to you, but I'm totally new to IDEs.

Was it helpful?

Solution

With Nsight EE you have several options:

Create a new project and copy the sources

You can use your shell or any file manager to copy source files to the project location. Make sure you manually refresh the project after you copied the files.

Creating a project in the same folder as your source files

In this post I will be using nbody CUDA Sample (note that Nsight also has a more native option to import CUDA samples, I will ignore that option here):

  1. Ran cuda-install-samples-6.0.sh to make a writable copy of samples in ~/dev/cuda/NVIDIA_CUDA-6.0_Samples
  2. In Nsight EE, go to File->New->CUDA C/C++ Project
  3. On the first wizard page:

    • Type in your project name (can be pretty much any string)
    • Uncheck "Use default location" and select your root folder (~/dev/cuda/NVIDIA_CUDA-6.0_Samples/5_Simulations/nbody in my case)
    • In the Project Type tree select Makefile Project/*Empty Project*
    • Select CUDA Toolkit 5.5 in the Toolchains list.
  4. Complete the wizard

You will see newly created project with all your files in the Project Explorer view. Pressing Build will run make all in your project location - you can customize this (among other things) in the project properties.

Note: Nsight will add several files to the root folder of your project.

Note: Some source editing features in Nsight may not work as reliably with Makefile projects as they do with the projects were Nsight maintains makefiles itself. Nsight does not know all compiler arguments passed from the custom makefile so it may not know all include paths or macro values.

OTHER TIPS

You can set up a 'dummy' project (what I mean by this is just create an empty Visual Studio project), and in the Nsight user properties page (you can read about it here http://docs.nvidia.com/nsight-visual-studio-edition/3.2/Nsight_Visual_Studio_Edition_User_Guide.htm#Launch_CUDA_Debugger.htm), just set the "Launch external program" to the (makefile) produced EXE path , and also don't forget to set the working directory. That should do it.

Let me know if that helps. Cheers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top