<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta> <meta name="copyright" content="(C) Copyright 2005"></meta> <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta> <meta name="DC.Type" content="concept"></meta> <meta name="DC.Title" content="Nsight Eclipse Edition Getting Started Guide"></meta> <meta name="abstract" content="The user guide for using Nsight Eclipse Edition."></meta> <meta name="description" content="The user guide for using Nsight Eclipse Edition."></meta> <meta name="DC.Coverage" content="Tools"></meta> <meta name="DC.subject" content="CUDA Nsight, CUDA Nsight install, CUDA Nsight running, CUDA Nsight project, CUDA Nsight sample, CUDA Nsight debugging, CUDA Nsight profiling, CUDA Nsight requirements, CUDA Nsight issues, CUDA Nsight extensions"></meta> <meta name="keywords" content="CUDA Nsight, CUDA Nsight install, CUDA Nsight running, CUDA Nsight project, CUDA Nsight sample, CUDA Nsight debugging, CUDA Nsight profiling, CUDA Nsight requirements, CUDA Nsight issues, CUDA Nsight extensions"></meta> <meta name="DC.Format" content="XHTML"></meta> <meta name="DC.Identifier" content="abstract"></meta> <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link> <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link> <title>Nsight Eclipse Edition :: CUDA Toolkit Documentation</title> <!--[if lt IE 9]> <script src="../common/formatting/html5shiv-printshiv.min.js"></script> <![endif]--> <script type="text/javascript" charset="utf-8" src="../common/scripts/tynt/tynt.js"></script> <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script> <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script> <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.scrollintoview.min.js"></script> <script type="text/javascript" src="../search/htmlFileList.js"></script> <script type="text/javascript" src="../search/htmlFileInfoList.js"></script> <script type="text/javascript" src="../search/nwSearchFnt.min.js"></script> <script type="text/javascript" src="../search/stemmers/en_stemmer.min.js"></script> <script type="text/javascript" src="../search/index-1.js"></script> <script type="text/javascript" src="../search/index-2.js"></script> <script type="text/javascript" src="../search/index-3.js"></script> <link rel="canonical" href="http://docs.nvidia.com/cuda/nsight-eclipse-edition-getting-started-guide/index.html"></link> <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link> </head> <body> <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search"> <input type="text" name="search-text"></input><fieldset id="search-location"> <legend>Search In:</legend> <label><input type="radio" name="search-type" value="site"></input>Entire Site</label> <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset> <button type="reset">clear search</button> <button id="submit" type="submit">search</button></form> </header> <div id="site-content"> <nav id="site-nav"> <div class="category closed"><a href="../index.html" title="The root of the site.">CUDA Toolkit v6.5</a></div> <div class="category"><a href="index.html" title="Nsight Eclipse Edition">Nsight Eclipse Edition</a></div> <ul> <li> <div class="section-link"><a href="#introduction">1. Introduction</a></div> <ul> <li> <div class="section-link"><a href="#about-nsight">1.1. About Nsight Eclipse Edition</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="#release-notes">2. New and Noteworthy</a></div> <ul> <li> <div class="section-link"><a href="#past-release-notes">2.1. New in Nsight Eclipse Edition 6.5</a></div> </li> <li> <div class="section-link"><a href="#unique_1508415116">2.2. New in Nsight Eclipse Edition 6.0</a></div> </li> <li> <div class="section-link"><a href="#unique_2022159140">2.3. New in Nsight Eclipse Edition 5.5</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="#using-nsight">3. Using Nsight Eclipse Edition</a></div> <ul> <li> <div class="section-link"><a href="#unique_438434144">3.1. Installing Nsight Eclipse Edition</a></div> <ul> <li> <div class="section-link"><a href="#installation-instructions">3.1.1. Installing CUDA Toolkit</a></div> </li> <li> <div class="section-link"><a href="#installation-mac">3.1.2. Mac OS X Additional Notes</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="#running-nsight">3.2. Running Nsight Eclipse Edition</a></div> </li> <li> <div class="section-link"><a href="#new-runtime-project">3.3. Creating a New Project</a></div> </li> <li> <div class="section-link"><a href="#import-sample">3.4. Importing CUDA Samples</a></div> </li> <li> <div class="section-link"><a href="#debugging">3.5. Debugging CUDA Applications</a></div> </li> <li> <div class="section-link"><a href="#remote-development">3.6. Remote development of CUDA Applications</a></div> </li> <li> <div class="section-link"><a href="#remote-debugging">3.7. Debugging Remote CUDA Applications</a></div> </li> <li> <div class="section-link"><a href="#profiling">3.8. Profiling CUDA applications</a></div> </li> <li> <div class="section-link"><a href="#more-information">3.9. More Information</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="#platform-requirements">A. Platform Requirements</a></div> </li> <li> <div class="section-link"><a href="#unique_900248128">B. Known Issues</a></div> </li> </ul> </nav> <div id="resize-nav"></div> <nav id="search-results"> <h2>Search Results</h2> <ol></ol> </nav> <div id="contents-container"> <div id="breadcrumbs-container"> <div id="release-info">Nsight Eclipse Edition (<a href="../../pdf/Nsight_Eclipse_Edition_Getting_Started.pdf">PDF</a>) - v6.5 (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>) - Last updated August 1, 2014 - <a href="mailto:cudatools@nvidia.com?subject=CUDA Toolkit Documentation Feedback: Nsight Eclipse Edition">Send Feedback</a> - <span class="st_facebook"></span><span class="st_twitter"></span><span class="st_linkedin"></span><span class="st_reddit"></span><span class="st_slashdot"></span><span class="st_tumblr"></span><span class="st_sharethis"></span></div> </div> <article id="contents"> <div class="topic nested0" id="abstract"><a name="abstract" shape="rect"> <!-- --></a><h2 class="title topictitle1"><a href="#abstract" name="abstract" shape="rect">Nsight Eclipse Edition Getting Started Guide</a></h2> <div class="body conbody"></div> </div> <div class="topic concept nested0" id="introduction"><a name="introduction" shape="rect"> <!-- --></a><h2 class="title topictitle1"><a href="#introduction" name="introduction" shape="rect">1. Introduction</a></h2> <div class="body conbody"> <p class="p"> This guide introduces Nsight Eclipse Edition and provides instructions necessary to start using this tool. For a detailed description of Nsight features consult the integrated help available from inside Nsight. </p> </div> <div class="topic concept nested1" id="about-nsight"><a name="about-nsight" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#about-nsight" name="about-nsight" shape="rect">1.1. About Nsight Eclipse Edition</a></h3> <div class="body conbody"> <div class="p"> NVIDIA<sup>®</sup> Nsight™ Eclipse Edition is a unified CPU plus GPU integrated development environment (IDE) for developing CUDA<sup>®</sup> applications on Linux and Mac OS X for the x86 and ARM platforms. It is designed to help developers on all stages of the software development process. Nsight Eclipse Edition is bundled in the <a class="xref" href="http://developer.nvidia.com/cuda-downloads" target="_blank" shape="rect">NVIDIA CUDA Toolkit</a>, so installing the CUDA Toolkit also installs Nsight. The principal features are as follows: <ul class="ul"> <li class="li">Source editor with extended support for CUDA C and C++ syntax </li> <li class="li">Projects and files management with version control management system integration. CVS and Git are supported out of the box with integrations for other systems available separately as IDE plug-ins. </li> <li class="li">Configurable makefile-based NVCC build integration</li> <li class="li">Graphical user interface for debugging heterogeneous applications </li> <li class="li">Visual profiler with source code correlation for optimizing GPU code performance </li> </ul> </div> <div class="p"> Nsight Eclipse Edition is based on the popular Eclipse Platform and supports a wide range of the third-party extensions and plug-ins including: <ul class="ul"> <li class="li">Version control management systems support</li> <li class="li">Compiler integrations</li> <li class="li">Language IDEs</li> <li class="li">Application lifecycle management and collaboration solutions </li> </ul> </div> <p class="p"> For more information about Eclipse Platform, visit <a class="xref" href="http://eclipse.org" target="_blank" shape="rect">http://eclipse.org</a></p> </div> </div> </div> <div class="topic reference nested0" id="release-notes"><a name="release-notes" shape="rect"> <!-- --></a><h2 class="title topictitle1"><a href="#release-notes" name="release-notes" shape="rect">2. New and Noteworthy</a></h2> <div class="topic reference nested1" id="past-release-notes"><a name="past-release-notes" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#past-release-notes" name="past-release-notes" shape="rect">New in Nsight Eclipse Edition 6.5</a></h3> <div class="body refbody"> <div class="section"> <dl class="dl"> <dt class="dt dlterm">Stability release</dt> <dd class="dd"> Version 6.5 improves the stability of network connections to target systems and fixes an an occasional hang that could occur after profiling CUDA applications in earlier versions. </dd> </dl> </div> </div> </div> <div class="topic reference nested1" id="unique_1508415116"><a name="unique_1508415116" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#unique_1508415116" name="unique_1508415116" shape="rect">New in Nsight Eclipse Edition 6.0</a></h3> <div class="body refbody"> <div class="section"> <dl class="dl"> <dt class="dt dlterm">Running Or Profiling Applications Remotely</dt> <dd class="dd"> In addition to remote debugging support introduced in Nsight Eclipse Edition 5.5, Nsight Eclipse Edition 6.0 is also able to run and profile applications on remote systems. </dd> <dd class="dd"> To run or profile on a remote system, select <span class="ph uicontrol">Remote C/C++ Applicaton</span> from the drop-down on the main toolbar. <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/nandn/remote-profile.png" alt="Starting remote profiling session in Nsight Eclipse Edition."></img></div><br clear="none"></br></dd> <dt class="dt dlterm">Building Projects On A Remote System</dt> <dd class="dd"> Nsight Eclipse Edition can now perform build on a remote system. Following actions will be performed: <ol class="ol"> <li class="li">Nsight will connect to a remote system and will synchronize copies of the project files between local and remote systems. User may be prompted to resolve conflicts if there are any. </li> <li class="li"><dfn class="term">make</dfn> will be executed on a remote system to build the project. </li> <li class="li">Build results will be copied back to the local system.</li> </ol> <div class="note note"><span class="notetitle">Note:</span> Building project remotely requires <dfn class="term">Git</dfn> to be available and set up on both the local and the remote system. </div> </dd> <dd class="dd"> Target systems for remote build can be setup during project creation with the <span class="ph uicontrol">New CUDA Project</span> wizard or on the <span class="ph uicontrol">Build/Target Systems</span> project property page <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/nandn/remote-compile.png" alt="Configuring remote build in Nsight Eclipse Edition"></img></div><br clear="none"></br></dd> <dt class="dt dlterm">ARMv7 Cross Development Support</dt> <dd class="dd"> Nsight Eclipse Edition can now target Linux systems running on ARMv7 processors. <div class="note note"><span class="notetitle">Note:</span> Please consult <em class="ph i">CUDA Toolkit Release Notes</em> for information on enabling ARMv7 cross development support in CUDA Toolkit </div> </dd> <dd class="dd"> CPU archicture for the project can be set during project creation with the <span class="ph uicontrol">New CUDA Project</span> wizard or using the <span class="ph uicontrol">Build/Target Systems</span> project property page <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/nandn/arm-compile.png" alt="Enabling cross-compilation in Nsight Eclipse Edition"></img></div><br clear="none"></br></dd> <dt class="dt dlterm">Cached And Extrapolated Values In Visual Debugger</dt> <dd class="dd"><dfn class="term">cuda-gdb</dfn> now reports cached and extrapolated values for variables in device code that were optimized out by the compiler. <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/nandn/cached-variables.png" alt="Cached variable values"></img></div><br clear="none"></br></dd> </dl> </div> </div> </div> <div class="topic reference nested1" id="unique_2022159140"><a name="unique_2022159140" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#unique_2022159140" name="unique_2022159140" shape="rect">New in Nsight Eclipse Edition 5.5</a></h3> <div class="body refbody"> <div class="section"> <dl class="dl"> <dt class="dt dlterm">Remote Debugging Support</dt> <dd class="dd"> <p class="p"> Nsight supports debugging CUDA applications running on remote systems. Nsight can both upload for debugging executable built locally and debug executable built remotely. </p> </dd> <dt class="dt dlterm">Kernel Launch Trace</dt> <dd class="dd"> <p class="p"> Debug view now shows CDP launch trace. </p> </dd> <dt class="dt dlterm">CDP Project Support</dt> <dd class="dd"> <p class="p"> CDP support can be enabled from a new project wizard during project creation or from project properties for existing projects. </p> </dd> <dt class="dt dlterm">Software Preemption Support</dt> <dd class="dd"> Software preeption debugging can be enabled from Nsight preferences. <div class="note note"><span class="notetitle">Note:</span> Software preemption debugging is BETA and is only available on SM 3.5 and later devices. Consult cuda-gdb manual before enabling this setting. </div> </dd> <dt class="dt dlterm">Floating Point Memory Rendering</dt> <dd class="dd"> <p class="p"> Floating-point rendering support was added to the memory view. </p> </dd> <dt class="dt dlterm">Remote System Explorer</dt> <dd class="dd"> <p class="p"> Nsight Eclipse Edition now includes Remote System Explorer plug-in. This plugin enables accessing remote systems for file transfer, shell access and listing running processes. </p> </dd> <dt class="dt dlterm">Eclipse Platform Update</dt> <dd class="dd"> <p class="p"> Nsight Eclipse Edition 5.5 is based on Eclipse Platform 3.8.2 and Eclipse CDT 8.1.2 introducing a number of new features and enhancements to existing features. </p> </dd> </dl> </div> </div> </div> </div> <div class="topic concept nested0" id="using-nsight"><a name="using-nsight" shape="rect"> <!-- --></a><h2 class="title topictitle1"><a href="#using-nsight" name="using-nsight" shape="rect">Using Nsight Eclipse Edition</a></h2> <div class="topic concept nested1" id="unique_438434144"><a name="unique_438434144" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#unique_438434144" name="unique_438434144" shape="rect">Installing Nsight Eclipse Edition</a></h3> <div class="body conbody"> <p class="p">Nsight Eclipse Edition is installed as a part of the CUDA Toolkit package. </p> </div> <div class="topic task nested2" id="installation-instructions"><a name="installation-instructions" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#installation-instructions" name="installation-instructions" shape="rect">3.1. Installing CUDA Toolkit</a></h3> <div class="body taskbody"> <div class="section context"> <p class="p">To install CUDA Toolkit:</p> </div> <ol class="ol steps"> <li class="li step"><span class="ph cmd">Visit the NVIDIA CUDA Zone download page:</span><a class="xref" href="http://www.nvidia.com/object/cuda_get.html" target="_blank" shape="rect">http://www.nvidia.com/object/cuda_get.html</a></li> <li class="li step"><span class="ph cmd">Select appropriate operating system. Nsight Eclipse Edition is available in Mac OS X and Linux toolkit packages. </span></li> <li class="li step"><span class="ph cmd">Download and install the CUDA Driver.</span></li> <li class="li step"><span class="ph cmd">Download and install the CUDA Toolkit.</span></li> <li class="li step"><span class="ph cmd">Follow instructions to configure CUDA Driver and Toolkit on your system. </span></li> </ol> </div> </div> <div class="topic reference nested2" id="installation-mac"><a name="installation-mac" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#installation-mac" name="installation-mac" shape="rect">3.1.2. Mac OS X Additional Notes</a></h3> <div class="body refbody"> <div class="section"> <p class="p">Nsight Eclipse Edition requires Java Runtime Environment (JRE) to be available on the local system. Compatible JRE is included in CUDA Toolkit package on Linux platform. </p> <p class="p">Mac OS X users will be offered to install JRE by downloading it from Software Update servers unless JRE is already installed. </p> </div> <div class="section"> <p class="p"> Nsight Eclipse Edition relies on command-line tools like <dfn class="term">make</dfn> and <dfn class="term">ar</dfn> to compile CUDA applications. Since Mac OS X 10.8 (<dfn class="term">Mountain Lion</dfn>), these tools are no longer installed as a part of the Xcode package. </p> <div class="p"> To install command-line tools on Mac OS X: <ol class="ol"> <li class="li">Install Apple Xcode from the Mac App Store</li> <li class="li"> Run Xcode and go to the <span class="ph menucascade"><span class="ph uicontrol">Xcode</span> > <span class="ph uicontrol">Preferences...</span></span> from the main menu. </li> <li class="li"> Open the <dfn class="term">Components</dfn> tab of the <dfn class="term">Downloads</dfn> sheet </li> <li class="li"> Install <dfn class="term">Command Line Tools</dfn> package </li> </ol> </div> </div> </div> </div> </div> <div class="topic concept nested1" id="running-nsight"><a name="running-nsight" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#running-nsight" name="running-nsight" shape="rect">Running Nsight Eclipse Edition</a></h3> <div class="body conbody"> <div class="p"> To run Nsight from the command line type <pre class="pre" xml:space="preserve">nsight</pre></div> <div class="note note"><span class="notetitle">Note:</span> On Linux systems, Nsight is also available from Gnome, KDE and Unity desktop menus. </div> <p class="p">On the first run Nsight will ask to pick a workspace location. The workspace is a folder where Nsight will store its settings, local files history and caches. An empty folder should be selected to avoid overwriting existing files. </p> <div class="p"> The main Nsight window will open after the workspace location is selected. The main window is divided into the following areas: <ul class="ul"> <li class="li"><dfn class="term">Editor</dfn> - displays source files that are opened for editing. </li> <li class="li"><dfn class="term">Project Explorer</dfn> - displays project files </li> <li class="li"><dfn class="term">Outline</dfn> - displays structure of the source file in the current editor. </li> <li class="li"><dfn class="term">Problems</dfn> - displays errors and warnings detected by static code analysis in IDE or by a compiler during the build. </li> <li class="li"><dfn class="term">Console</dfn> - displays make output during the build or output from the running application. </li> </ul> </div> </div> </div> <div class="topic task nested1" id="new-runtime-project"><a name="new-runtime-project" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#new-runtime-project" name="new-runtime-project" shape="rect">3.3. Creating a New Project</a></h3> <div class="body taskbody"> <ol class="ol steps"> <li class="li step"><span class="ph cmd"> From the main menu, open the new project wizard - <span class="ph uicontrol">File</span> > <span class="ph uicontrol">New...</span> > <span class="ph uicontrol">CUDA C/C++ Project</span></span></li> <li class="li step"><span class="ph cmd"> Specify the project name and project files location. </span></li> <li class="li step"><span class="ph cmd"> Select <span class="ph uicontrol">CUDA Runtime Project</span> to create a simple CUDA runtime application. </span></li> <li class="li step"><span class="ph cmd"> Specify the project parameters on the next wizard page. </span><div class="note note"><span class="notetitle">Note:</span> By default Nsight will automatically detect and target CUDA hardware available locally. Nsight will default to SM 2.0 if no CUDA hardware is detected. </div> </li> <li class="li step"><span class="ph cmd">Complete the wizard.</span> The project will be shown in the <span class="ph uicontrol">Project Explorer</span> view and source editor will be opened. </li> <li class="li step"><span class="ph cmd">Build the project by clicking on the hammer button on the main toolbar. </span></li> </ol> <div class="section result"> <div class="fig fignone"><span class="figcap">Figure 1. Nsight main window after creating a new project</span><br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/newproject.png" width="576" alt="Nsight main window after creating a new project."></img></div><br clear="none"></br></div> </div> </div> </div> <div class="topic task nested1" id="import-sample"><a name="import-sample" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#import-sample" name="import-sample" shape="rect">3.4. Importing CUDA Samples</a></h3> <div class="body taskbody"> <div class="section prereq p"> The CUDA samples are an optional component of the CUDA Toolkit installation. Nsight provides a mechanism to import these samples and work with them easily: <div class="note note"><span class="notetitle">Note:</span> Samples that use the CUDA driver API (suffixed with "Drv") are not supported by Nsight. </div> </div> <ol class="ol steps"> <li class="li step"><span class="ph cmd"> From the main menu, open the new project wizard - <span class="ph uicontrol">File</span> > <span class="ph uicontrol">New...</span> > <span class="ph uicontrol">CUDA C/C++ Project</span></span></li> <li class="li step"><span class="ph cmd"> Specify the project name and project files location. </span></li> <li class="li step"><span class="ph cmd"> Select <span class="ph uicontrol">Import CUDA Sample</span> under <span class="ph uicontrol">Executable</span> in the <span class="ph uicontrol">Project type</span> tree. </span></li> <li class="li step"><span class="ph cmd"> On the next wizard page select project sample you want to import. Press <span class="ph uicontrol">Next...</span></span></li> <li class="li step"><span class="ph cmd"> Specify the project parameters on the next wizard page. </span></li> <li class="li step"><span class="ph cmd">Complete the wizard.</span> The project will be shown in the <span class="ph uicontrol">Project Explorer</span> view and source editor will be opened. </li> <li class="li step"><span class="ph cmd">Build the project by clicking on the hammer button on the main toolbar. </span></li> </ol> </div> </div> <div class="topic task nested1" id="debugging"><a name="debugging" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#debugging" name="debugging" shape="rect">3.5. Debugging CUDA Applications</a></h3> <div class="body taskbody"> <div class="section prereq p"> Nsight must be running and at least one project must exist. <div class="note note"><span class="notetitle">Note:</span> GPUs used to run X11 (on Linux) or Aqua (on Mac) cannot be used to debug CUDA applications in Nsight Eclipse Edition. Consult <dfn class="term">cuda-gdb</dfn> documentation for details. </div> </div> <ol class="ol steps"> <li class="li step"><span class="ph cmd"> In the <span class="ph uicontrol">Project Explorer</span> view, select project you want to debug. Make sure the project executable is compiled and no error markers are shown on the project. </span></li> <li class="li step"><span class="ph cmd"> On the main window toolbar press <span class="ph uicontrol">Debug</span> button (green bug). </span></li> <li class="li step"><span class="ph cmd">You will be offered to switch perspective when you run debugger for the first time. Click "Yes". </span> Perspective is a window layout preset specifically designed for a particular task. </li> <li class="li step"><span class="ph cmd"> Application will suspend in the <dfn class="term">main</dfn> function. At this point there is no GPU code running. </span></li> <li class="li step"><span class="ph cmd">Add a breakpoint in the device code. Resume the application. </span></li> </ol> <div class="section result"> <p class="p">Debugger will break when application reaches the breakpoint. You can now explore your CUDA device state, step through your GPU code or resume the application. </p> <div class="fig fignone"><span class="figcap">Figure 2. Debugging CUDA application</span><br clear="none"></br><div class="imagecenter"><img class="image imagecenter" width="576" src="graphics/debugger.png" alt="Debugging CUDA application."></img></div><br clear="none"></br></div> </div> </div> </div> <div class="topic concept nested1" id="remote-development"><a name="remote-development" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#remote-development" name="remote-development" shape="rect">3.6. Remote development of CUDA Applications</a></h3> <div class="body conbody"> <div class="p"> Nsight Eclipse Edition also supports remote development of CUDA application starting with CUDA Toolkit 6.0. The picture below shows how Nsight Eclipse Edition can be used for local as well as remote development: <div class="fig fignone"><br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/nsight-eclipse-use-cases.png" alt="One tool Nsight Eclipse for all your development needs"></img></div><br clear="none"></br></div> For remote development you do not need any NVIDIA GPU on your host system. The remote target system can be a Linux desktop system with NVIDIA GPU or an ARM based Jetson TK1 system. Nsight IDE and UI tools are only available for x86 systems. </div> <p class="p"> Nsight supports two remote development modes: the cross compilation mode and the remote synchronized project mode. </p> <div class="p"> In the <strong class="ph b">cross compilation mode</strong> the project resides on the host system and the cross compilation is also done on the host system. The cross compilation mode is only supported on Ubuntu x86 host system. <div class="fig fignone"><br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/nsight-eclipse-cross.png" alt="One tool Nsight Eclipse for all your development needs"></img></div><br clear="none"></br></div> </div> <p class="p"> To cross compile select the target cross compile architecture in CPU architecture drop down: <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/nandn/arm-compile.png" alt="Enabling cross-compilation in Nsight Eclipse Edition"></img></div><br clear="none"></br></p> <div class="p"> In the <strong class="ph b">remote synchronized project mode</strong> the project resides on the host system and gets synchronized with the remote target system. The compilation gets done natively on the target system. The remote synchronized project mode is supported on both Mac OS X and Linux x86 systems. <div class="fig fignone"><br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/nsight-eclipse-native.png" alt="One tool Nsight Eclipse for all your development needs"></img></div><br clear="none"></br></div> </div> <p class="p"> To create native remote build using <strong class="ph b">remote synchronized project mode</strong> click on <span class="ph uicontrol">Manage...</span> button to add a remote system, then select the project path, toolkit and the CPU architecture of the target system: <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/nandn/remote-compile.png" alt="Configuring remote build in Nsight Eclipse Edition"></img></div><br clear="none"></br></p> <div class="p">To synchronize projects between the host and target system, install and configure git on both the local and remote systems as follows: <ul class="ul"> <li class="li"><samp class="ph codeph">git config --global user.name <anyname></samp></li> <li class="li"><samp class="ph codeph">git config --global user.email <anyemail></samp></li> </ul> </div> </div> </div> <div class="topic task nested1" id="remote-debugging"><a name="remote-debugging" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#remote-debugging" name="remote-debugging" shape="rect">3.7. Debugging Remote CUDA Applications</a></h3> <div class="body taskbody"> <div class="section prereq p"> Remote debugging is available starting with CUDA Toolkit 5.5. A dedicated GPU is not required to use Nsight remote debugging UI. A dedicated GPU is still required on the debug target. Only Linux targets are supported. Debug host and target may run different operating systems or have different CPU architectures. The remote machine must be accessible via SSH and CUDA Toolkit must be installed on both machines. <div class="note note"><span class="notetitle">Note:</span> If there is a firewall between the host and the target, it must be set up to let RSP messages through, or SSH port-forwarding must be used. </div> </div> <ol class="ol steps"> <li class="li step"><span class="ph cmd"> Select <span class="ph uicontrol">Run>Debug an application</span> menu item. <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/debug-an-application-menuitem.png" alt="Nsight run menu with Debug an application item highlighted"></img></div><br clear="none"></br></span></li> <li class="li step"><span class="ph cmd"> Select <span class="ph uicontrol">Debug an application on a remote system</span> option. <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/debug-cuda-application-wizard.png" alt="Nsight's Debug CUDA Application Wizard"></img></div><br clear="none"></br></span></li> <li class="li step"><span class="ph cmd"> Type the full path to a local executable or select one using the <span class="ph uicontrol">Local file...</span> button. <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/debug-cuda-application-specify-executable.png" alt="Nsight's Debug CUDA Application Wizard - Selecting executable"></img></div><br clear="none"></br></span></li> <li class="li step"><span class="ph cmd"> Select a remote connection from a drop-down list or press the <span class="ph uicontrol">New...</span> button to create a new one. </span></li> <li class="li step"><span class="ph cmd"> If you are creating a new remote connection, select the <span class="ph uicontrol">SSH Only</span> connection type, press <span class="ph uicontrol">Next</span>, and type the host name(or IP address) as well as the connection name and description (both are optional) and then press <span class="ph uicontrol">Finish</span>. <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/remote-connection-wizard.png" alt="Remote connection wizard"></img></div><br clear="none"></br></span></li> <li class="li step"><strong>Optional: </strong><span class="ph cmd"> Press <span class="ph uicontrol">Connect</span> to verify the selected remote connection. </span></li> <li class="li step"><span class="ph cmd"> Press the <span class="ph uicontrol">Next</span> button. </span></li> <li class="li step"><span class="ph cmd"> Type the full path to cuda-gdbserver on the remote system or select one using the <span class="ph uicontrol">Browse...</span> button. <br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/debug-cuda-application-specify-path.png" alt="Nsight's Debug CUDA Application Wizard - Specifying gdbserver/library path"></img></div><br clear="none"></br></span></li> <li class="li step"><span class="ph cmd"> Click on "Add new path" or on the <span class="ph uicontrol">Browse...</span> button to specify the path to the shared libraries the remote application depends on. </span></li> <li class="li step"><span class="ph cmd"> Click on the <span class="ph uicontrol">Finish</span> button to finish the new debug configuration wizard and start debugging the application. </span></li> <li class="li step"><span class="ph cmd">You will be offered to switch perspective when you run the debugger for the first time. Click <span class="ph uicontrol">Yes</span>. </span> Perspective is a window layout preset specifically designed for a particular task. </li> </ol> <div class="section result"> <p class="p">The debugger will stop at the application main routine. You can now set breakpoints, or resume the application. </p> <div class="fig fignone"><span class="figcap">Figure 3. Debugging remote CUDA application</span><br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/remote-debugger.png" alt="Debugging remote CUDA application."></img></div><br clear="none"></br></div> </div> </div> </div> <div class="topic task nested1" id="profiling"><a name="profiling" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#profiling" name="profiling" shape="rect">3.8. Profiling CUDA applications</a></h3> <div class="body taskbody"> <div class="section prereq p"> Nsight must be running and at least one project must exist. Profiler cannot be used when debugging session is in progress. </div> <div class="section context"> Nsight Eclipse Edition profiling features are based on the NVIDIA Visual Profiler ( <dfn class="term">nvvp</dfn> ) code. These two tools provide same features and have same user interface. </div> <ol class="ol steps"> <li class="li step"><span class="ph cmd"> In the <span class="ph uicontrol">Project Explorer</span> view, select project you want to profile. Make sure the project executable is compiled and no error markers are shown on the project. </span></li> <li class="li step"><span class="ph cmd"> On the main window toolbar press the <span class="ph uicontrol">Profile</span> button. </span></li> <li class="li step"><span class="ph cmd"> Press <span class="ph uicontrol">Yes</span> when Nsight prompts to switch to the <span class="ph uicontrol">Profile</span> perspective. </span></li> </ol> <div class="section result"> <p class="p"> Nsight will switch to the <span class="ph uicontrol">Profile</span> perspective and will display application execution timeline. </p> <div class="fig fignone"><span class="figcap">Figure 4. Profiling CUDA Application</span><br clear="none"></br><div class="imagecenter"><img class="image imagecenter" width="576" src="graphics/profiling.png" alt="Profiling CUDA Application."></img></div><br clear="none"></br></div> </div> </div> </div> <div class="topic concept nested1" id="more-information"><a name="more-information" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#more-information" name="more-information" shape="rect">3.9. More Information</a></h3> <div class="body conbody"> <div class="p"> Some of the topics not covered in this guide are: <ul class="ul"> <li class="li">Navigating debugged application state</li> <li class="li"> Enabling <dfn class="term">cuda-memcheck</dfn> integration when debugging GPU applications </li> <li class="li">Attaching to running applications</li> <li class="li">Measuring GPU code efficiency</li> <li class="li">Refactoring CUDA C/C++ source code</li> <li class="li">Accessing CVS and Git repositories</li> <li class="li">Installing Nsight Eclipse Edition plug-ins</li> </ul> </div> <p class="p"> More information about these and other topics is available in the Nsight built-in documentation. To access Nsight documentation select <dfn class="term">Help->Help Contents</dfn> from the Nsight main menu. </p> <p class="p"> More information about CUDA, CUDA Toolkit and other tools is available on CUDA web page at <a class="xref" href="http://developer.nvidia.com/cuda" target="_blank" shape="rect">http://developer.nvidia.com/cuda</a></p> </div> </div> </div> <div class="topic concept nested0" id="platform-requirements"><a name="platform-requirements" shape="rect"> <!-- --></a><h2 class="title topictitle1"><a href="#platform-requirements" name="platform-requirements" shape="rect">A. Platform Requirements</a></h2> <div class="body conbody"> <p class="p">Nsight Eclipse Edition is supported on all <a class="xref" href="http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#system-requirements" target="_blank" shape="rect">Linux x86_64 versions</a> and <a class="xref" href="http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-mac-os-x/index.html#system-requirements" target="_blank" shape="rect">Mac OS X versions</a> supported by the CUDA Toolkit. </p> <p class="p">A CUDA-capable GPU is not required for writing and compiling your CUDA application using Nsight Eclipse Edition. A CUDA-capable GPU is required for debugging and profiling CUDA applications. Debugging is supported on all CUDA-capable GPUs supported by the CUDA Toolkit. </p> <p class="p">A GPU that is running X11 (on Linux) or Aqua (on Mac) cannot be used to debug a CUDA application and will be hidden from the application ran in the debugger. Such GPU can still be used for profiling GPU applications. </p> </div> </div> <div class="topic reference nested0" id="unique_900248128"><a name="unique_900248128" shape="rect"> <!-- --></a><h2 class="title topictitle1"><a href="#unique_900248128" name="unique_900248128" shape="rect">Known Issues</a></h2> <div class="body refbody"> <div class="section"> <h2 class="title sectiontitle">Executable must exist in order to start debug session for the first time </h2> <p class="p"> Nsight will not automatically perform build when starting debug session for a given project for the first time. Build must be invoked manually. Nsight will automatically rebuild executable when starting subsequent debug sessions. </p> <div class="note note"><span class="notetitle">Note:</span> To manually build the project, select it (or any file within the project) in a <span class="ph uicontrol">Project Explorer</span> view and click hammer icon on the main window toolbar. </div> </div> <div class="section"> <h2 class="title sectiontitle">Source editors may show error markers on a valid code for the files in newly created projects. </h2> <p class="p"> These markers will be cleared after Nsight indexes included header files. </p> </div> <div class="section"> <h2 class="title sectiontitle">Mac OS X users may be prompted to install Java Runtime Environment (JRE) when running Nsight Eclipse Edition for the first time. </h2> <p class="p">Nsight Eclipse Edition requires functioning Java Runtime Environment to be present on the local system to run. </p> </div> </div> </div> <div class="topic concept nested0" id="notices-header"><a name="notices-header" shape="rect"> <!-- --></a><h2 class="title topictitle1"><a href="#notices-header" name="notices-header" shape="rect">Notices</a></h2> <div class="topic reference nested1" id="notice"><a name="notice" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#notice" name="notice" shape="rect"></a></h3> <div class="body refbody"> <div class="section"> <h3 class="title sectiontitle">Notice</h3> <p class="p">ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, "MATERIALS") ARE BEING PROVIDED "AS IS." NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. </p> <p class="p">Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation assumes no responsibility for the consequences of use of such information or for any infringement of patents or other rights of third parties that may result from its use. No license is granted by implication of otherwise under any patent rights of NVIDIA Corporation. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all other information previously supplied. NVIDIA Corporation products are not authorized as critical components in life support devices or systems without express written approval of NVIDIA Corporation. </p> </div> </div> </div> <div class="topic reference nested1" id="trademarks"><a name="trademarks" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#trademarks" name="trademarks" shape="rect"></a></h3> <div class="body refbody"> <div class="section"> <h3 class="title sectiontitle">Trademarks</h3> <p class="p">NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation in the U.S. and other countries. Other company and product names may be trademarks of the respective companies with which they are associated. </p> </div> </div> </div> <div class="topic reference nested1" id="copyright"><a name="copyright" shape="rect"> <!-- --></a><h3 class="title topictitle2"><a href="#copyright" name="copyright" shape="rect"></a></h3> <div class="body refbody"> <div class="section"> <h3 class="title sectiontitle">Copyright</h3> <p class="p">© 2007-<span class="ph">2014</span> NVIDIA Corporation. All rights reserved. </p> <p class="p">This product includes software developed by the Syncro Soft SRL (http://www.sync.ro/).</p> </div> </div> </div> </div> <hr id="contents-end"></hr> </article> </div> </div> <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/formatting/common.min.js"></script> <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-write.js"></script> <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-tracker.js"></script> <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher: "998dc202-a267-4d8e-bce9-14debadb8d92", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script></body> </html>