Nsight not able to connect to my program on linux

Hello,

I’m writing a cuda-gl-interop program and run into trouble trying to use nsight-graphics.
I’m on 64-bit archlinux (nvidia-smi reports driver 440.44) with an old GeForce 755m (compute capability 3.0 I think).

I launch ‘nv-nsight-gfx’, and set path to executable, click ‘Launch Frame Debugger’ and I get the following output:

Preparing to launch...
Launched process: cuda_gl_example (pid: 536601)
Attempting to automatically connect...
Searching for attachable processes on localhost...
Attachable process detected: cuda_gl_example (pid: 536601)
- Status: No graphics API
- Uptime: 0.086s
Launch process exited. 
Searching for attachable child processes...
Searching for attachable processes on localhost...
Failed to connect. The target process may have exited.

Appreciate the help and let me know if more information is required.
Thanks,
Nilay

Hello,

Thanks for your feedback. Is it possible to share your app with us for further investigation?

Darrell

Hello, thank for your reply.

It’s not exactly a small demo, has few dependencies (available here https://github.com/nilspin/VoxelHashing_demo )

Readme is a few months old but the project builds correctly with g+±8 and latest cuda 10.2. (g+±9 doesn’t work. clang I haven’t tried.)
Btw, if my code compiles fine, there won’t be output to screen because the renderer is broken still WIP.

If I may, I’d like to explain my problem in more detail.
First two stages of my program use CUDA (for image tracking, and generating signed-distance-fields). Then I need to write an opengl raymarcher to visualize the SDF voxels. Without visually looking at generated image, I can’t be sure whether computation in previous passes was correct :)

I need nsight-gfx to help me debug raymarching shader. If there’s some way I can look at fragment shader output numerically, it’d be awesome. Even better if I can examine values per-stage(like cuda-gdb but for frag shaders). Currently, I’ve been trying to get around this(unsuccessfully) by writing output of various stages of my frag shader to OpenGL image textures. I would then dump these numbers to some file and try to figure out where my math went wrong. But this isn’t working so far because write-to-image isn’t working correctly for me.

Renderdoc cannot help me because it doesn’t support debugging for cuda-interop code.

Anyways, I digress. I’m not sure why my nv-nsight-gfx isn’t able to connect to my program. While writing this comment I realized I’ve another gl-only project which too fails to connect with nsight-graphics and gives me same ‘No graphics API’ error. Maybe this https://github.com/nilspin/gameEngine will be helpful as well.

Thanks,
Nilay

Hello,

Talked to our engineer and he tried using Nomad 2019.6 with the gameEngine that you provided, however, it works fine on his Ubuntu 1604 machine:

We were not sure if this is the program that you mentioned as gl-only project which too fails to connect with nsight-graphics and gives you same ‘No graphics API’ error.

The engineer suspects maybe something could be misconfigured on your machine, that results in the ‘No graphics API’. One possibility is that you may have chose a wrong ‘Frame Delimiter’, which is never called by the program. For this program it should use SwapBuffers. Could you check this to see if this fixes your gl program issue?