# Copyright (c) 2014 Dave Love, University of Liverpool # Copyright (c) 2018, 2019 Dave Love, University of Manchester # Licence as for the package itself # fixme: mpich version # build html docs (at least missing "classic" theme on epel7) # build java support %global papi_home /opt/rh/papi60/root/usr # We might want a newer papi. %{!?papi_home:%global papi_home %_prefix} # See the %%check stanza %bcond_with check %ifarch %{ix86} x86_64 ppc64 # https://github.com/bsc-performance-tools/extrae/issues/30 %{?el7:%global dyninst 1} %endif %if 0%{?rhel} %ifarch %{arm} aarch64 %{ix86} x86_64 %{power64} %global unwind 1 %endif %else %global unwind 1 %endif %global with_openmpi3 0%{?el7} # Fixme: building JNI fails: # In file included from /usr/include/stdio.h:74:0, # from ../../../src/java-connector/jni/extrae_wrapper.c:27: # /usr/include/libio.h:307:3: error: unknown type name 'size_t' # size_t __pad5; # ^ #%%global usejava 1 Name: extrae Version: 4.0.1 Release: 1%{?dist} Summary: Paraver/Dimemas instrumentation package License: LGPLv2 URL: https://tools.bsc.es/extrae Source0: https://ftp.tools.bsc.es/extrae/extrae-%version-src.tar.bz2 Source1: runextrae.sh Source2: extrae-README.fedora Source3: extrae.sh Patch2: extrae-dyninst.patch # Add -lsiongen to the libs list to avoid link errors #Patch6: extrae-sion.patch BuildRequires: gcc-gfortran BuildRequires: binutils-devel papi60-papi-devel libxml2-devel libpfm-devel BuildRequires: zlib-devel gcc-c++ dos2unix libtool automake BuildRequires: elfutils-libelf-devel boost-devel libdwarf-devel %{?dyninst:BuildRequires: dyninst-devel} %{?unwind:BuildRequires: libunwind-devel} BuildRequires: synapse-devel mrnet-devel %{?memkind:memkind-devel} #BuildRequires: clusteringsuite-devel BuildRequires: spectral-devel fftw-devel ocl-icd-devel %{?usejava:BuildRequires: java-devel jpackage-utils} # Not all the TeX is available in el8, and sphinx doesn't do man %if !0%{?el8} BuildRequires: python%{?fedora:3}-sphinx BuildRequires: tex(latex) texlive-titlesec texlive-framed BuildRequires: texlive-threeparttable texlive-wrapfig texlive-multirow BuildRequires: texlive-epstopdf ghostscript latexmk tex(fncychap.sty) %endif %if 0%{?fedora} BuildRequires: tex(upquote.sty) tex(capt-of.sty) tex(needspace.sty) BuildRequires: tex(tabulary.sty) %endif BuildRequires: python3-rpm-macros python2-rpm-macros %{?memkind:BuildRequires: memkind-devel} Requires: %name-common%{_isa} = %version-%release %description Paraver/Dimemas instrumentation package (formerly named MPItrace). Intercepts MPI, OpenMP and Pthreads. %package devel Summary: Development files for %name Requires: %name%{_isa} = %version-%release %description devel Development files for %name %package common Summary: Paraver/Dimemas instrumentation package - common files # The devtoolset version gets used on el7 for some reason %{?dyninst:Requires: /usr/lib64/dyninst/libdyninstAPI_RT.so} %description common Files shared between the MPI and non-MPI versions of %name. %package openmpi Summary: Paraver/Dimemas instrumentation package - openmpi BuildRequires: openmpi-devel sionlib-openmpi-devel Requires: openmpi%{_isa} Requires: %name-common%{_isa} = %version-%release %description openmpi Paraver/Dimemas instrumentation package (formerly named MPItrace). Intercepts MPI, OpenMP and Pthreads. Openmpi version. %package openmpi-devel Summary: Development files for %name-openmpi Requires: %name-openmpi%{_isa} = %version-%release %description openmpi-devel Development files for %name-openmpi %if %with_openmpi3 %package openmpi3 Summary: Paraver/Dimemas instrumentation package - openmpi3 BuildRequires: openmpi3-devel Requires: openmpi3%{_isa} Requires: %name-common%{_isa} = %version-%release %description openmpi3 Paraver/Dimemas instrumentation package (formerly named MPItrace). Intercepts MPI, OpenMP and Pthreads. Openmpi3 version. %package openmpi3-devel Summary: Development files for %name-openmpi3 Requires: %name-openmpi3%{_isa} = %version-%release %description openmpi3-devel Development files for %name-openmpi3 %endif %package doc Summary: Documentation and examples for %name BuildArch: noarch %description doc Documentation and examples for %name %package -n python2-%name Summary: Python2 support for %name BuildArch: noarch # FIxme: Require python? %description -n python2-%name Python2 support for %name. %package -n python3-%name Summary: Python3 support for %name BuildArch: noarch # FIxme: Require python? %description -n python3-%name Python3 support for %name. %prep %setup -q %patch2 -p1 -b .dyninst #%patch3 -p1 -b .tests #%patch4 -p1 #%patch5 -p1 #%patch6 -p1 autoreconf -fiv -I config # irrelevant examples rm -rf example/{AIX,BGL,BGP,BGQ,FREEBSD} dos2unix example/LINUX/OPENCL/C++/Cpp_common/wtime.c cp %SOURCE2 README.fedora mkdir omp ompi mpich ompi3 %build %global _configure ../configure export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -std=gnu99" # configure on SUSE OBS sets the include path for libxml2 to # //include/libxml2 for some reason (c.f. mock). export CPPFLAGS="$CPPFLAGS -I%_includedir/synapse -I%_includedir/libxml2" # --enable-posix-clock in case it's not intuited at build time, but is # needed at run time. With clusteringsuite, now (4.0) fails to find # TDBSCANRoot.h %global mpibuild \ %configure --enable-openmp --enable-posix-clock --enable-single-mpi-lib \\\ --with-mpi=%_libdir/openmpi --with-mpi-headers=$MPI_INCLUDE \\\ --with-binutils=%_prefix --with-papi=%papi_home \\\ --with-dwarf=%_prefix \\\ --sysconfdir=$MPI_HOME/etc --with-elf=%_prefix --with-boost=%_prefix \\\ %if 0%{?dyninst}\ --with-dyninst=%_prefix --with-dyninst-libs=%_libdir/dyninst \\\ --with-dyninst-headers=%_includedir/dyninst \\\ %else\ --without-dyninst \\\ %endif\ --libdir=$MPI_LIB/%name/lib --bindir=$MPI_LIB/%name/bin \\\ --includedir=$MPI_INCLUDE --mandir=$MPI_MAN --disable-silent-rules \\\ --enable-sampling --enable-instrument-dynamic-memory \\\ --enable-online --with-spectral=%_prefix \\\ %if 0\ --with-clustering=%_prefix --with-clustering-libs=%_libdir \\\ --with-clustering-headers=%_includedir/clusteringsuite \\\ %endif\ --with-fft=%_prefix \\\ --with-synapse=%_prefix --with-synapse-libs=%_libdir \\\ --with-synapse-headers=%_includedir/synapse \\\ %{?memkind:--with-memkind=%_prefix} --with-opencl=%_prefix \\\ --with-sionlib-libs=$MPI_LIB --with-sionlib-headers=$MPI_INCLUDE \\\ %if 0%{?unwind}\ --with-unwind=%_prefix\ %else\ --without-unwind\ %endif\ # --enable-doc\ \ %make_build\ find example -name \\*.sh -exec sed -i -e "s|@sub_PREFIXDIR@|$MPI_LIB/extrae|" \\\ -e '/source ${EXTRAE_HOME}/d' {} \\;\ #%{!?el8: make -C docs man pdf LN_S='ln -sf'} pushd ompi %_openmpi_load %mpibuild %_openmpi_unload popd %if %with_openmpi3 pushd ompi3 %_openmpi3_load %mpibuild %_openmpi3_unload popd %endif pushd ompi %_openmpi_load %mpibuild %_openmpi_unload popd pushd omp %configure --enable-openmp --without-mpi --enable-posix-clock \ --with-binutils=%_prefix --with-papi=%papi_home \ --with-dwarf=%_prefix \ --sysconfdir=%_sysconfdir/%name --with-elf=%_prefix --with-boost=%_prefix \ %if 0%{?dyninst} --with-dyninst=%_prefix --with-dyninst-libs=%_libdir/dyninst \ --with-dyninst-headers=%_includedir/dyninst \ %else --without-dyninst \ %endif --libdir=%_libdir/%name/lib --bindir=%_libdir/%name/bin \ --disable-silent-rules \ --enable-sampling --enable-instrument-dynamic-memory \ %{?usejava:--with-java-jdk=%_prefix} --with-opencl=%_prefix \ %if 0%{?unwind} --with-unwind=%_prefix %else --without-unwind %endif # --enable-doc %make_build %{!?el8: make -C docs man pdf } popd %install %global mpiprogs mpimpi2prv mpimpi2dim %global nonmpiprogs extrae extrae-cmd extrae-loader extrae_static genmpits mpi2dim mpi2prv papi_best_set reducempit %global mpiinst \ %make_install PYTHON_LIBDIR=%python2_sitelib\ rm -rf %buildroot%_docdir %buildroot%_datadir/example %buildroot%_datadir/tests\ # Should be from openmpi, but isn't\ rm %buildroot$MPI_LIB/%name/lib/*.{a,la}\ mkdir -p %buildroot$MPI_BIN %buildroot$MPI_LIB/extrae/bin\ # Others don't link libmpi -- use non-MPI version\ for f in %mpiprogs; do\ ln -s $MPI_LIB/extrae/bin/$f %buildroot$MPI_BIN/$f\ done\ for f in %nonmpiprogs; do rm -f %buildroot$MPI_LIB/extrae/bin/$f; done\ mkdir -p %buildroot/$MPI_MAN/man1\ %{!?el8: cp -a ../omp/docs/builds/man/man1/mpimpi* %buildroot/$MPI_MAN/man1\ cp -a ../omp/docs/builds/man/man3 %buildroot/$MPI_MAN}\ pushd ompi %_openmpi_load %mpiinst %_openmpi_unload popd %if %with_openmpi3 pushd ompi3 %_openmpi3_load %mpiinst %_openmpi3_unload popd %endif pushd omp mkdir -p %buildroot%_bindir %make_install DESTDIR=%buildroot PYTHON_LIBDIR=%python2_sitelib rm -rf %buildroot%_docdir %buildroot%_datadir/example %buildroot%_datadir/tests rm %buildroot%_libdir/%name/lib/*.{a,la} rm -r %buildroot%_sysconfdir # Not the mpimpi... programs for f in %nonmpiprogs; do ln -s %_libdir/extrae/bin/$f %buildroot%_bindir/$f done mkdir -p %buildroot%_mandir %{!?el8: cp -a docs/builds/man/* %buildroot%_mandir } %_openmpi_unload sed -e s'|/usr/lib64|%_libdir|' %SOURCE3 >extrae.sh install -D -m644 extrae.sh %buildroot%_sysconfdir/extrae.sh popd rm example/Makefile* mkdir -p %buildroot%python2_sitelib %buildroot%python3_sitelib cp -a %buildroot%_libexecdir/pyextrae %buildroot%python2_sitelib mv %buildroot%_libexecdir/pyextrae %buildroot%python3_sitelib rm %buildroot%_libdir/*/lib/%name/lib/lib{nanos,omp,pt,seq}trace-*.so %check # Currently failing on sandybridge with PAPI complaints # Also isn't finding binaries -- probably needs a separate dummy install step %if %{with check} %_openmpi_load make -C ompi check %endif %files %license COPYING %doc AUTHORS TODO README.fedora %_libdir/%name/lib/* %_libdir/%name/bin/mpi2* %_bindir/mpi2* %files common %_bindir/extrae* %_bindir/genmpits %_bindir/papi_best_set %_bindir/reducempit %{!?el8: %exclude %_mandir/man1/mpimpi* %_mandir/man1/* } %exclude %_libdir/%name/bin/mpi2* %_libdir/%name/bin/* %config %_sysconfdir/extrae.sh %files -n python2-%name %python2_sitelib/pyextrae %files -n python3-%name %python3_sitelib/pyextrae %files devel %_includedir/* %exclude %_libdir/%name/lib/*%version.so %_libdir/%name/lib/*.so %{!?el8: %_mandir/man3/* } %files openmpi %license COPYING %doc AUTHORS TODO README.fedora %_libdir/openmpi/lib/%name/lib/* %_libdir/openmpi/bin/* %_libdir/openmpi/lib/%name/bin/* %{!?el8: %_mandir/openmpi-%_arch/man1/* } %dir %_libdir/openmpi/etc %config %_libdir/openmpi/etc/* %files openmpi-devel %_includedir/openmpi-%_arch/* %{!?el8: %_mandir/openmpi-%_arch/man3/* } %if %with_openmpi3 %files openmpi3 %license COPYING %doc AUTHORS TODO README.fedora %_libdir/openmpi3/lib/%name/lib/*mpi*[0-9].so %{?dyninst:%_libdir/openmpi3/lib/%name/lib/lib_dyn_ocl*.so.*} %_libdir/openmpi3/bin/* %_libdir/openmpi3/lib/%name/bin/* %{!?el8: %_mandir/openmpi3-%_arch/man1/* } %dir %_libdir/openmpi3/etc %config %_libdir/openmpi3/etc/* %_libdir/openmpi3/lib/%name/lib/libfilterOnlineSpectral.so.0* %files openmpi3-devel %_includedir/openmpi3-%_arch/* %exclude %_libdir/openmpi3/lib/%name/lib/*%version.so %_libdir/openmpi3/lib/%name/lib/*.so %{!?el8: %_mandir/openmpi3-%_arch/man3/* } %endif %files doc %license COPYING %doc %{!?el8: omp/docs/builds/latex/user-guide.pdf example } %changelog * Fri Jun 3 2022 Dave Love - 4.0.1-1 - New version * Wed Apr 27 2022 Dave Love - 4.0.0-1 - New version - Don't use patch6 - BR libpfm-devel - Don't use clusteringsuite * Fri Aug 21 2020 Dave Love - 3.8.3-1 - New version - Drop el6 conditional * Wed Aug 19 2020 Dave Love - 3.8.2-2 - Patch for sionlib and kludge for libxml in OBS * Sun Aug 16 2020 Dave Love - 3.8.2-1 - New version * Thu Jun 25 2020 Dave Love - 3.8.0-1 - New version * Mon Aug 12 2019 Dave love - 3.7.1-3 - Fix aarch64 installation * Fri Jul 26 2019 Dave love - 3.7.1-2 - BR python{2,3}-rpm-macros, not -devel packages * Thu Jul 25 2019 Dave Love - 3.7.1-2 - Fix ppc64le installation * Fri Jul 12 2019 Dave Love - 3.7.1-1 - New version - Drop a patch * Sun Jun 2 2019 Dave Love - 3.7.0-2 - OpenCL again - Reorganize installation somewhat * Sun Apr 21 2019 Dave Love - 3.7.0-1 - New version * Tue Apr 2 2019 Dave Love - 3.6.1-6 - Fix files lists * Sun Nov 11 2018 Dave Love - 3.6.1-5 - Actually add online and opencl support * Sat Nov 10 2018 Dave Love - 3.6.1-4 - Enable online; use ocl-icd-devel and maybe memkind * Wed Oct 31 2018 Dave Love - 3.6.1-3 - Add openmpi3 packages on el7 * Mon Sep 24 2018 Dave Love - 3.6.1-2 - Make common package * Thu Sep 20 2018 Dave Love - 3.6.1-1 - New version - Separate python2 and python3 packages * Mon Jun 4 2018 Dave Love - 3.5.4-1 - New version - Drop inst patch * Fri Apr 27 2018 Dave Love - 3.5.3-1 - New version - Get source from github * Mon Feb 19 2018 Dave Love - 3.5.2-4 - Make separate non-MPI package * Fri Feb 16 2018 Dave Love - 3.5.2-3 - Separate openmp and openmpi+openmp versions * Wed Jan 31 2018 Dave Love - 3.5.2-2 - Fix librray installation * Fri Jan 26 2018 Dave Love - 3.5.2-1 - New version - BR sphinx and build some doc - Modify configure flags * Tue Jul 25 2017 Dave Love - 3.4.3-2 - Modify arch requirements * Wed Jun 21 2017 Dave Love - 3.4.3-2 - Add patch for dyninst support in epel6 * Sun Apr 23 2017 Dave Love - 3.4.3-1 - New version - New patch for DESTDIR handling - Simplify files list since installation has changed * Fri Nov 11 2016 Dave Love - 3.4.1-2 - Don't install main_debug main_nodebug extrae-header - Maybe BR memkind; BR boost-devel - Enable sampling, openmp-gnu, openmp-ompt * Thu Nov 10 2016 Dave Love - 3.4.1-1 - New version - Change URLs * Thu Apr 14 2016 Dave Love - 3.3.0-1 - New version * Mon Feb 8 2016 Dave Love - 3.2.1-2 - Conditionalize papi home * Fri Nov 13 2015 Dave Love - 3.2.1-1 - New version - Fix configuration for it * Sat May 30 2015 Dave Love - 3.1.1-1 - New version - Drop patch, adjust to new file names * Wed Apr 1 2015 Dave Love - 3.0.1-5 - Set DYNINSTAPI_RT_LIB in scripts * Thu Mar 12 2015 Dave Love - 3.0.1-4 - Clean up examples - Add README.fedora - Re-name extrae.sh to runextrae.sh to avoid confusion with manual examples - Install an extrae.sh in /etc for examples' sake - Fix example .sh files - Remove extrae-post-installation-upgrade.sh * Wed Dec 24 2014 Dave Love - 3.0.1-3 - Don't install .a * Wed Dec 17 2014 Dave Love - 3.0.1-2 - Avoid duplicated files in devel package * Sat Oct 4 2014 Dave Love - 3.0.1-1 - New version * Sat Sep 6 2014 Dave Love - 2.5.1-1 - Initial packaging