Libfreqgen
A library to access core and uncore frequencies of x86 processors that provides callbacks for msr-safe, x86-adapt, likwid, and sysfs entries
Install / Use
/learn @readex-eu/LibfreqgenREADME
libfreqgen
A library to access core and uncore frequencies of x86 processors that provides callbacks for msr-safe, x86-adapt, likwid, and sysfs entries
X86-Energy Libraries for Score-P
Compilation and Installation
Prerequisites
To compile this plugin, you need:
-
GCC compiler
-
CMake 3.9+
Build Options
-
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
Building
-
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`
Usage
See the documentation in
During runtime, the library will try to access the following interfaces:
- msr and msr-safe, provided by the
msrandmsr-safekernel module, available for Intel processors - x86-adapt, provided by the
x86_adaptkernel module (if found during installation), available for Intel processors - likwid, provided by
likwidthecpufreqkernel module (if found during installation) - sysfs cpufreq, provided by the
cpufreqkernel module. Only available for CPU frequency, but not for uncore frequency. Make sure thatintel_pstateis deactivated if you want to use this option. Furthermore, check whether you can read and write
/sys/devices/system/cpu/cpu<nr>/cpufreq/scaling_setspeedAlso make sure that/sys/devices/system/cpu/cpu<nr>/cpufreq/scaling_governoris set to userspace
Enforce a specific interface
You can enforce a specific interface by setting the environment variable LIBFREQGEN_CORE_INTERFACE and LIBFREQGEN_UNCORE_INTERFACE to one of these values:
likwidselects likwidmsrselects access via msr/msr-safesysfsselects cpufreq sysfs entries (not forLIBFREQGEN_UNCORE_INTERFACE)x86_adaptselects x86_adapt
If anything fails
-
Check whether the libraries can be loaded from the
LD_LIBRARY_PATH. -
Write a mail to the author.
Authors
- Robert Schoene (robert.schoene at tu-dresden dot de)
- Andreas Gocht (andreas.gocht at tu-dresden dot de)
- Umbreen Sabir Mian (umbreen.mian at tu-dresden dot de)
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
