# Copyright (c) 2014 Dave Love, Liverpool University # The licence for this file is as for the package itself. %bcond_with mpich %global commit 4e2e6ed5fbebf92b98dc4edf3258f6c9d0092a52 %{?commit:%global prerel 1} %if 0%{?prerel} %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global git git%shortcommit %else %global shortcommit %nil %endif Name: mpiP Version: 3.4.1 Release: 6.%git%{?dist} Summary: Lightweight profiling library for MPI applications License: BSD URL: https://software.llnl.gov/mpiP/ %if 0%{?prerel} Source0: https://github.com/llnl/mpiP/tarball/%commit/mpiP-3.4.1-%git.tar.gz %else Source0: https://github.com/LLNL/mpiP/archive/%version.tar.gz#/%name-%version.tar.gz %endif BuildRequires: openmpi-devel, libunwind-devel, binutils-devel BuildRequires: pnmpi-openmpi-devel %if %{with mpich} BuildRequires: mpich-devel pnmpi-mpich-devel %endif BuildRequires: gcc-gfortran, gcc-c++, python %global desc \ mpiP is a lightweight profiling library for MPI applications. Because\ it only collects statistical information about MPI functions, mpiP\ generates considerably less overhead and much less data than tracing\ tools. All the information captured by mpiP is task-local. It only\ uses communication during report generation, typically at the end of\ the experiment, to merge results from all of the tasks into one output\ file. %description %desc %package openmpi Summary: Lightweight profiling library for MPI applications (openmpi) Requires: openmpi %description openmpi %desc This is the openmpi version. %package mpich Summary: Lightweight profiling library for MPI applications (mpich) Requires: mpich %description mpich %desc This is the openmpi version. %prep %setup -q %{?prerel:-n LLNL-mpiP-%shortcommit} %build mkdir -p openmpi mpich %global _configure ../configure pushd openmpi %_openmpi_load %configure --with-clock_gettime --libdir=$MPI_LIB CPPFLAGS=-I. LDFLAGS=-lpnmpi make %{?_smp_mflags} shared make %{?_smp_mflags} %_openmpi_unload popd %if %{with mpich} pushd mpich %_mpich_load %configure --with-clock_gettime --libdir=$MPI_LIB CPPFLAGS=-I. LDFLAGS=-lpnmpi make %{?_smp_mflags} shared make %{?_smp_mflags} %_mpich_unload popd %endif %install ln -s ../doc openmpi ln -s ../doc mpich %_openmpi_load mkdir -p $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules make -C openmpi install DESTDIR=$RPM_BUILD_ROOT pnmpi-patch $RPM_BUILD_ROOT$MPI_LIB/libmpiP.so $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules/libmpiP.so %_openmpi_unload %if %{with mpich} %_mpich_load mkdir -p $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules make -C mpich install DESTDIR=$RPM_BUILD_ROOT pnmpi-patch $RPM_BUILD_ROOT$MPI_LIB/libmpiP.so $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules/libmpiP.so %_mpich_unload %endif rm -rf $RPM_BUILD_ROOT%_datadir/doc rm $RPM_BUILD_ROOT%_libdir/*/lib/*.a %files openmpi %doc doc/UserGuide* doc/README ChangeLog %_libdir/openmpi/lib/* %dir %_libdir/openmpi/lib/pnmpi-modules %_libdir/openmpi/lib/pnmpi-modules/* %if %{with mpich} %files mpich %doc doc/UserGuide* doc/README ChangeLog %_libdir/mpich/lib/* %dir %_libdir/mpich/lib/pnmpi-modules %_libdir/mpich/lib/pnmpi-modules/* %endif %changelog * Thu Nov 2 2017 Dave Love - 3.4.1-6.git4e2e6ed - Use a newer commit - BR python * Thu Oct 20 2016 Dave Love - 3.4.1-5.git377644a4 - New pre-release version for MPI3 support - Drop el5-isms * Sat Sep 26 2015 Dave Love - 3.4.1-4 - Link against libpnmpi * Mon Jan 12 2015 Dave Love - 3.4.1-3 - Install pnmpi module * Fri Oct 24 2014 Dave Love - 3.4.1-2 - Use clock_gettime -- openmpi's mpi_wtime uses gettimeofday * Wed Jul 2 2014 Dave Love - 3.4.1-1 - Update to 3.4.1 * Fri Jun 20 2014 Dave Love - 3.4-2 - Make openmpi and mpich packages * Thu Feb 20 2014 Dave Love - 3.4-1 - Initial packaging