# Copyright (c) 2014 Dave Love, University of Liverpool # Copyright (c) 2018 Dave Love, University of Manchester # MIT licence %{?el8: %global bundled_gotcha 1} Name: likwid Version: 5.5.1 Release: 1%{?dist} Summary: Lightweight performance tools License: GPL-3.0+ URL: https://github.com/RRZE-HPC/likwid/ Source0: http://ftp.fau.de/pub/likwid/likwid-%{version}.tar.gz # Fix PPC build Patch01: 0001-Return-ENOENT-from-parse_event_config-if-file-not-fo.patch BuildRequires: perl perl(Data::Dumper) perl(Text::Balanced) hwloc-devel BuildRequires: lua-devel BuildRequires: gcc-gfortran BuildRequires: doxygen %if 0%{?bundled_gotcha} # Not clear which version Provides: bundled(gotcha) %else BuildRequires: gotcha-devel %endif # This is actually a modified version Provides: bundled(hwloc) = 2.9.3 %description Likwid is a simple to install and use toolsuite of command line applications for performance oriented programmers. It works for Intel and AMD processors. Reference: https://doi.org/10.5281/zenodo.4275676 It consists of: * likwid-topology: Print thread, cache and NUMA topology * likwid-perfctr: Configure and read out hardware performance counters on Intel and AMD processors * likwid-powermeter: Read out RAPL Energy information and get info about Turbo mode steps * likwid-pin: Pin your threaded application (pthread, Intel and gcc OpenMP to dedicated processors) * likwid-genTopoCfg: Dumps topology information to a file * likwid-memsweeper: Sweep memory of NUMA domains and evict cachelines from last level cache %package lib Summary: Shared libararies for %{name} %description lib Shared libararies for %{name} %package devel Summary: Development files for %{name} Requires: %{name}-lib%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %setup -q rm -r ext/lua %{!?bundled_gotcha: rm -r ext/GOTCHA} %patch -P1 -p1 %build %global COMPILER GCC %ifarch aarch64 %global COMPILER GCCARMv8 %endif %ifarch ppc64le %global COMPILER GCCPOWER %endif %ifarch %ix86 %global COMPILER GCCX86 %endif %global margs PREFIX=%buildroot%_prefix INSTALLED_PREFIX=%_prefix \\\ SHARED_LIBRARY=true Q= RPATHS= \\\ FORTRAN_INTERFACE=true FC=gfortran FCFLAGS="%optflags" \\\ INSTALLED_LIBPREFIX=%_libdir \\\ LUA_INCLUDE_DIR=%_includedir LUA_LIB_NAME=lua LUA_BIN=%_bindir \\\ LUA_LIB_DIR=%_libdir COMPILER=%COMPILER \\\ SHARED_CFLAGS='-fPIC -fvisibility=hidden -fcommon' export CFLAGS="%build_cflags" LDFLAGS="%{?build_ldflags}" # not smp-safe make %margs %install mkdir -p %buildroot%_libdir make install %margs INSTALL_CHOWN= mv %buildroot%_prefix/man %buildroot%_mandir [ %_lib != lib ] && mv %buildroot%_prefix/lib/* %buildroot%_libdir %check # Needs installation? make -C test Q= FC=gfortran FCFLAGS="%optflags" %ldconfig_scriptlets lib %files %license COPYING %doc README.md CHANGELOG %ifarch x86_64 %_sbindir/likwid-accessD %_sbindir/likwid-setFreq %endif %_bindir/* %_mandir/man1/* %exclude %_datadir/likwid/examples %_datadir/likwid %_datadir/lua/likwid.lua %files lib %license COPYING # .so needed for Lua loading %_libdir/*.so.5* %files devel %_includedir/* %_datadir/likwid/examples %_libdir/*.so %changelog * Sat Apr 11 2026 Dave Love - 5.5.1-1 - New version - Remove el7 support - Add patch for ppc64le build - Always require lua-devel - Enable check * Mon Jan 16 2023 Dave Love - 5.2.2-1 - New version * Wed Jun 24 2020 Dave Love - 5.0.1-1 - New version * Mon Jun 10 2019 Dave Love - 4.3.4-1 - New version * Fri Nov 30 2018 vagrant - 4.3.3-1 - New version wth reorganization - Maybe use external lua * Thu Sep 8 2016 Dave Love - 4.1.2-3 - Don't use %%dir %%_datadir/lua on el7 * Thu Sep 8 2016 Dave Love - 4.1.2-2 - Provde bundled hwloc, lua * Wed Sep 7 2016 Dave Love - 4.1.2-1 - New version * Thu Oct 15 2015 Dave Love - 4.0.1-1 - New version - Change patch, URL * Tue Mar 17 2015 Dave Love - 3.1.3-1 - New version - Modify patch * Mon Jul 7 2014 Dave Love - 3.1.2-1 - Initial packaging