# Copyright (c) 2017 Dave Love, University of Manchester # MIT Licence, per Fedora policy. Name: hpctoolkit Version: 2017.10 Release: 2%{?dist} Summary: HPC performance tools License: BSD URL: http://hpctoolkit.org Source0: https://github.com/HPCToolkit/hpctoolkit/archive/release-%version.tar.gz#/%name-release-%version.tar.gz Patch1: hpctoolkit-config.patch Patch2: hpctoolkit-ppc.patch BuildRequires: gcc-gfortran openmpi-devel %if 0%{?el6} # boost 1.48 seems to be too old, and nothing more recent in EPEL, so # el6 won't work. BuildRequires: devtoolset-6-gcc-c++ devtoolset-6-dyninst-devel boost148-devel %else BuildRequires: gcc-c++ dyninst-devel boost-devel %endif BuildRequires: elfutils-libelf-devel libdwarf-devel >= 20161124 libmonitor-devel BuildRequires: libunwind-devel xz-devel xerces-c-devel BuildRequires: zlib-devel %ifarch x86_64 BuildRequires: xed-devel %endif %if 0%{?el6}%{?el7} # Get PAPI support for more recent hardware, and more recent binutils # may also be necessary. BuildRequires: papi56-papi-devel devtoolset-6-binutils-devel %else BuildRequires: papi-devel binutils-devel libpfm-devel %endif # Packaged binutils-devel doesn't support PPC ExclusiveArch: x86_64 Requires: %name-backend%{?_isa} = %version-%release Requires: openmpi-devel %description HPCToolkit is an integrated suite of tools for measurement and analysis of program performance on computers ranging from multicore desktop systems to the nation's largest supercomputers. HPCToolkit provides accurate measurements of a program's work, resource consumption, and inefficiency, correlates these metrics with the program's source code, works with multilingual, fully optimized binaries, has very low measurement overhead, and scales to large parallel systems. HPCToolkit's measurements provide support for analyzing a program execution cost, inefficiency, and scaling characteristics both within and across nodes of a parallel system. %package backend Summary: Components of %name for use on compute nodes %description backend Components of %name for use on compute nodes. %package doc Summary: Documentation for %name BuildArch: noarch %description doc Documentation for %name. %prep %setup -q -n %name-release-%version #%patch1 -p1 -b .config %patch2 -p1 #autoreconf -fiv # Fiddle for configure expecting a prefix containing include and lib # (not lib64). mkdir -p usr/{xed/lib,libdwarf,symtabapi,papi,boost} ln -s %_libdir usr/lib ln -s %_includedir usr ln -s %_includedir/libdwarf usr/libdwarf/include ln -s %_libdir usr/libdwarf/lib %if 0%{?el6} ln -s /opt/rh/devtoolset-6/root/usr/include/dyninst usr/symtabapi/include ln -s /opt/rh/devtoolset-6/root/%_libdir/dyninst usr/symtabapi/lib ln -s %_includedir/boost148 usr/boost/include ln -s %_libdir/boost148 usr/boost/lib ln -s %_libdir/libboost*1.48* usr/boost %else ln -s %_includedir/dyninst usr/symtabapi/include ln -s %_libdir/dyninst usr/symtabapi/lib %endif ln -s %_libdir/libxed* usr/xed/lib ln -s %_includedir/xed usr/xed/include %if 0%{?el6}%{?el7} ln -s /opt/rh/papi56/root/usr/include usr/papi ln -s /opt/rh/papi56/root/%_libdir usr/papi/lib %endif %build %{?el6:. /opt/rh/devtoolset-6/enable} %_openmpi_load # no CUDA, obviously %configure --enable-xop MPICC=mpicc MPICXX=mpic++ MPIF77=mpifort \ CPPFLAGS="-DBANAL_USE_PARSEAPI -DBANAL_USE_SYMTAB \ -DHAVE_DECL_BASENAME" --disable-static \ --with-binutils=`pwd`/usr \--with-boost=`pwd`/usr%{?el6:/boost} \ --with-libdwarf=`pwd`/usr/libdwarf \ --with-libelf=`pwd`/usr --with-libmonitor=`pwd`/usr \ --with-libunwind=`pwd`/usr \ --with-lzma=`pwd`/usr --with-papi=`pwd`/usr%{?rhel:/papi} \ %if 0%{?el6}%{?el7} --with-perfmon=`pwd`/usr%{?rhel:/papi} \ %else --with-perfmon=`pwd`/usr \ %endif --with-symtabAPI=`pwd`/usr/symtabapi --with-xed2=`pwd`/usr/xed \ %{!?fedora:--with-binutils=/opt/rh/devtoolset-6/root/usr} \ --with-xerces=`pwd`/usr --with-zlib=`pwd`/usr \ --prefix=$MPI_HOME --libdir=$MPI_LIB --bindir=$MPI_BIN \ --exec-prefix=$MPI_HOME --libexecdir=$MPI_HOME/libexec \ --includedir=$MPI_INCLUDE %{?el6:LDFLAGS=-L%_libdir/boost148} sed -i -e 's/PowerISA.hpp PowerISA.cpp//' -e s/libHPCisa_la-PowerISA.lo// src/lib/isa/Makefile %make_build %install %_openmpi_load %make_install LIBDWARF_INC=%_includedir/dwarf prefix=$MPI_HOME exec_prefix=$MPI_HOME libexecdir=$MPI_HOME/libexec mv %buildroot$MPI_HOME/share/doc/hpctoolkit doc.x %files %license README.License %doc README.Acknowledgments README.ReleaseNotes %_libdir/openmpi/bin/* %exclude %_libdir/openmpi/lib/hpctoolkit/ext-libs #%%exclude %_libdir/openmpi/bin/hpclink %exclude %_libdir/openmpi/bin/hpcprof-mpi %exclude %_libdir/openmpi/bin/hpcrun %exclude %_libdir/openmpi/lib/hpctoolkit/libhpcrun* %exclude %_libdir/openmpi/lib/hpctoolkit/libhpctoolkit* %exclude %_libdir/openmpi/lib/hpctoolkit/plugins %exclude %_libdir/openmpi/lib/hpctoolkit %_libdir/openmpi/libexec/hpctoolkit %_includedir/openmpi-%_arch %_datadir/hpctoolkit %_mandir/man1/* %files doc %doc doc.x/* %files backend #%%_libdir/openmpi/bin/hpclink %_libdir/openmpi/bin/hpcprof-mpi %_libdir/openmpi/bin/hpcrun %_libdir/openmpi/lib/hpctoolkit/libhpcrun* %_libdir/openmpi/lib/hpctoolkit/libhpctoolkit* %_libdir/openmpi/lib/hpctoolkit/plugins %changelog * Fri Mar 16 2018 Dave Love - 2017.10-2 - Use devtoolset-6, not -7 * Sun Dec 3 2017 Dave Love - 2017.10-1 - Initial packaging