This library enables access to processor power and energy measurement facilities, i.e., RAPL and APM implementations from Intel and AMD. It supports different backends that are checked during compile and runtime.
To compile this plugin, you need:
-
GCC compiler
-
libpthread -
CMake 3.9+
-
CMAKE_INSTALL_PREFIX(default/usr/local)Installation directory
-
CMAKE_BUILD_TYPE(defaultDebug)Build type with different compiler options, can be
DebugReleaseMinSizeRelRelWithDebInfo -
X86_ADAPT_LIBRARIES
Libraries for x86_adapt, e.g., -DX86_ADAPT_LIBRARIES=/opt/x86_adapt/lib/libx86_adapt_static.a
X86_ADAPT_INCLUDE_DIRS
Include directories for x86_adapt, e.g., -DX86_ADAPT_INCLUDE_DIRS=/opt/x86_adapt/include
LIKWID_LIBRARIES
Libraries for likwid, e.g.-DLIKWID_LIBRARIES=/opt/likwi/lib/liblikwid.so
-
LIKWID_INCLUDE_DIRSInclude directories for likwid, e.g.
-DLIKWID_INCLUDE_DIRS=/opt/likwid/include -
X86A_STATIC(default on)Link
x86_adaptstatically, if it is found
-
Create build directory
mkdir build cd build -
Invoking CMake
cmake .. (options) -
Invoking make
make -
Install
make install -
Add the installation path to
LD_LIBRARY_PATHwithexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
See the documentation in
During runtime, the library will try to access the following interfaces:
- intel powercap, provided by the
intel_powerclampkernel module - intel rapl via perf, provided by the
intel_rapl_perfkernel module - msr and msr-safe, provided by the
msrandmsr-safekernel module - x86-adapt, provided by the
x86_adaptkernel module (if found during installation) - likwid, provided by
likwidthemsr/msr-safekernel module (if found during installation) - APM fam15 APM, provided by the
fam15h_powerkernel module
Option 1-5 are provided for Intel RAPL (Intel since Sandy Bridge), Option 3 and 4 are provided for AMD RAPL (e.g., AMD Zen), option 6 is provided for APM (AMD Family 15h)
You can enforce a specific interface by setting the environment variable X86_ENERGY_SOURCE to one of these values:
likwid-raplselects RAPL measurement via likwidmsr-raplselects RAPL measurement via msr/msr-safesysfs-powercap-raplselects RAPL measurement via powercap-rapl sysfs entriesx86a-raplselects RAPL measurement via x86_adaptsysfs-Fam15hselects RAPL measurement via fam15h_power sysfs entriesmsr-rapl-fam23selects AMD RAPL measurement via msrx86a-rapl-amdselects AMD RAPL measurement via x86_adapt
-
Check whether the libraries can be loaded from the
LD_LIBRARY_PATH. -
Write a mail to the author.
-
Robert Schoene (robert.schoene at tu-dresden dot de)
-
Mario Bielert ([email protected])