[SOLVED] Nsight compute unable to connect 2070 super

I am unable to profile any of the CUDA samples to test if it is working. Any assistance would be much appreciated. The CUDA samples compile and run without an issue. I also tried using the command line and using attach in the GUI but it would not show up in the GUI. I also noticed that when running the command line utility it did not show the port when executing sudo lsof -i -P -n.

The log looks like this:
Launching: /path/to/cuda-sample/vectorAdd
Trying to connect to process with pid: xxxx
Trying to connect to process on host: localhost…
Trying to connect to process on host: localhost…
Trying to connect to process on host: localhost…

Software configuration:
OS: Ubuntu 18.04
CUDA version: 10.1.243 (installed using run file to avoid replacing driver)
Driver version 430.26
Nsight Compute version: 2019.4.0

Hardware configuration:
GPU: Nvidia RTX 2070 super
CPU: AMD Ryzen 3600

Does only attach not work, or can’t you also not profile the local executable directly, i.e. using the following command?

nv-nsight-cu-cli <app>

I think from your description, profiling doesn’t work for you at all, right?

Can you try changing the port used by Nsight Compute, in case the default port range (49152-49215) is not accessible (either taken, or you don’t have permissions)? You can use --port to set this.

Is there any other output from the CLI version of the tool, that could help to understand the problem, any error messages? Note that Nsight Compute will only “connect” once the application starts using CUDA, i.e. during the first CUDA API call. If it never does, you won’t see any connection being established in the UI.

I’m testing the code using the vectorAdd CUDA sample that comes with the CUDA toolkit. I installed visual studio and CUDA etc on Windows to test it and it works fine with the same sample program. However, I do most of my work in Linux and would rather not have to switch. I also tried CUDA 10.0 and experienced the same issues.

nv-nsight-cu-cli vectorAdd

for example hangs indefinitely with no output to the terminal with and without superuser privileges.

Using

ps aux

I see the following processes are launched (including the program I’m attempting to profile).

user   18432  0.1  0.0 289064  9984 pts/0    Sl+  20:10   0:00 /usr/local/cuda-10.1/bin/../nsight-compute-2019.4.0/target/linux-desktop-glibc_2_11_3-x64/nv-nsight-cu-cli /home/user/NVIDIA_CUDA-10.1_Samples/0_Simple/vectorAdd/vectorAdd
user   18440  0.0  0.0  31224  5720 pts/0    S+   20:10   0:00 /usr/local/cuda-10.1/nsight-compute-2019.4.0/target/linux-desktop-glibc_2_11_3-x64/./TreeLauncherSubreaper /home/user/NVIDIA_CUDA-10.1_Samples/0_Simple/vectorAdd/vectorAdd
user   18444 99.0  0.0  69756  7860 pts/0    R+   20:10   0:28 /home/user/NVIDIA_CUDA-10.1_Samples/0_Simple/vectorAdd/vectorAdd

I tried changing the port in the GUI as well as in the command line but neither appeared as used when using the following line to find the currently used ports even when running the program so it appears to never listen to the port.

sudo lsof -i -P -n

I ran a simple c client server program in the terminal and port communication on localhost worked fine without any special permissions.

Also hangs indefinitely and does not open the GUI.

nv-nsight-cu-cli --mode=launch vectorAdd

I solved the issue by updating to the recently released 435.21 drivers using the run file on the Nvidia website.