Nsight Systems CLI (nsys.exe) Program not found:

I installed NVIDIA Nsight Systems 2021.1.1 on Windows 10, version 20H2.
I added below path to PATH environment variable.

C:\Program Files\NVIDIA Corporation\Nsight Systems 2021.1.1\target-windows-x64\

So that I can launch nsys.exe easily like this.

C:\>nsys --help
 usage: nsys [--version] [--help] <command> [<args>] [application] [<application args>]

And when I try to profile an application, nsys prints out Program not found message.

d:\projects\nvtx_test>nsys profile python demo.py
WARNING: CPU sampling requires administrative privileges, disabling.
WARNING: CPU context switches trace requires administrative privileges, disabling.
WARNING: Backtraces will not be collected because sampling is disabled.
Program not found: python

If I specify [application] with an absolute path, it runs fine.

d:\projects\nvtx_test>nsys profile C:\Users\beru\AppData\Local\Programs\Python\Python38\python.exe demo.py
WARNING: CPU sampling requires administrative privileges, disabling.
WARNING: CPU context switches trace requires administrative privileges, disabling.
WARNING: Backtraces will not be collected because sampling is disabled.
Collecting data...
Processing events...
Saving temporary "C:\Users\beru\AppData\Local\Temp\nsys-report-37a2-1c75-f889-e3df.qdstrm" file to disk...

Creating final output files...
Processing [==============================================================100%]
Saved report file to "C:/Users\beru\AppData\Local\Temp\nsys-report-37a2-1c75-f889-e3df.qdrep"
Report file moved to "d:\projects\nvtx_test\report2.qdrep"

The question is why nsys.exe does not look up PATH environment variable on Windows?
I don’t see the same problem when running nsys on Linux.

4 Likes

Same issue from my side, hope someone can answer.

Hi- I’m seeing the same issue with Nsight Systems, but not Nsight Compute. In particular, it appears that the Nsight Systems 2022.2.1\target-windows-x64\nsys.exe executable is disregarding the PATH environment variable. Here are some tests from PowerShell Core on Windows 11:

  1. julia → works fine (found on the user’s PATH)
  2. ncu julia → works fine
  3. nsys launch julia → “Unknown command: julia”
  4. nsys launch C:\Users\<username>\AppData\Local\Programs\Julia-1.7.2\bin\julia.exe → works fine

I also printed out the PATH variable from within the Julia process running under nsys in (4) above, and it looked fine. I’m not sure why the Windows target version of ncu is able to find julia on the path just fine, but nsys cannot. @dofek - are you able to reproduce? Is this something I could help troubleshoot further?