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.
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:
julia → works fine (found on the user’s PATH)
ncu julia → works fine
nsys launch julia → “Unknown command: julia”
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?
Just to make sure I understand, with the 2023.1.1 release of nsys on an x86_64 Linux system, nsys fails to launch the application when you do sudo nsys launch app
and the application is in the current PATH? But, when you do sudo nsys launch /path/to/app
nsys correctly launches the application. Is that correct?
Can you share the full sequence of nsys CLI commands are you using?
Hi rknight,
that is correct. I’m using nothing other than that. /path/to/app lies in my /home dir but the path to the binary is exported to PATH (in .bashrc) So i guess that nsys uses it’s own shell bypassing .bashrc?