| Documentation | Build Status | Quality | 
|---|---|---|
Like I Knew What I am Doing
LIKWID.jl is a Julia wrapper for the performance monitoring and benchmarking suite LIKWID.
Talk (25 min) given at JuliaCon 2022.
Prerequisites:
- You must have 
likwidinstalled (see the build & install instructions). - You must be running Linux. (LIKWID doesn't support macOS or Windows.)
 
LIKWID.jl is a registered Julia package. Hence, you can simply add it to your Julia environment with the command
] add LIKWIDMake sure that LD_LIBRARY_PATH includes the directory that contains the liblikwid library (/usr/local/lib by default). You can check via
echo $LD_LIBRARY_PATHIf it doesn't, put the following into your ~/.bashrc:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATHNote that if you are using VSCode a restart might be required to see the changes.
Please check out the documentation to learn how to use LIKWID.jl.
using LIKWID
N = 10_000
a = 3.141
x = rand(N)
y = rand(N)
z = zeros(N)
function daxpy!(z, a, x, y)
    z .= a .* x .+ y
end
daxpy!(z, a, x, y); # warmup
metrics, events = @perfmon "FLOPS_DP" daxpy!(z, a, x, y); # double-precision floating point ops.Output:
Group: FLOPS_DP
┌───────────────────────────┬──────────┐
│                     Event │ Thread 1 │
├───────────────────────────┼──────────┤
│          ACTUAL_CPU_CLOCK │  73956.0 │
│             MAX_CPU_CLOCK │  51548.0 │
│      RETIRED_INSTRUCTIONS │  10357.0 │
│       CPU_CLOCKS_UNHALTED │  23174.0 │
│ RETIRED_SSE_AVX_FLOPS_ALL │  20000.0 │
│                     MERGE │      0.0 │
└───────────────────────────┴──────────┘
┌──────────────────────┬────────────┐
│               Metric │   Thread 1 │
├──────────────────────┼────────────┤
│  Runtime (RDTSC) [s] │ 7.68048e-6 │
│ Runtime unhalted [s] │  3.0188e-5 │
│          Clock [MHz] │     3514.8 │
│                  CPI │    2.23752 │
│         DP [MFLOP/s] │     2604.0 │
└──────────────────────┴────────────┘
- LIKWID / LIKWID Performance Tools
 - Most C-bindings have been autogenerated using Clang.jl
 - pylikwid: Python wrappers of LIKWID
 - Logo by @davibarreira
 - The Erlangen National High Performance Computing Center (NHR@FAU) supports the project with CI infrastructure
 
LIKWID.jl is an effort by the Paderborn Center for Parallel Computing (PC²) and, originally, the MIT JuliaLab.

