Nsight Eclipse Version 10 - compiling and build issues

Hi Fabian,

I am still cannot use Nsight eclipse, and went through the procedure in the following document a number of times:
https://developer.nvidia.com/drive/learn/tutorial-NsightEclipse

I cannot compile and build the binaries using this procedure.

Could you please check, and update the document as soon as possible ?

Lets start from a first basic error.

When I try to compile I get the following message (it can’t find a CmakeLists.txt file at all. It is a basic error of this document):

2:27:03 PM Buildscript generation: Nsight samples::build-host in /home/magna/samples-nsight/build/build-host
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Debug -G “Unix Makefiles” /home/magna/samples-nsight
CMake Error: The source directory “/home/magna/samples-nsight” does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

I opened project exactly as it was mentioned in this document.

The compiler is looking for a CMakeLists.txt file under a wrong directory (should look under samples, but it looks under Nsight samples).

I cannot change a path to CMakeLists.txt in Proprties- > Linked Resources->Path Variables, the option EDIT is disabled for PROJECT_LOC variable.

I opened a project in samples-nsight/samples directory, and moved a folder named data inside the folder samples. The compilation was without error, but when I try to run sample_hello_world application in Debug mode (according to document) I get the following message:

SOftware preemption debugging is a BETA feature introduced in CUDA toolkit 5.5 and is only supported on SM 3.5 devices. This configuration wasn’t mentioned in the document, however, I saw the option to configure devise when I created the project.

Then I enabled CUDA software preemption debugging, and clicked OK.

In the main() function in the following command I get error:

dwStatus status = dwInitialize(&sdk, sdkVersion, &sdkParams);

Console output:

Coalescing of the CUDA commands output is off.
$1 = 0xff
The target endianness is set automatically (currently little endian)
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.

Temporary breakpoint 1, main (argc=1, argv=0x7fffffffda78) at /home/magna/samples-nsight/samples/src/hello_world/main.cpp:132
132 {
[New Thread 0x7fffd1ae2700 (LWP 10263)]
[New Thread 0x7fffd12e1700 (LWP 10264)]
[New Thread 0x7fffd0ae0700 (LWP 10265)]
Error: Failed to suspend device for CUDA device 0, error=CUDBG_ERROR_COMMUNICATION_FAILURE(0x1c).

Why do I get this error ??? I don’t get this error when I run it from command line.

Hi yaroslav.taran,

You can keep the original folder structure. All you need to do is let the CMakeLists visible by Nsight (>> project right-click >> properties >> C/C++ General >> Paths and Symbols >> chose tab “Source Location”)

Set to the /samples-nsight/samples and delete the samples-nsight

The debug error you mentioned. Do you test on the other samples?
Could you provide me which drive SW version are you using?

Thanks

I try to test the same samples (samples-nsight).
Eclipse version

Nsight Eclipse Edition
Version: 10.0

Toolchain: Cuda toolkit 10.0
Builder CMAKE Builder (GNU Make).

magna@MVBRWS019:~/NVIDIA$ nvidia-smi
Fri Jul 26 11:23:29 2019
±----------------------------------------------------------------------------+
| NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GT 710 Off | 00000000:01:00.0 N/A | N/A |
| N/A 50C P0 N/A / N/A | 744MiB / 1998MiB | N/A Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
±----------------------------------------------------------------------------+
magna@MVBRWS019:~/NVIDIA$

Hi yaroslav.taran,

As you mentioned, you do not face the same error when you run in the command line. I suspect some settings are wrong in your Nsight.
Could you try [in Nsight]:

  1. In the sample hello world
  • set a breakpoint before the initialization function
  • try with different sample i.e laneDetection/Drivenet
  • please report me if all the samples are crashed when you hit dwStatus status = dwInitialize(&sdk, sdkVersion, &sdkParams)

    thank you