# Copyright (c) 2014 Dave Love, University of Liverpool # Copyright (c) 2018 Dave Love, University of Manchester # MIT licence # Use external Lua %if 0%{?el8}%{?fedora} %global extlua 1 %endif Name: likwid Version: 5.2.2 Release: 1%{?dist} Summary: Lightweight performance tools License: GPLv3+ URL: https://github.com/RRZE-HPC/likwid/ Source0: http://ftp.fau.de/pub/likwid/likwid-%{version}.tar.gz BuildRequires: perl perl(Data::Dumper) perl(Text::Balanced) hwloc-devel %if 0%{?extlua} BuildRequires: lua-devel %else Provides: bundled(lua) = 5.3 %endif %if 0%{?el6}%{?el7} # For avx512, in particular BuildRequires: devtoolset-9-gcc-gfortran devtoolset-9-binutils %else BuildRequires: gcc-gfortran %endif BuildRequires: doxygen ExclusiveArch: x86_64 %ix86 ppc64le aarch64 armv7hl %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. 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 %build %if 0%{?el6}%{?el7} . /opt/rh/devtoolset-9/enable %endif %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 \\\ %{?extlua: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 * 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