# Copyright (c) 2014 Dave Love, University of Liverpool # Copyright (c) 2018 Dave Love, University of Manchester # Licence as for the package itself # fixme: mpich version and separate "serial" package with just omp # rpmlint: file-not-in-%lang # clustering stuff? # build html docs (at least missing "classic" theme on epel7) # online support (needs synapse lib) # Separate out python support, and require what it needs # We might want a newer papi, paprticularly one which doesn't abort # with Lustre present. # The el6 conditional is to account for the papi packaging horror which # give you an old, incompiable library if you do the obvious thing. %{!?papi_home:%global papi_home %{?el6:%_libdir/papi-5.1.1}/usr} # See the %check stanza %bcond_with check Name: extrae Version: 3.5.4 Release: 2%{?dist} Summary: Paraver/Dimemas instrumentation package License: LGPLv2 URL: https://tools.bsc.es/extrae # 3.5.3 isn't there #Source0: https://ftp.tools.bsc.es/extrae/extrae-%version-src.tar.bz2 Source0: https://github.com/bsc-performance-tools/extrae/archive/%version/%name-%version.tar.gz Source1: runextrae.sh Source2: extrae-README.fedora Source3: extrae.sh Source4: extrae-constr.c Patch2: extrae-dyninst.patch BuildRequires: gcc-gfortran libunwind-devel BuildRequires: binutils-devel papi-devel libxml2-devel BuildRequires: zlib-devel gcc-c++ automake dos2unix libtool BuildRequires: elfutils-libelf-devel boost-devel python %ifarch x86_64 # dyninst not available on ppc64le, at least BuildRequires: dyninst-devel libdwarf-devel # The devtoolset version gets used on el7 for some reason Requires: /usr/lib64/dyninst/libdyninstAPI_RT.so %endif # Not all the TeX is available in el6, and sphinx doesn't do man %if !0%{?el6} BuildRequires: python-sphinx BuildRequires: tex(latex) texlive-titlesec texlive-framed BuildRequires: texlive-threeparttable texlive-wrapfig texlive-multirow BuildRequires: texlive-epstopdf ghostscript latexmk tex(fncychap.sty) %if 0%{?fedora} BuildRequires: tex(upquote.sty) tex(capt-of.sty) tex(needspace.sty) BuildRequires: tex(tabulary.sty) %endif %endif %ifarch x86_64 %{!?el6:BuildRequires: memkind-devel} %endif # because of dyninst, libunwind, at least for ppc, arm: ExclusiveArch: %{ix86} x86_64 %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 openmpi Summary: Paraver/Dimemas instrumentation package - openmpi BuildRequires: openmpi-devel Requires: openmpi %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 %package doc Summary: Documentation and examples for %name BuildArch: noarch %description doc Documentation and examples for %name %prep %setup -q %patch2 -p1 -b .inst 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 %build %global _configure ../configure pushd ompi %_openmpi_load cc -fPIC -c -DEE_HOME=\"$MPI_LIB/extrae\" %SOURCE4 # --enable-posix-clock in case it's not intuited at build time, but is # needed at run time. %configure --enable-openmp --enable-posix-clock --enable-single-mpi-lib \ --with-mpi=/usr/lib64/openmpi --with-mpi-headers=$MPI_INCLUDE \ --with-binutils=/usr \ --with-papi=%papi_home --with-unwind=/usr \ --sysconfdir=$MPI_HOME/etc/%name --with-elf=/usr --with-boost=/usr \ %ifarch x86_64 --with-dyninst=/usr --with-dwarf=/usr \ --with-dyninst-headers=/usr/include/dyninst \ --with-dyninst-libs=%_libdir/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 \ LIBS=$(pwd)/extrae-constr.o \ # --enable-doc make %{?_smp_mflags} find example -name \*.sh -exec sed -i -e "s|@sub_PREFIXDIR@|$MPI_LIB/extrae|" \ -e '/source ${EXTRAE_HOME}/d' {} \; %{!?el6: make -C docs man pdf } %_openmpi_unload popd pushd omp cc -fPIC -c -DEE_HOME=\"%_libdir/extrae\" %SOURCE4 %configure --enable-openmp --without-mpi --enable-posix-clock \ --with-binutils=/usr \ --with-papi=%papi_home --with-unwind=/usr \ --sysconfdir=%_sysconfdir/%name --with-elf=/usr --with-boost=/usr \ %ifarch x86_64 --with-dyninst-headers=/usr/include/dyninst \ --with-dyninst=/usr --with-dwarf=/usr \ --with-dyninst-libs=%_libdir/dyninst \ %else --without-dyninst \ %endif --libdir=%_libdir/%name/lib --bindir=%_libdir/%name/bin \ --disable-silent-rules \ --enable-sampling --enable-instrument-dynamic-memory \ LIBS=$(pwd)/extrae-constr.o \ # --enable-doc make %{?_smp_mflags} %{!?el6: 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 pushd ompi %_openmpi_load %make_install PYTHON_LIBDIR=$MPI_PYTHON_SITEARCH 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} #chmod 0644 %buildroot%python_sitearch/*.py mkdir -p %buildroot$MPI_BIN %buildroot$MPI_LIB/extrae/bin # sed -e s"|/usr/lib64|$MPI_LIB|" %SOURCE1 >runextrae.sh # install -m755 runextrae.sh %buildroot$MPI_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 %buildroot$MPI_LIB/extrae/bin/$f; done mkdir -p %buildroot/$MPI_MAN/man1 %{!?el6: cp -a docs/builds/man/man1/mpimpi* %buildroot/$MPI_MAN/man1 cp -a docs/builds/man/man3 %buildroot/$MPI_MAN} %_openmpi_unload sed -e s'|/usr/lib64|%_libdir|' %SOURCE3 >extrae.sh install -D -m644 extrae.sh %buildroot/$MPI_HOME/etc/extrae.sh popd pushd omp mkdir -p %buildroot%_bindir %make_install DESTDIR=%buildroot PYTHON_LIBDIR=%python_sitearch rm -rf %buildroot%_docdir %buildroot%_datadir/example %buildroot%_datadir/tests rm %buildroot%_libdir/%name/lib/*.{a,la} rm -r %buildroot%_sysconfdir # sed -e s'|/usr/lib64|%_libdir|' %SOURCE1 >runextrae.sh # install -m755 runextrae.sh %buildroot%_bindir # Not the mpimpi... programs for f in %nonmpiprogs; do ln -s %_libdir/extrae/bin/$f %buildroot%_bindir/$f done #for f in %mpiprogs; do rm %buildroot%_libdir/extrae/bin/$f; done mkdir -p %buildroot%_mandir %{!?el6: 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%python_sitearch mv %buildroot%_libexecdir/pyextrae %buildroot%python_sitearch %check # currently failing on sandybridge with PAPI complaints %if %{with check} make check %endif #%%find_lang %name --with-man %{!?_licensedir:%global license %doc} %files %license COPYING %doc AUTHORS TODO README.fedora %_libdir/%name/lib/*[0-9].so %_libdir/%name/bin/* %_bindir/* %{!?el6: %_mandir/man1/* } # This changed from sitearch, but doesn't look right %python_sitearch/pyextrae %config %_sysconfdir/extrae.sh %files devel %_includedir/* %exclude %_libdir/%name/lib/*%version.so %_libdir/%name/lib/*.so %{!?el6: %_mandir/man3/* } %files openmpi %license COPYING %doc AUTHORS TODO README.fedora %_libdir/openmpi/lib/%name/lib/*[0-9].so %_libdir/openmpi/bin/* %_libdir/openmpi/lib/%name/bin/* %{!?el6: %_mandir/openmpi-%_arch/man1/* } %config %_libdir/openmpi/etc/extrae %files openmpi-devel %_includedir/openmpi-%_arch/* %exclude %_libdir/openmpi/lib/%name/lib/*%version.so %_libdir/openmpi/lib/%name/lib/*.so %{!?el6: %_mandir/openmpi-%_arch/man3/* } %files doc %license COPYING %doc %{!?el6: ompi/docs/builds/latex/user-guide.pdf example } %changelog * Tue Jun 5 2018 Dave Love - 3.5.4-2 - Only use dyninst on x86_64 * 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