Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add likwid 5.2.1 #4913

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions L/likwid/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

name = "likwid"
version = v"5.2.1"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/RRZE-HPC/likwid/archive/refs/tags/v$(version).tar.gz", "1b8e668da117f24302a344596336eca2c69d2bc2f49fa228ca41ea0688f6cbc2"),
DirectorySource("./bundled")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
for f in ${WORKSPACE}/srcdir/patches/*.patch; do
atomic_patch -p1 ${f}
done
cd likwid-5.2.1/
carstenbauer marked this conversation as resolved.
Show resolved Hide resolved
make
make install
exit
carstenbauer marked this conversation as resolved.
Show resolved Hide resolved
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Platform("x86_64", "linux"; libc = "glibc")
]


# The products that we will ensure are always built
products = [
LibraryProduct("liblikwid", :liblikwid),
ExecutableProduct("likwid-lua", :likwid_lua),
ExecutableProduct("likwid-bench", :likwid_bench)
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")
28 changes: 28 additions & 0 deletions L/likwid/bundled/patches/useperfevents.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git before/likwid-5.2.1/config.mk after/likwid-5.2.1/config.mk
index aa623fd..0d6e395 100644
--- before/likwid-5.2.1/config.mk
+++ after/likwid-5.2.1/config.mk
@@ -11,12 +11,12 @@
COMPILER = GCC#NO SPACE

# Path were to install likwid
-PREFIX ?= /usr/local#NO SPACE
carstenbauer marked this conversation as resolved.
Show resolved Hide resolved
+PREFIX ?= /workspace/destdir#NO SPACE

# Set the default mode for MSR access.
# This can usually be overriden on the commandline.
# Valid values are: direct, accessdaemon and perf_event
-ACCESSMODE = accessdaemon#NO SPACE
+ACCESSMODE = perf_event#NO SPACE

# Build Fortran90 module interface for Marker API. Adopt Fortran compiler
# in ./make/include_<COMPILER>.mk if necessary. Default: ifort (even for
@@ -67,7 +67,7 @@ INSTALLED_ACCESSDAEMON = $(INSTALLED_PREFIX)/sbin/likwid-accessD#NO SPACE

# Build the setFrequencies daemon to allow users setting the CPU and Uncore
# frequency
-BUILDFREQ = true#NO SPACE
+BUILDFREQ = false#NO SPACE
# Paths for frequencie deaemon after installation
FREQDAEMON = $(PREFIX)/sbin/likwid-setFreq#NO SPACE
INSTALLED_FREQDAEMON = $(INSTALLED_PREFIX)/sbin/likwid-setFreq#NO SPACE