diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 000000000..d742ee291 --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,265 @@ +# See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions + +# Workflow name +name: Release + +# Run on tag push +on: + push: + tags: + - '**' + +jobs: + + # + # Build on AlmaLinux 8.5 + # + AlmaLinux-RPM-build: + runs-on: ubuntu-latest + # See: https://hub.docker.com/_/almalinux + container: almalinux:8.5 + # The job outputs link to the outputs of the 'rpmrename' step + # Only job outputs can be used in child jobs + outputs: + rpm : ${{steps.rpmrename.outputs.RPM}} + srpm : ${{steps.rpmrename.outputs.SRPM}} + steps: + + # Use dnf to install development packages + - name: Install development packages + run: | + dnf --assumeyes group install "Development Tools" "RPM Development Tools" + dnf --assumeyes install wget openssl-devel diffutils delve which perl + dnf --assumeyes install 'dnf-command(builddep)' + # Enable powertools repository for dnf (required for some dependencies) + - name: Enable powertools repository + run: | + dnf --assumeyes --disableplugin=subscription-manager install dnf-plugins-core + dnf --assumeyes --disableplugin=subscription-manager install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + dnf config-manager --enable epel + dnf config-manager --set-enabled powertools + + # Checkout git repository and submodules + # fetch-depth must be 0 to use git describe + # See: https://github.com/marketplace/actions/checkout + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + + # Use dnf to install build dependencies + - name: Install build dependencies + run: | + dnf --assumeyes builddep packaging/rpm/likwid.spec + + - name: RPM build LIKWID + id: rpmbuild + run: make RPM + + # AlmaLinux 8.5 is a derivate of RedHat Enterprise Linux 8 (UBI8), + # so the created RPM both contain the substring 'el8' in the RPM file names + # This step replaces the substring 'el8' to 'alma85'. It uses the move operation + # because it is unclear whether the default AlmaLinux 8.5 container contains the + # 'rename' command. This way we also get the new names for output. + - name: Rename RPMs (s/el8/alma85/) + id: rpmrename + run: | + OLD_RPM="${{steps.rpmbuild.outputs.RPM}}" + OLD_SRPM="${{steps.rpmbuild.outputs.SRPM}}" + NEW_RPM="${OLD_RPM/el8/alma85}" + NEW_SRPM=${OLD_SRPM/el8/alma85} + mv "${OLD_RPM}" "${NEW_RPM}" + mv "${OLD_SRPM}" "${NEW_SRPM}" + echo "::set-output name=SRPM::${NEW_SRPM}" + echo "::set-output name=RPM::${NEW_RPM}" + + # See: https://github.com/actions/upload-artifact + - name: Save RPM as artifact + uses: actions/upload-artifact@v2 + with: + name: LIKWID RPM for AlmaLinux 8.5 + path: ${{ steps.rpmrename.outputs.RPM }} + - name: Save SRPM as artifact + uses: actions/upload-artifact@v2 + with: + name: LIKWID SRPM for AlmaLinux 8.5 + path: ${{ steps.rpmrename.outputs.SRPM }} + + # + # Build on UBI 8 using go-toolset + # + UBI-8-RPM-build: + runs-on: ubuntu-latest + # See: https://catalog.redhat.com/software/containers/ubi8/ubi/5c359854d70cc534b3a3784e?container-tabs=gti + container: registry.access.redhat.com/ubi8/ubi:8.5-226.1645809065 + # The job outputs link to the outputs of the 'rpmbuild' step + outputs: + rpm : ${{steps.rpmbuild.outputs.RPM}} + srpm : ${{steps.rpmbuild.outputs.SRPM}} + steps: + + # Use dnf to install development packages + - name: Install development packages + run: | + dnf --assumeyes --disableplugin=subscription-manager install rpm-build rpm-build-libs rpm-libs gcc make python38 git wget openssl-devel diffutils delve which + dnf --assumeyes --disableplugin=subscription-manager install 'dnf-command(builddep)' + + # Enable powertools repository for dnf (required for some dependencies) + #- name: Enable powertools repository + # run: | + # dnf --assumeyes --disableplugin=subscription-manager install dnf-plugins-core + # dnf --assumeyes --disableplugin=subscription-manager install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + # dnf repolist + # subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms + # /usr/bin/crb enable + + # Checkout git repository and submodules + # fetch-depth must be 0 to use git describe + # See: https://github.com/marketplace/actions/checkout + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + + # Use dnf to install build dependencies + - name: Install build dependencies + run: | + dnf --assumeyes --disableplugin=subscription-manager builddep packaging/rpm/likwid.spec + + - name: RPM build LIKWID + id: rpmbuild + run: make RPM + + # See: https://github.com/actions/upload-artifact + - name: Save RPM as artifact + uses: actions/upload-artifact@v2 + with: + name: LIKWID RPM for UBI 8 + path: ${{ steps.rpmbuild.outputs.RPM }} + - name: Save SRPM as artifact + uses: actions/upload-artifact@v2 + with: + name: LIKWID SRPM for UBI 8 + path: ${{ steps.rpmbuild.outputs.SRPM }} + + # + # Build on Ubuntu 20.04 + # + Ubuntu-focal-build: + runs-on: ubuntu-latest + container: ubuntu:20.04 + # The job outputs link to the outputs of the 'debrename' step + # Only job outputs can be used in child jobs + outputs: + deb : ${{steps.debrename.outputs.DEB}} + steps: + # Use apt to install development packages + - name: Install development packages + run: | + apt update && apt --assume-yes upgrade + apt --assume-yes install build-essential sed git wget bash sudo + # Checkout git repository and submodules + # fetch-depth must be 0 to use git describe + # See: https://github.com/marketplace/actions/checkout + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: DEB build LIKWID + id: dpkg-build + run: | + make DEB + - name: Rename DEB (add '_ubuntu20.04') + id: debrename + run: | + OLD_DEB_NAME=$(echo "${{steps.dpkg-build.outputs.DEB}}" | rev | cut -d '.' -f 2- | rev) + NEW_DEB_FILE="${OLD_DEB_NAME}_ubuntu20.04.deb" + mv "${{steps.dpkg-build.outputs.DEB}}" "${NEW_DEB_FILE}" + echo "::set-output name=DEB::${NEW_DEB_FILE}" + # See: https://github.com/actions/upload-artifact + - name: Save DEB as artifact + uses: actions/upload-artifact@v2 + with: + name: LIKWID DEB for Ubuntu 20.04 + path: ${{ steps.debrename.outputs.DEB }} + + # + # Create release with fresh RPMs + # + Release: + runs-on: ubuntu-latest + # We need the RPMs, so add dependency + needs: [AlmaLinux-RPM-build, UBI-8-RPM-build, Ubuntu-focal-build] + + steps: + # See: https://github.com/actions/download-artifact + - name: Download AlmaLinux 8.5 RPM + uses: actions/download-artifact@v2 + with: + name: LIKWID RPM for AlmaLinux 8.5 + - name: Download AlmaLinux 8.5 SRPM + uses: actions/download-artifact@v2 + with: + name: LIKWID SRPM for AlmaLinux 8.5 + + - name: Download UBI 8 RPM + uses: actions/download-artifact@v2 + with: + name: LIKWID RPM for UBI 8 + - name: Download UBI 8 SRPM + uses: actions/download-artifact@v2 + with: + name: LIKWID SRPM for UBI 8 + + - name: Download Ubuntu 20.04 DEB + uses: actions/download-artifact@v2 + with: + name: LIKWID DEB for Ubuntu 20.04 + + # The download actions do not publish the name of the downloaded file, + # so we re-use the job outputs of the parent jobs. The files are all + # downloaded to the current folder. + # The gh-release action afterwards does not accept file lists but all + # files have to be listed at 'files'. The step creates one output per + # RPM package (2 per distro) + - name: Set RPM variables + id: files + run: | + ALMA_85_RPM=$(basename "${{ needs.AlmaLinux-RPM-build.outputs.rpm}}") + ALMA_85_SRPM=$(basename "${{ needs.AlmaLinux-RPM-build.outputs.srpm}}") + UBI_8_RPM=$(basename "${{ needs.UBI-8-RPM-build.outputs.rpm}}") + UBI_8_SRPM=$(basename "${{ needs.UBI-8-RPM-build.outputs.srpm}}") + U_2004_DEB=$(basename "${{ needs.Ubuntu-focal-build.outputs.deb}}") + echo "ALMA_85_RPM::${ALMA_85_RPM}" + echo "ALMA_85_SRPM::${ALMA_85_SRPM}" + echo "UBI_8_RPM::${UBI_8_RPM}" + echo "UBI_8_SRPM::${UBI_8_SRPM}" + echo "U_2004_DEB::${U_2004_DEB}" + echo "::set-output name=ALMA_85_RPM::${ALMA_85_RPM}" + echo "::set-output name=ALMA_85_SRPM::${ALMA_85_SRPM}" + echo "::set-output name=UBI_8_RPM::${UBI_8_RPM}" + echo "::set-output name=UBI_8_SRPM::${UBI_8_SRPM}" + echo "::set-output name=U_2004_DEB::${U_2004_DEB}" + + # Get the tag name but remove beginning 'v' + - name: Get version + id: get_version + run: | + VERSION=${{github.ref_name}} + echo ::set-output name=VERSION::${VERSION#v} + + # See: https://github.com/softprops/action-gh-release + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + name: likwid-${{steps.get_version.outputs.VERSION}} + files: | + ${{ steps.files.outputs.ALMA_85_RPM }} + ${{ steps.files.outputs.ALMA_85_SRPM }} + ${{ steps.files.outputs.UBI_8_RPM }} + ${{ steps.files.outputs.UBI_8_SRPM }} + ${{ steps.files.outputs.U_2004_DEB }} diff --git a/.github/workflows/buildtests.yml b/.github/workflows/buildtests.yml new file mode 100644 index 000000000..dc76d7c87 --- /dev/null +++ b/.github/workflows/buildtests.yml @@ -0,0 +1,22 @@ +name: LIKWID Build Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-x86-accessdaemon: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: make accessdaemon + run: make ACCESSMODE=accessdaemon + + build-x86-perfevent: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: make perf_event + run: make ACCESSMODE=perf_event diff --git a/Makefile b/Makefile index 5739bf7e8..e133bdb7e 100644 --- a/Makefile +++ b/Makefile @@ -26,11 +26,13 @@ # # ======================================================================================= -SRC_DIR = ./src -DOC_DIR = ./doc -GROUP_DIR = ./groups -FILTER_DIR = ./filters -MAKE_DIR = ./make +BASE_DIR = $(shell pwd) +SRC_DIR = $(BASE_DIR)/src +DOC_DIR = $(BASE_DIR)/doc +GROUP_DIR = $(BASE_DIR)/groups +FILTER_DIR = $(BASE_DIR)/filters +MAKE_DIR = $(BASE_DIR)/make +EXAMPLES_DIR = $(BASE_DIR)/examples Q ?= @ @@ -145,7 +147,7 @@ PERFMONHEADERS = $(patsubst $(SRC_DIR)/includes/%.txt, $(BUILD_DIR)/%.h,$(wildc OBJ_LUA = $(wildcard ./ext/lua/$(COMPILER)/*.o) OBJ_HWLOC = $(wildcard ./ext/hwloc/$(COMPILER)/*.o) OBJ_GOTCHA = $(wildcard ./ext/GOTCHA/$(COMPILER)/*.o) -FILTERS := $(filter-out ./filters/README,$(wildcard ./filters/*)) +FILTERS := $(filter-out $(FILTER_DIR)/README,$(wildcard $(FILTER_DIR)/*)) L_APPS = likwid-perfctr \ @@ -364,7 +366,7 @@ ifneq ($(COMPILER),MIC) install_daemon: @echo "===> INSTALL access daemon to $(ACCESSDAEMON)" @mkdir -p `dirname $(ACCESSDAEMON)` - @install -m 4755 $(INSTALL_CHOWN) $(DAEMON_TARGET) $(ACCESSDAEMON) + install -m 4755 $(INSTALL_CHOWN) $(DAEMON_TARGET) $(ACCESSDAEMON) move_daemon: @echo "===> MOVE access daemon from $(ACCESSDAEMON) to $(INSTALLED_ACCESSDAEMON)" @mkdir -p `dirname $(INSTALLED_ACCESSDAEMON)` @@ -528,25 +530,25 @@ install: install_daemon install_freq install_appdaemon @echo "===> INSTALL headers to $(PREFIX)/include" @mkdir -p $(PREFIX)/include @chmod 755 $(PREFIX)/include - @install -m 644 src/includes/likwid.h $(PREFIX)/include/ + @install -m 644 $(SRC_DIR)/includes/likwid.h $(PREFIX)/include/ @sed -i -e "s//$(VERSION)/g" -e "s//$(DATE)/g" -e "s//$(GITCOMMIT)/g" -e "s//$(MINOR)/g" $(PREFIX)/include/likwid.h - @install -m 644 src/includes/likwid-marker.h $(PREFIX)/include/ - @install -m 644 src/includes/bstrlib.h $(PREFIX)/include/ + @install -m 644 $(SRC_DIR)/includes/likwid-marker.h $(PREFIX)/include/ + @install -m 644 $(SRC_DIR)/includes/bstrlib.h $(PREFIX)/include/ $(FORTRAN_INSTALL) @echo "===> INSTALL groups to $(PREFIX)/share/likwid/perfgroups" @mkdir -p $(PREFIX)/share/likwid/perfgroups @chmod 755 $(PREFIX)/share/likwid @chmod 755 $(PREFIX)/share/likwid/perfgroups - @cp -rf groups/* $(PREFIX)/share/likwid/perfgroups + @cp -rf $(GROUP_DIR)/* $(PREFIX)/share/likwid/perfgroups @chmod 755 $(PREFIX)/share/likwid/perfgroups/* @find $(PREFIX)/share/likwid/perfgroups -name "*.txt" -exec chmod 644 {} \; @echo "===> INSTALL docs and examples to $(PREFIX)/share/likwid/docs" @mkdir -p $(PREFIX)/share/likwid/docs @chmod 755 $(PREFIX)/share/likwid/docs - @install -m 644 doc/bstrlib.txt $(PREFIX)/share/likwid/docs + @install -m 644 $(DOC_DIR)/bstrlib.txt $(PREFIX)/share/likwid/docs @mkdir -p $(PREFIX)/share/likwid/examples @chmod 755 $(PREFIX)/share/likwid/examples - @install -m 644 examples/* $(PREFIX)/share/likwid/examples + @install -m 644 $(EXAMPLES_DIR)/* $(PREFIX)/share/likwid/examples @echo "===> INSTALL filters to $(abspath $(PREFIX)/share/likwid/filter)" @mkdir -p $(abspath $(PREFIX)/share/likwid/filter) @chmod 755 $(abspath $(PREFIX)/share/likwid/filter) @@ -554,7 +556,7 @@ install: install_daemon install_freq install_appdaemon install -m 755 $$F $(abspath $(PREFIX)/share/likwid/filter); \ done @echo "===> INSTALL cmake to $(abspath $(PREFIX)/share/likwid)" - @install -m 644 likwid-config.cmake $(PREFIX)/share/likwid + @install -m 644 $(PWD)/likwid-config.cmake $(PREFIX)/share/likwid move: move_daemon move_freq move_appdaemon @echo "===> MOVE applications from $(BINPREFIX) to $(INSTALLED_BINPREFIX)" @@ -614,7 +616,7 @@ move: move_daemon move_freq move_appdaemon @install -m 644 $(PREFIX)/share/likwid/docs/bstrlib.txt $(INSTALLED_PREFIX)/share/likwid/docs @mkdir -p $(INSTALLED_PREFIX)/share/likwid/examples @chmod 755 $(INSTALLED_PREFIX)/share/likwid/examples - @install -m 644 examples/* $(INSTALLED_PREFIX)/share/likwid/examples + @install -m 644 $(EXAMPLES_DIR)/* $(INSTALLED_PREFIX)/share/likwid/examples @echo "===> MOVE filters from $(abspath $(PREFIX)/share/likwid/filter) to $(LIKWIDFILTERPATH)" @mkdir -p $(LIKWIDFILTERPATH) @chmod 755 $(LIKWIDFILTERPATH) @@ -758,3 +760,65 @@ help: @echo "The common configuration is INSTALLED_PREFIX = PREFIX, so changing PREFIX is enough." @echo "If PREFIX and INSTALLED_PREFIX differ, you have to move anything after 'make install' to" @echo "the INSTALLED_PREFIX. You can also use 'make move' which does the job for you." + +.ONESHELL: +.PHONY: RPM +RPM: packaging/rpm/likwid.spec + @WORKSPACE="$${PWD}" + @SPECFILE="$${WORKSPACE}/packaging/rpm/likwid.spec" + # Setup RPM build tree + @eval $$(rpm --eval "ARCH='%{_arch}' RPMDIR='%{_rpmdir}' SOURCEDIR='%{_sourcedir}' SPECDIR='%{_specdir}' SRPMDIR='%{_srcrpmdir}' BUILDDIR='%{_builddir}'") + @mkdir --parents --verbose "$${RPMDIR}" "$${SOURCEDIR}" "$${SPECDIR}" "$${SRPMDIR}" "$${BUILDDIR}" + # Create source tarball + @COMMITISH="HEAD" + @VERS=$$(git describe --tags --abbrev=0 $${COMMITISH}) + @VERS=$${VERS#v} + @VERS=$$(echo $$VERS | sed -e s+'-'+'_'+g) + @if [ "$${VERS}" = "" ]; then VERS="$(VERSION).$(RELEASE).$(MINOR)"; fi + @eval $$(rpmspec --query --queryformat "NAME='%{name}' VERSION='%{version}' RELEASE='%{release}' NVR='%{NVR}' NVRA='%{NVRA}'" --define="VERS $${VERS}" "$${SPECFILE}") + @PREFIX="$${NAME}-$${VERSION}" + @FORMAT="tar.gz" + @SRCFILE="$${SOURCEDIR}/$${PREFIX}.$${FORMAT}" + @git archive --verbose --format "$${FORMAT}" --prefix="$${PREFIX}/" --output="$${SRCFILE}" $${COMMITISH} + # Build RPM and SRPM + @rpmbuild -ba --define="VERS $${VERS}" --rmsource --clean "$${SPECFILE}" + # Report RPMs and SRPMs when in GitHub Workflow + @if [[ "$${GITHUB_ACTIONS}" == true ]]; then + @ RPMFILE="$${RPMDIR}/$${ARCH}/$${NVRA}.rpm" + @ SRPMFILE="$${SRPMDIR}/$${NVR}.src.rpm" + @ echo "RPM: $${RPMFILE}" + @ echo "SRPM: $${SRPMFILE}" + @ echo "::set-output name=SRPM::$${SRPMFILE}" + @ echo "::set-output name=RPM::$${RPMFILE}" + @fi + +.PHONY: DEB +DEB: packaging/deb/likwid.deb.control + @BASEDIR=$${PWD} + @WORKSPACE=$${PWD}/.dpkgbuild + @DEBIANDIR=$${WORKSPACE}/debian + @DEBIANBINDIR=$${WORKSPACE}/DEBIAN + @mkdir --parents --verbose $$WORKSPACE $$DEBIANBINDIR + @make PREFIX=$$WORKSPACE INSTALLED_PREFIX=$(PREFIX) + #@mkdir --parents --verbose $$DEBIANDIR + @CONTROLFILE="$${BASEDIR}/packaging/deb/likwid.deb.control" + @COMMITISH="HEAD" + @VERS=$$(git describe --tags --abbrev=0 $${COMMITISH}) + @VERS=$${VERS#v} + @VERS=$$(echo $$VERS | sed -e s+'-'+'_'+g) + @ARCH=$$(uname -m) + @ARCH=$$(echo $$ARCH | sed -e s+'_'+'-'+g) + @if [ "$${ARCH}" = "x86-64" ]; then ARCH=amd64; fi + @if [ "$${VERS}" = "" ]; then VERS="$(VERSION).$(RELEASE).$(MINOR)"; fi + @PREFIX="$${NAME}-$${VERSION}_$${ARCH}" + @SIZE_BYTES=$$(du -bcs --exclude=.dpkgbuild "$$WORKSPACE"/ | awk '{print $$1}' | head -1 | sed -e 's/^0\+//') + @SIZE="$$(awk -v size="$$SIZE_BYTES" 'BEGIN {print (size/1024)+1}' | awk '{print int($$0)}')" + #@sed -e s+"{VERSION}"+"$$VERS"+g -e s+"{INSTALLED_SIZE}"+"$$SIZE"+g -e s+"{ARCH}"+"$$ARCH"+g $$CONTROLFILE > $${DEBIANDIR}/control + @sed -e s+"{VERSION}"+"$$VERS"+g -e s+"{INSTALLED_SIZE}"+"$$SIZE"+g -e s+"{ARCH}"+"$$ARCH"+g $$CONTROLFILE > $${DEBIANBINDIR}/control + @sudo make PREFIX=$$WORKSPACE INSTALLED_PREFIX=$(PREFIX) install + @DEB_FILE="likwid_$${VERS}_$${ARCH}.deb" + @dpkg-deb -b $${WORKSPACE} "$$DEB_FILE" + @sudo rm -r "$${WORKSPACE}" + @if [ "$${GITHUB_ACTIONS}" = "true" ]; then + @ echo "::set-output name=DEB::$${DEB_FILE}" + @fi diff --git a/config.mk b/config.mk index d7cca2766..fc0a54de0 100644 --- a/config.mk +++ b/config.mk @@ -125,9 +125,9 @@ TOPO_FILE_PATH = /etc/likwid_topo.cfg # The libraries are named liblikwid.. VERSION = 5 RELEASE = 2 -MINOR = 0 +MINOR = 3 # Date when the release is published -DATE = 15.06.2021 +DATE = 12.12.2022 # In come cases it is important to set the rpaths for the LIKWID library. One # example is the use of sudo because it resets environment variables like diff --git a/packaging/deb/likwid.deb.control b/packaging/deb/likwid.deb.control new file mode 100644 index 000000000..85592f959 --- /dev/null +++ b/packaging/deb/likwid.deb.control @@ -0,0 +1,12 @@ +Package: likwid +Version: {VERSION} +Installed-Size: {INSTALLED_SIZE} +Architecture: {ARCH} +Maintainer: thomas.gruber@fau.de +Depends: libc6 (>= 2.2.1) +Build-Depends: debhelper-compat (= 13) +Description: Performance tools for the Linux console +Homepage: https://github.com/RRZE-HPC/likwid/ +Source: likwid +Rules-Requires-Root: no + diff --git a/packaging/rpm/likwid.png b/packaging/rpm/likwid.png deleted file mode 120000 index bf8a0e9aa..000000000 --- a/packaging/rpm/likwid.png +++ /dev/null @@ -1 +0,0 @@ -../../doc/likwid-icon.png \ No newline at end of file diff --git a/packaging/rpm/likwid.spec b/packaging/rpm/likwid.spec index edd625656..d7f000a02 100644 --- a/packaging/rpm/likwid.spec +++ b/packaging/rpm/likwid.spec @@ -1,13 +1,12 @@ Name: likwid -Version: 5.0.0 -Release: 1 -Source: likwid-5.0.0.tar.gz +Version: %{VERS} +Release: 1%{?dist} +Source: likwid-%{VERS}.tar.gz License: GPL-3.0+ Group: Development/Tools Packager: Holger Obermaier Summary: Performance tools for the Linux console URL: https://github.com/RRZE-HPC/likwid/ -Icon: likwid.png %if 0%{?fedora} BuildRequires: gcc-gfortran %if %{fedora} > 0 @@ -26,7 +25,7 @@ BuildRequires: lua-devel %endif %if 0%{?rhel} -BuildRequires: gcc-gfortran lua-devel +BuildRequires: gcc-gfortran %endif %if 0%{?opensuse_bs} @@ -81,46 +80,46 @@ It consists of: Sweep memory of NUMA domains and evict cachelines from the last level cache -%package bench -Summary: The micro benchmarking tool of LIKWID for assembly benchmarks. -Group: Applications/Tools -%description bench -The likwid-bench micro benchmarking tool enabled easy determination of system -capabilities like maximal bandwidths or maximal FLOP rate. It takes care about -the data and thread placement and performs time measurements and the evaluation -of the benchmark including the read data volume, number of executed assembly -instructions, executed micro-ops and many more. - -%package perfscope -Summary: Frontend to the timeline mode of likwid-perfctr, plots live graphs of performance metrics using gnuplot. -Group: Applications/Tools -Requires: gnuplot -%description perfscope -likwid-perfscope is a command line application written in Lua that uses the timeline mode of likwid-perfctr to create on-the-fly pictures with the current measurements. It uses the feedGnuplot Perl script to send the current data to gnuplot. In order to make it more convenient for users, preconfigured plots of interesting metrics are embedded into likwid-perfscope. Since the plot windows are normally closed directly after the execution of the monitored applications, likwid-perfscope waits until Ctrl+c is pressed. - -%package setFrequencies -Summary: Tool to control the CPU frequency. -Group: Applications/Tools -%description setFrequencies -Often systems are configured to use as little power as needed and therefore reduce the clock frequency of single cores. For benchmarking purpose, it is important to have a defined environment where all CPU cores work at the same speed. The operation is commonly only allowed to privileged users since it may interfere with the needs of other users. - -%package mpirun -Summary: Wrapper to start MPI and Hybrid MPI/OpenMP applications. -Group: Applications/Tools -%description mpirun -Pinning to dedicated compute resources is important for pure MPI and even more for hybrid MPI/threaded applications. While all major MPI implementations include their mechanism for pinning, likwid-mpirun provides a simple and portable solution based on the powerful capabilities of likwid-pin. This is still experimental at the moment. Still it can be adopted to any MPI and OpenMP combination with the help of a tuning application in the test directory of LIKWID. likwid-mpirun works in conjunction with PBS, LoadLeveler and SLURM. The tested MPI and compilers are Intel C/C++ compiler, GCC, Intel MPI and OpenMPI. The support for mvapich is untested. - -%package devel -Summary: Header files for LIKWID library -Group: Applications/Tools -%description devel -The header files for embedding LIKWID into own applications with either the Marker API or the full API. The library is part of the main release as it is needed by the LIKWID applications. - -%package examples -Summary: Example applications using the LIKWID library -Group: Applications/Tools -%description examples -Some examples how to use the LIKWID library for hardware performance measurements. +#%package bench +#Summary: The micro benchmarking tool of LIKWID for assembly benchmarks. +#Group: Applications/Tools +#%description bench +#The likwid-bench micro benchmarking tool enabled easy determination of system +#capabilities like maximal bandwidths or maximal FLOP rate. It takes care about +#the data and thread placement and performs time measurements and the evaluation +#of the benchmark including the read data volume, number of executed assembly +#instructions, executed micro-ops and many more. + +#%package perfscope +#Summary: Frontend to the timeline mode of likwid-perfctr, plots live graphs of performance metrics using gnuplot. +#Group: Applications/Tools +#Requires: gnuplot +#%description perfscope +#likwid-perfscope is a command line application written in Lua that uses the timeline mode of likwid-perfctr to create on-the-fly pictures with the current measurements. It uses the feedGnuplot Perl script to send the current data to gnuplot. In order to make it more convenient for users, preconfigured plots of interesting metrics are embedded into likwid-perfscope. Since the plot windows are normally closed directly after the execution of the monitored applications, likwid-perfscope waits until Ctrl+c is pressed. + +#%package setFrequencies +#Summary: Tool to control the CPU frequency. +#Group: Applications/Tools +#%description setFrequencies +#Often systems are configured to use as little power as needed and therefore reduce the clock frequency of single cores. For benchmarking purpose, it is important to have a defined environment where all CPU cores work at the same speed. The operation is commonly only allowed to privileged users since it may interfere with the needs of other users. + +#%package mpirun +#Summary: Wrapper to start MPI and Hybrid MPI/OpenMP applications. +#Group: Applications/Tools +#%description mpirun +#Pinning to dedicated compute resources is important for pure MPI and even more for hybrid MPI/threaded applications. While all major MPI implementations include their mechanism for pinning, likwid-mpirun provides a simple and portable solution based on the powerful capabilities of likwid-pin. This is still experimental at the moment. Still it can be adopted to any MPI and OpenMP combination with the help of a tuning application in the test directory of LIKWID. likwid-mpirun works in conjunction with PBS, LoadLeveler and SLURM. The tested MPI and compilers are Intel C/C++ compiler, GCC, Intel MPI and OpenMPI. The support for mvapich is untested. + +#%package devel +#Summary: Header files for LIKWID library +#Group: Applications/Tools +#%description devel +#The header files for embedding LIKWID into own applications with either the Marker API or the full API. The library is part of the main release as it is needed by the LIKWID applications. + +#%package examples +#Summary: Example applications using the LIKWID library +#Group: Applications/Tools +#%description examples +#Some examples how to use the LIKWID library for hardware performance measurements. %prep %setup @@ -153,7 +152,6 @@ COMPILER="GCC" INSTALLED_BINPREFIX="%{_bindir}" \ INSTALLED_LIBPREFIX="%{_libdir}" \ COMPILER="${COMPILER}" \ - INSTALL_CHOWN="-o $USER" \ INSTRUMENT_BENCH="true" \ FC="gfortran" \ FCFLAGS="-J ./ -fsyntax-only" \ @@ -181,8 +179,8 @@ COMPILER="GCC" INSTALLED_PREFIX="%{_prefix}" \ INSTALLED_BINPREFIX="%{_bindir}" \ INSTALLED_LIBPREFIX="%{_libdir}" \ + INSTALLED_MANPREFIX="%{_mandir}" \ COMPILER="${COMPILER}" \ - INSTALL_CHOWN="-o $USER" \ INSTRUMENT_BENCH="true" \ FC="gfortran" \ FCFLAGS="-J ./ -fsyntax-only" \ @@ -191,16 +189,16 @@ COMPILER="GCC" chmod 755 $RPM_BUILD_ROOT/%{_prefix}/sbin/likwid-accessD chmod 755 $RPM_BUILD_ROOT/%{_prefix}/sbin/likwid-setFreq -%post -n likwid +%post /sbin/ldconfig +chown root:root $RPM_BUILD_ROOT/%{_prefix}/sbin/likwid-accessD chmod u+s $RPM_BUILD_ROOT/%{_prefix}/sbin/likwid-accessD +chown root:root $RPM_BUILD_ROOT/%{_prefix}/sbin/likwid-setFreq +chmod u+s $RPM_BUILD_ROOT/%{_prefix}/sbin/likwid-setFreq -%postun -n likwid +%postun /sbin/ldconfig -%post setFrequencies -chmod u+s $RPM_BUILD_ROOT/%{_prefix}/sbin/likwid-setFreq - %clean rm -rf $RPM_BUILD_ROOT @@ -214,13 +212,21 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/likwid-pin %{_bindir}/likwid-powermeter %{_bindir}/likwid-topology +%{_bindir}/likwid-bench +%{_bindir}/likwid-mpirun +%{_bindir}/feedGnuplot +%{_bindir}/likwid-perfscope +%{_bindir}/likwid-setFrequencies +%{_sbindir}/likwid-setFreq %{_sbindir}/likwid-accessD %{_libdir}/* %{_datadir}/likwid/docs %{_datadir}/likwid/perfgroups %{_datadir}/likwid/filter -%{_datadir}/likwid/* +%{_datadir}/likwid/*.cmake +%{_datadir}/likwid/examples %{_datadir}/lua/likwid.lua +%{_includedir}/* %doc COPYING README.md INSTALL %doc %{_mandir}/man*/likwid-features* %doc %{_mandir}/man*/likwid-genTopoCfg* @@ -231,35 +237,12 @@ rm -rf $RPM_BUILD_ROOT %doc %{_mandir}/man*/likwid-powermeter* %doc %{_mandir}/man*/likwid-topology* %doc %{_mandir}/man*/likwid-accessD* - - -%files bench -%defattr(-,root,root) -%{_bindir}/likwid-bench %doc %{_mandir}/man*/likwid-bench* - -%files perfscope -%defattr(-,root,root) -%{_bindir}/feedGnuplot -%{_bindir}/likwid-perfscope %doc %{_mandir}/man*/likwid-perfscope* %doc %{_mandir}/man*/feedGnuplot* - -%files setFrequencies -%{_bindir}/likwid-setFrequencies -%{_sbindir}/likwid-setFreq %doc %{_mandir}/man*/likwid-setFrequencies* %doc %{_mandir}/man*/likwid-setFreq* - -%files mpirun -%defattr(-,root,root) -%{_bindir}/likwid-mpirun %doc %{_mandir}/man*/likwid-mpirun* -%files devel -%defattr(-,root,root) -%{_includedir}/* -%files examples -%defattr(-,root,root) -%{_datadir}/likwid/examples +