# Copyright (c) 2014 Dave Love, Liverpool University # The licence for this file is as for the package itself. %bcond_with mpich # Not currently working with ompi4 %bcond_with pnmpi %ifnarch ppc64le %global with_openmpi3 0%{?el7} %endif %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: 8.%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 %{?with_pnmpi:BuildRequires: pnmpi-openmpi-devel} 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. %if 0%{?with_openmpi3} %package openmpi3 Summary: Lightweight profiling library for MPI applications (openmpi3) BuildRequires: openmpi3-devel Requires: openmpi3 %description openmpi3 %desc This is the openmpi3 version. %endif %package mpich Summary: Lightweight profiling library for MPI applications (mpich) BuildRequires: mpich-devel %{?with_pnmpi:pnmpi-mpich-devel} Requires: mpich %description mpich %desc This is the openmpi version. %prep %setup -q %{?prerel:-n LLNL-mpiP-%shortcommit} %build mkdir -p openmpi mpich openmpi3 %global _configure ../configure pushd openmpi %_openmpi_load %configure --with-clock_gettime --libdir=$MPI_LIB CPPFLAGS=-I. %{?with_pnmpi:LDFLAGS=-lpnmpi} %make_build shared %make_build %_openmpi_unload popd %if 0%{?with_openmpi3} pushd openmpi3 %_openmpi3_load %configure --with-clock_gettime --libdir=$MPI_LIB CPPFLAGS=-I. %{?with_pnmpi:LDFLAGS=-lpnmpi} %make_build shared %make_build %_openmpi3_unload popd %endif %if %{with mpich} pushd mpich %_mpich_load %configure --with-clock_gettime --libdir=$MPI_LIB CPPFLAGS=-I. %{?with_pnmpi:LDFLAGS=-lpnmpi} %make_build shared %make_build %_mpich_unload popd %endif %install ln -s ../doc openmpi %{?with_openmpi3:ln -s ../doc openmpi3} ln -s ../doc mpich %_openmpi_load %{?with_pnmpi:mkdir -p $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules} %make_install -C openmpi %{?with_pnmpi:pnmpi-patch $RPM_BUILD_ROOT$MPI_LIB/libmpiP.so $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules/libmpiP.so} %_openmpi_unload %if 0%{?with_openmpi3} %_openmpi3_load %{?with_pnmpi:mkdir -p $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules} %make_install -C openmpi3 %{?with_pnmpi:pnmpi-patch $RPM_BUILD_ROOT$MPI_LIB/libmpiP.so $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules/libmpiP.so} %_openmpi3_unload %endif %if %{with mpich} %_mpich_load %{?with_pnmpi:mkdir -p $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules} %make_install -C mpich %{?with_pnmpi: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/* %if %{with pnmpi} %dir %_libdir/openmpi/lib/pnmpi-modules %_libdir/openmpi/lib/pnmpi-modules/* %endif %if 0%{?with_openmpi3} %files openmpi3 %doc doc/UserGuide* doc/README ChangeLog %_libdir/openmpi3/lib/* %if %{with pnmpi} %dir %_libdir/openmpi3/lib/pnmpi-modules %_libdir/openmpi3/lib/pnmpi-modules/* %endif %endif %if %{with mpich} %files mpich %doc doc/UserGuide* doc/README ChangeLog %_libdir/mpich/lib/* %if %{with pnmpi} %dir %_libdir/mpich/lib/pnmpi-modules %_libdir/mpich/lib/pnmpi-modules/* %endif %endif %changelog * Thu Jan 10 2019 Dave Love - 3.4.1-8.git%shortcommit - Maybe add openmpi3 * Wed Dec 19 2018 Dave Love - 3.4.1-7.git%shortcommit - Make pnmpi optional * 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