Error Message: Cannot Collect GPU Hardware Metrics
Possible error messages:
- Cannot collect GPU hardware metrics becauselibmd.socannot be loaded. Make sure you have installed Metrics Discovery API from https://github.com/intel/metrics-discovery correctly.
- Cannot collect GPU hardware metrics becauselibmd.sowas not found. Make sure you have installed Metrics Discovery Application Programming Interface from https://github.com/intel/metrics-discovery.
- Cannot collect GPU hardware metrics because your version of the Metrics Discovery API is obsolete.
Cause
To collect GPU hardware metrics and GPU utilization data on Linux, the
VTune
uses the Intel® Metric Discovery API library distributed with the product. If it cannot access the library, the corresponding error message is provided.
Profiler
Solution
Consider upgrading your Intel® VTune™ Profiler to
version 2021.1 available as part of Intel oneAPI Base Toolkit or as a stand-alone component. This version of the product automatically selects the latest
libstdc++
available in runtime to satisfy the GPU analysis requirements, so no additional configuration is required.
For VTune Profiler versions 2020, 2021.1.0. beta04 and older, install the Intel Metric Discovery API library from the official repository at https://github.com/intel/metrics-discovery and make sure to meet the following requirements:
- To enable theVTuneto successfully load the library, it should be linked toProfilerlibstdc++(version GLIBCXX_3.4.20 or older) or statically linked tolibstd++. Iflibmd.sois dynamically linked to a newer version oflibstdc++, make sure to have it loaded to the process before loadinglibmd.so. You can do this, for example, by re-defining the environment variableLD_PRELOAD:LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6.-c gpu-hotspotsvtune
- If you usesuorsudocommand to run theVTune, you need to redefineProfilerLD_PRELOADdirectly in the command, for example:sudo LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6-c gpu-hotspotsvtune
- In case of remote target profiling, remove or rename the following file in the VTune Profiler package installed on the remote target:<vtune-target-install-dir>/lib64/libstdc++.so.6