GPU Metrics: The user running Nsight Systems does not have permission to access NVIDIA GPU Performance Counters on the target device. For more details, please visit https://developer.nvidia.com/ERR_NVGPUCTRPERM
- API function: NVPW_Device_PeriodicSampler_GetCounterAvailability(¶ms)
- Error code: 17
- Source function: static std::vector QuadDDaemon::EventSource::GpuMetricsBackend::Impl::CounterConfig::GetCounterAvailabilityImage(size_t)
- Source location: /build/agent/work/20a3cfcd1c25021d/QuadD/Target/quadd_d/quadd_d/jni/EventSource/GpuMetricsBackend.cpp:572
In the following link, it is mentioned that I should run it as root using sudo to solve this problem. But, when I do it like this:
For those who have the same problem, I solved it by using python3 instead of python. Now, I have another problem! nsys does not recognize my conda environment, I don’t know how to do it yet. I will post the solution whenever I find it.
Hi @amirfakhimbabaei, could you share the full command line for the --run-as error? What’s the Nsys version you were using?
Note that --run-as is used to launch the target application as a regular user when Nsys is being started as root, so you cannot use it to avoid using sudo for Nsys in this specific case.
Regarding to the Program not found: python error as well as the conda environment issue, could you please check if things work under sudo without Nsys? I.e. sudo python test.py in the case. You’ll need to make sure the environment is set up correctly for root user.
As I stated above, I solved this problem by using python3 instead of python. Now I’m able to use sudo without any problem. Thanks for your clarification, I understand that using --run-as was not the correct solution even though I don’t understand why I get the unrecognised option '--run-as' error. Just for clarification, my nsys version is 2021.5.2.53-28d0e6e, and I use the following command line:
By using python3, I do not get the Program not found: python error anymore. The only problem I have is with the conda environment. Using python3 test.py my program runs flawlessly, but when I use the following command: