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 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.
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 External Media
The debug error you mentioned. Do you test on the other samples?
Could you provide me which drive SW version are you using?
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]:
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)