A reengineered likwid-bench for HPC microbenchmarking.
This project is a re-engineered implementation of the classic likwid-bench microbenchmarking tool.
It is designed to be modular, extensible, and research-friendly, with a focus on reproducibility and integration into HPC environments.
Key highlights:
- Multi-dimensional data structures for more realistic workload modeling
- Kernel-related metrics collection and analysis
- Kernel definitions via YAML files for simpler extension
- No external dependency (unless compiled with LIKWID MarkerAPI support, required for Hardware PMC's)
Configuration is controlled through the config.mk file.
You can customize:
- Compiler selection (default: GCC, to change settings for a compiler, check
make/include_$(COMPILER).mk) - Installation paths
- Optional features (e.g., LIKWID MarkerAPI support)
To build it call:
$ make
You can get help message with
$ ./likwid-bench -h
---------------------------------------
likwid-bench - Micro-benchmarking suite
---------------------------------------
Option:
-h/--help : Help text and usage = '1'
-a/--all : List available benchmarks
-V/--verbose : Verbosity level (0 - 3)
-t/--test : Test name
-f/--file : Test file
-K/--kfolder : Folder with test files to search for test name
-D/--tmpfolder : Temporary folder for the object files
-i/--iterations : Iterations
-C/--compiler : Select compiler (gcc, icc, icx, clang)
-r/--runtime : Possible Units: ms, s, m, h. Default: s. Runtime
-o/--output : Set output: 'stdout', 'stderr' or a filename
-O/--csv : Output results in CSV format
-J/--json : Output results in JSON format
-d/--detailed : Output detailed results (cycles and frequency will be printed)
-p/--printdomains : List available domains available on the architecture
likwid-bench automatically detects the number of iterations (if not given) for the given or default runtime. Either runtime or iterations can be set at the time of execution.
If you want a list of all provided kernels, run $ ./likwid-bench -a.
Kernels may define new parameters for the command line. To get the output for a kernel, specify it with -t testname or -f yamlfile and add --help.
$ ./likwid-bench -t <kernel> -h
---------------------------------------
likwid-bench - Micro-benchmarking suite
---------------------------------------
Options:
-h/--help : Help text and usage = '1'
-a/--all : List available benchmarks
-V/--verbose : Verbosity level (0 - 3)
-t/--test : Test name = 'load'
-f/--file : Test file
-K/--kfolder : Folder with test files to search for test name
-D/--tmpfolder : Temporary folder for the object files
-i/--iterations : Iterations
-C/--compiler : Select compiler (gcc, icc, icx, clang)
-r/--runtime : Possible Units: ms, s, m, h. Default: s. Runtime
-o/--output : Set output: 'stdout', 'stderr' or a filename
-O/--csv : Output results in CSV format
-J/--json : Output results in JSON format
-d/--detailed : Output detailed results (cycles and frequency will be printed)
-p/--printdomains : List available domains available on the architecture
---------------------------------------
Commandline options for kernel '<kernel>'
---------------------------------------
Options:
-w/--workgroup : Workgroup definition
-N/--N : Size of array that should be loaded, Possible Values - B, KB, MB, GB, TB, KiB, MiB, GiB, TiB
Running a benchmark kernel with 1GB array dimension:
- iterations set to 100
$ ./likwid-bench -t <kernel> -N 1GB -i 100 -w N:0-71on 72 threads physical threads - runtime set to 5.0s
$ ./likwid-bench -t <kernel> -N 1GB -r 5.0s -w S0:0-9on Socket 1 with 10 threads