# Copyright (C) 2018 Dave Love University of Manchester # MIT licence %{?scl: %scl_package scorep-plugins %global scldash %scl- } %{!?scl: %global pkg_name %{name} %global scldash %nil %global _root_libdir %_libdir %global _root_prefix %_prefix } # v1.0 in this case %global pythoncommit 6a766ae3fe716d0ea9fdc4c6ca4278cf09aacf7e %global pythonshort %(c=%{pythoncommit}; echo ${c:0:7}) %global commoncommit d886999490c68b262fadc5c5769cc17dc6b5da4c %global commonshort %(c=%{commoncommit}; echo ${c:0:7}) # fileparser 1.0 %global filecommit 5882dceacabae90a1c92cf9904c0cdfc6e11e155 %global fileshort %(c=%{filecommit}; echo ${c:0:7}) %global sensorscommit 9e18acbf635e77eb1f8ebaedd45247af9ad2a069 %global sensorsshort %(c=%{sensorscommit}; echo ${c:0:7}) %global perfcommit 8ed313f952a9a335490e580a7aa62bb09bed4e71 %global perfshort %(c=%{perfcommit}; echo ${c:0:7}) %global perfbpcommit e63789052317e095177f15a77172ae73d8bae227 %global perfbpshort %(c=%{perfbpcommit}; echo ${c:0:7}) %global perfcompcommit 516b72cb5c68a4bdeaab994d443f86fd276068d9 %global perfcompshort %(c=%{perfcompcommit}; echo ${c:0:7}) %global otfclicommit 9be64dec639cd2d69eae867ad8b8c6de0f56b9e3 %global otfclishort %(c=%{otfclicommit}; echo ${c:0:7}) %global apapicommit 17cd580bcbd208380ee314b1be23d40bb14b8f88 %global apapishort %(c=%{apapicommit}; echo ${c:0:7}) %global mpdcommit 416d0d2b40d39013630ab84e6094f424e20c3642 %global mpdshort %(c=%{mpdcommit}; echo ${c:0:7}) %global mergecommit a7421dd633f12a614d07c1554f7940d0bf0ed337 %global mergeshort %(c=%{mpdcommit}; echo ${c:0:7}) %global plugins fileparser libsensors perf perf_breakpoint perfcomponent apapi metric_papi_derived %global instlist fileparser sensors perf perf_breakpoint perfcomponent apapi metric_papi_derived # This should be something scorep-specific, probablu using rpath %global instdir %_libdir/scorep Name: %{?scl_prefix}scorep-plugins Version: 20200624 Release: 1%{?dist} Summary: A collection of plugins for scorep License: BSD and Python URL: https://github.com/score-p Source0: https://github.com/score-p/scorep_plugin_common/archive/%commoncommit/scorep_plugin_common-%commonshort.tar.gz Source1: https://github.com/score-p/scorep_binding_python/archive/%pythoncommit/scorep_binding_python-%pythonshort.tar.gz Source2: https://github.com/score-p/scorep_plugin_fileparser/archive/%filecommit/scorep_plugin_fileparser-%fileshort.tar.gz Source3: https://github.com/score-p/scorep_plugin_libsensors/archive/%sensorscommit/scorep_plugin_libsensors-%sensorsshort.tar.gz Source4: https://github.com/score-p/scorep_plugin_perf/archive/%perfcommit/scorep_plugin_perf-%perfshort.tar.gz Source5: https://github.com/score-p/scorep_plugin_perf_breakpoint/archive/%perfbpcommit/scorep_plugin_perf_breakpoint-%perfbpshort.tar.gz Source6: https://github.com/score-p/scorep_plugin_perfcomponent/archive/%perfcompcommit/scorep_plugin_perfcomponent-%perfcompshort.tar.gz Source7: https://github.com/score-p/otf2_cli_profile/archive/%otfclicommit/otf2_cli_profile-%otfclishort.tar.gz Source8: https://github.com/score-p/scorep_plugin_apapi/archive/%apapicommit/scorep_plugin_apapi-%apapishort.tar.gz Source9: https://github.com/score-p/scorep_plugin_metric_papi_derived/archive/%mpdcommit/scorep_plugin_metric_papi_derived-%mpdshort.tar.gz Source10: https://github.com/score-p/otf2_merger/archive/%mergecommit/archive/%mergecommit/scorep_plugin_otf2_merger-%mergeshort.tar.gz # Fix otf version required Patch3: otf2_merger-cmake.patch BuildRequires: %{?scl_prefix}scorep cmake3 %if 0%{?el7} BuildRequires:devtoolset-9-gcc-c++ %else BuildRequires: gcc-c++ %endif %{?scl:Requires: %scl_runtime} %description A collection of plugins for scorep. %package -n %{scldash}python2-scorep-openmpi Summary: A module that allows tracing of python scripts using Score-P BuildRequires: python2-devel openmpi-devel Requires: %{?scl_prefix}scorep-openmpi%{?_isa} python2-mpi4py-openmpi%{?_isa} %description -n %{scldash}python2-scorep-openmpi A module that allows tracing of python scripts using Score-P. # No python3 mpi4py in el7 %if 0%{?fedora} || 0%{?rhel} > 7 %package -n %{scldash}python3-scorep-openmpi Summary: A module that allows tracing of python scripts using Score-P BuildRequires: python3-devel openmpi-devel Requires: %{?scl_prefix}scorep-openmpi%{?_isa} python3-mpi4py-openmpi%{?_isa} %description -n %{scldash}python3-scorep-openmpi A module that allows tracing of python scripts using Score-P. %endif %package -n %{scldash}scorep-plugin-fileparser Summary: Score-P plugin for logging system parameters from file descriptors BuildRequires: %{?scl_prefix}scorep%{?_isa} Requires: %{?scl_prefix}scorep%{?_isa} %description -n %{scldash}scorep-plugin-fileparser A Score-P plugin for logging any value available via standard file descriptors on a machine. E.g. one can log: * the CPU clock rate from /proc/cpuinfo * the current temperature of CPU core 0 from /sys/class/hwmon/hwmon0/temp1_input * the current count of bytes downloaded from /proc/net/netstat and many more parameters. %package -n %{scldash}scorep-plugin-libsensors Summary: Score-P plugin for lm_sensors BuildRequires: lm_sensors-devel Requires: %{?scl_prefix}scorep%{?_isa} %description -n %{scldash}scorep-plugin-libsensors A Score-P plugin for values obtained from lm_sensors. %package -n %{scldash}scorep-plugin-perf Summary: Score-P plugin for Linux perf counters Requires: %{?scl_prefix}scorep%{?_isa} %description -n %{scldash}scorep-plugin-perf A Score-P plugin for Linux perf counters. %package -n %{scldash}scorep-plugin-perf-breakpoint Summary: Score-P plugin for monitoring function/variable access via perf Requires: %{?scl_prefix}scorep%{?_isa} %description -n %{scldash}scorep-plugin-perf-breakpoint A Score-P plugin for monitoring the execution of functions or the access to variables via Linux perf. %package -n %{scldash}scorep-plugin-perf-component Summary: Score-P plugin perf counter component plugin Requires: %{?scl_prefix}scorep%{?_isa} %description -n %{scldash}scorep-plugin-perf-component Score-P plugin perf counter component plugin. %package -n %{scldash}scorep-otf-cli-profile Summary: Profilig tool reading OTF trace files BuildRequires: %{?scl_prefix}otf2-devel %{?scl_prefix}cube-devel BuildRequires: openmpi-devel zlib-devel rapidjson-devel Requires: %{?scl_prefix}scorep%{?_isa} %description -n %{scldash}scorep-otf-cli-profile Profiling tool to read exiisting trace files with support for OTF, OTF2 and various output formats. %package -n %{scldash}scorep-plugin-apapi Summary: Score-P asynchronous plugin for sampling PAPI performance counters BuildRequires: papi-devel >= 5.2 Requires: %{?scl_prefix}scorep%{?_isa} %description -n %{scldash}scorep-plugin-apapi An asynchronous Score-P plugin for sampling PAPI performance counters. %package -n %{scldash}scorep-plugin-metric-papi-derived Summary: Score-P synchronous plugin for derived PAPI performance counters BuildRequires: papi-devel >= 5.2 Requires: %{?scl_prefix}scorep%{?_isa} %description -n %{scldash}scorep-plugin-metric-papi-derived Score-P synchronous plugin for derived PAPI performance counters. %package -n %{scldash}scorep-otf2-merger Summary: Merge OTF2 trace files BuildRequires: %{?scl_prefix}otf2-devel openmpi-devel zlib-devel %description -n %{scldash}scorep-otf2-merger A synchronous plugin metric for measuring derived PAPI performance counters. %prep %setup -q -c tar fx %SOURCE0 tar fx %SOURCE1 tar fx %SOURCE2 tar fx %SOURCE3 tar fx %SOURCE4 tar fx %SOURCE5 tar fx %SOURCE6 tar fx %SOURCE7 tar fx %SOURCE8 tar fx %SOURCE9 tar fx %SOURCE10 pushd otf2_merger* %patch3 -p1 popd find scorep_binding_python* -name \*.pyc -delete mv scorep_plugin_common* common for d in %plugins; do rm -rf scorep_plugin_$d-*/common cp -a common scorep_plugin_$d-* done %build %{?scl:. %_scl_scripts/enable} pushd otf2_cli_profile-* %_openmpi_load CUBELIB_CONFIG=`which cubelib-config` \ %cmake3 . -DOTF2_USE_STATIC_LIBS=no -DUSE_CUBE=no # -DCUBE_INC_DIR=/opt/rh/loveshack-profiling-backports/root/usr/include -DCUBE_LIB_DIR=/opt/rh/loveshack-profiling-backports/root/usr/lib64 -DCUBE_LIBS='-lcube4 -lz' -DCUBE_LIBRARIESS='-lcube4 -lz' %_openmpi_unload popd pushd otf2_merger* %_openmpi_load (%{?el7:. /opt/rh/devtoolset-9/enable} %cmake3 . -DOTF2_USE_STATIC_LIBS=no ) %_openmpi_unload popd pushd scorep_binding_python* %_openmpi_load %global __python /usr/bin/python2 %{?scl:PATH=%_libdir/openmpi/bin:$PATH LD_LIBRARY_PATH=%_libdir/openmpi/lib:$LD_LIBRARY_PATH} %py_build %_openmpi_unload %py_build popd export CFLAGS=-std=gnu99 for d in %plugins; do pushd scorep_plugin_$d-* rm -f makefile # Assume plugin-specific options don't cause trouble generally %cmake3 -DSENSORS_STATIC=OFF -DSENSORS_LIB=%_root_libdir %make_build popd done %install %{?scl:. %_scl_scripts/enable} %_openmpi_load pushd scorep_binding_python* %{?scl:PATH=%_libdir/openmpi/bin:$PATH LD_LIBRARY_PATH=%_libdir/openmpi/lib:$LD_LIBRARY_PATH} %py2_install find -name \*o -delete %if 0%{?fedora} || 0%{?rhel} > 7 %{?scl:PATH=%_libdir/openmpi/bin:$PATH LD_LIBRARY_PATH=%_libdir/openmpi/lib:$LD_LIBRARY_PATH} %py3_install %endif %_openmpi_unload popd mkdir -p %buildroot%_libdir/openmpi/lib/scorep for d in %plugins; do pushd scorep_plugin_$d-* %make_install popd done %make_install -C otf2_cli_profile-* mkdir -p %buildroot%instdir mv %buildroot/lib/lib*.so %buildroot%instdir/ rmdir %buildroot/lib mv %buildroot%_prefix/lib/lib*.so %buildroot%instdir/ %check # possibly for python %files -n %{scldash}python2-scorep-openmpi %doc scorep_binding_python*/README.md %license scorep_binding_python*/LICENSE %python2_sitearch/*scorep* %if 0%{?fedora} || 0%{?rhel} > 7 %files -n %{scldash}python3-scorep-openmpi %doc scorep_binding_python*/README.md %license scorep_binding_python*/LICENSE %python3_sitearch/*scorep* %endif %files -n %{scldash}scorep-plugin-fileparser %license scorep_plugin_fileparser*/LICENSE %doc scorep_plugin_fileparser*/README.md %instdir/libfileparser_plugin.so %files -n %{scldash}scorep-plugin-libsensors %license scorep_plugin_libsensors*/LICENSE %doc scorep_plugin_libsensors*/README.md scorep_plugin_libsensors*/AUTHORS %doc scorep_plugin_libsensors*/CHANGELOG scorep_plugin_libsensors*/VERSION %instdir/libsensors_plugin.so %files -n %{scldash}scorep-plugin-perf %license scorep_plugin_perf-*/LICENSE %doc scorep_plugin_perf-*/README.md scorep_plugin_perf-*/AUTHORS %doc scorep_plugin_perf-*/CHANGELOG scorep_plugin_perf-*/VERSION %instdir/libperf_plugin.so %files -n %{scldash}scorep-plugin-perf-breakpoint %license scorep_plugin_perf_breakpoint-*/LICENSE %doc scorep_plugin_perf_breakpoint-*/README.md %doc scorep_plugin_perf_breakpoint-*/AUTHORS %instdir/libperfbreakpoint_plugin.so %files -n %{scldash}scorep-plugin-perf-component %license scorep_plugin_perfcomponent-*/LICENSE %doc scorep_plugin_perfcomponent-*/README.md %doc scorep_plugin_perfcomponent-*/AUTHORS %doc scorep_plugin_perfcomponent-*/VERSION %doc scorep_plugin_perfcomponent-*/CHANGELOG %instdir/libperfcomponent_plugin.so %files -n %{scldash}scorep-otf-cli-profile %license otf2_cli_profile-*/LICENSE %doc otf2_cli_profile-*/AUTHORS otf2_cli_profile-*/README.md %_bindir/otf-profiler %files -n %{scldash}scorep-plugin-apapi %license scorep_plugin_apapi-*/LICENSE %doc scorep_plugin_apapi-*/AUTHORS scorep_plugin_apapi-*/README.md %instdir/libapapi_plugin.so %files -n %{scldash}scorep-plugin-metric-papi-derived %license scorep_plugin_metric_papi_derived-*/LICENSE %doc scorep_plugin_metric_papi_derived-*/README.md %instdir/libpapiDerived.so %changelog * Thu Jul 9 2020 Dave Love - 20200624-1 - Update python plugin * Fri Feb 21 2020 Dave love - 20200219-1 - New versions of otf and python plugins * Fri Oct 4 2019 Dave Love - 20191005-1 - New versions * Fri Sep 13 2019 Dave Love - 20190913-1 - Python, perf-component, and otf2-profile updates * Thu Feb 14 2019 Dave Love - 20190214-1 - cli_profile and python updates * Wed Jan 2 2019 Dave Love - 20181019-2 - Updates * Mon Oct 22 2018 Dave Love - 20181019-1 - Extra plugins, change versioning * Tue Mar 27 2018 Dave Love - 0-20180327 - Initial packaging