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
(default Debug
)
Build type with different compiler options, can be Debug
Release
MinSizeRel
RelWithDebInfo
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_DIRS
Include directories for likwid, e.g.-DLIKWID_INCLUDE_DIRS=/opt/likwid/include
X86A_STATIC
(default on)
Link x86_adapt
statically, 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_PATH
with
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
See the documentation in
During runtime, the library will try to access the following interfaces:
intel_powerclamp
kernel moduleintel_rapl_perf
kernel modulemsr
and msr-safe
kernel modulex86_adapt
kernel module (if found during installation)likwid
the msr
/msr-safe
kernel module (if found during installation)fam15h_power
kernel moduleOption 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-rapl
selects RAPL measurement via likwidmsr-rapl
selects RAPL measurement via msr/msr-safesysfs-rapl
selects RAPL measurement via powercap-rapl sysfs entriesx86a-rapl
selects RAPL measurement via x86_adaptsysfs-Fam15h
selects RAPL measurement via fam15h_power sysfs entriesmsr-rapl-fam23
selects AMD RAPL measurement via msrx86a-rapl-amd
selects AMD RAPL measurement via x86_adaptCheck 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 (mario.bielert@tu-dresden.de)