# Fixme: ipm_parse doesn't work properly -- various graphs missing # Fixme: optional build with CUDA %global commit 02f0cdce630f0533e0aaadaccd8998a5e893968a %global shortcommit %(c=%{commit}; echo ${c:0:7}) %bcond_without mpich %bcond_without pnmpi %if 0%{?rhel} %ifarch x86_64 %global sclpapi 1 %endif %endif %global unwind 1 %if 0%{?el7} %bcond_without openmpi3 %ifarch ppc64le %undefine unwind %endif %else %bcond_with openmpi3 %endif Name: ipm Version: 2.0.6 Release: 8.%{shortcommit}git%{?dist} Summary: Portable profiling infrastructure for parallel codes License: LGPLv2 URL: https://github.com/nerscadmin/%{name} Source0: https://github.com/nerscadmin/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Source1: ipm-README Source2: ipm.conf # The scalasca notice (for libcube) is missing, though we don't actually # use it. Source3: ipm-scalasca-copyright Source4: ipmrun.1 Source5: ipmrun Source6: ipm_parse.1 # Packaged version is ploticus, not pl Patch2: ipm-ploticus.patch # don't trash LDFLAGS at the end of configure Patch3: ipm-ldflags.patch # remove empty condtiions, which generate empty else branch that el6's # bash doesn't like Patch4: ipm-empty-config.patch # Don't SEGV if PAPI doesn't initialize (e.g. in a VM) Patch5: ipm-error.patch # Don't spew errors if PAPI doesn't work and no counters requested. Patch6: ipm-papiinit.patch BuildRequires: gcc-c++ automake chrpath %{?unwind:libunwind-devel} BuildRequires: %{?with_pnmpi:pnmpi-}openmpi-devel libtool %if 0%{?sclpapi} BuildRequires: papi55-papi-devel %else BuildRequires: papi-devel %endif %if %{with mpich} BuildRequires: %{?with_pnmpi:pnmpi-}mpich-devel %endif # for use with Perl ipm_parse Requires: ploticus # Needed for key files? #Requires: libipm = %{version}-%{release} # The main package should be noarch, but that affects configure and # confuses it. %if 0%{?el7} #ExcludeArch: ppc64le %endif %global desc \ IPM is a portable profiling infrastructure for parallel codes. It\ provides a low-overhead performance profile of the performance aspects\ and resource utilization in a parallel program. Communication,\ computation, and IO are the primary focus. While the design scope\ targets production computing in HPC centers, IPM has found use in\ application development, performance debugging and parallel computing\ education. The level of detail is selectable at runtime and presented\ through a variety of text and web reports. %description %desc This package currently contains only the parsing utility for the output of libipm. # Split out to avoid the dependency on ploticus on compute nodes %package -n libipm-openmpi Summary: Library files for %{name} - openmpi Obsoletes: libipm libipm2-openmpi %description -n libipm-openmpi %desc This package contains the runtime library and module files for use with openmpi. %package -n libipm-openmpi-devel Summary: Development files for %{name} - openmpi Requires: libipm-openmpi%{?_isa} = %{version}-%{release} %description -n libipm-openmpi-devel The libipm-openmpi-devel-devel package contains a static library for developing applications that use libipm. %if %{with openmpi3} %package -n libipm-openmpi3 Summary: Library files for %{name} - openmpi3 Obsoletes: libipm libipm2-openmpi3 BuildRequires: pnmpi-openmpi3-devel %description -n libipm-openmpi3 %desc This package contains the runtime library and module files for use with openmpi3. %package -n libipm-openmpi3-devel Summary: Development files for %{name} - openmpi3 Requires: libipm-openmpi3%{?_isa} = %{version}-%{release} %description -n libipm-openmpi3-devel The libipm-openmpi3-devel-devel package contains a static library for developing applications that use libipm. %endif %if %{with mpich} %package -n libipm-mpich Summary: Library files for %{name} - mpich Obsoletes: libipm libipm2-mpich %description -n libipm-mpich %desc This package contains the runtime library and module files for use with mpich. %package -n libipm-mpich-devel Summary: Development files for %{name} - mpich Requires: libipm-mpich%{?_isa} = %{version}-%{release} %description -n libipm-mpich-devel The libipm-mpich-devel-devel package contains a static library for developing applications that use libipm. %endif %prep # we need copies of the source because installation doesn't work after # ../configure %setup -q -n IPM-%{commit} rm utils/mxml-2.6.tar.gz cp %SOURCE1 README sed -i s,withval/lib,withval/%_lib, configure.ac %patch2 -p1 %patch3 -p1 %patch4 -p1 -b .empty %patch5 -p1 %patch6 -p1 ./bootstrap.sh chmod -x LICENSE cp %SOURCE3 COPYRIGHT.scalasca mkdir openmpi mpich openmpi3 # Avoid failure to find headers ln -s ../include openmpi ln -s ../include openmpi3 ln -s ../include mpich %build %global _configure ../configure # smp build is unreliable %global do_build \ %configure --libdir=$MPI_LIB %{?unwind:--with-libunwind=%_libdir} \\\ --with-papi=%{?sclpapi:/opt/rh/papi55/root}/usr \\\ --enable-papi-multiplexing --enable-posixio \ make %{_openmpi_load} pushd openmpi %do_build popd %{_openmpi_unload} %if %{with mpich} %{_mpich_load} pushd mpich %do_build popd %{_mpich_unload} %endif %if %{with openmpi3} %{_openmpi3_load} pushd openmpi3 %do_build popd %{_openmpi3_unload} %endif %install %global inst \ make install DESTDIR=$RPM_BUILD_ROOT\ install -D -m 644 %SOURCE4 $RPM_BUILD_ROOT%_mandir/man1/ipmrun.1\ install -D -m 755 %SOURCE5 $RPM_BUILD_ROOT$MPI_BIN/ipmrun\ chrpath -d $RPM_BUILD_ROOT$MPI_LIB/libipm.so\ %{?with_pnmpi:mkdir -p $RPM_BUILD_ROOT$MPI_LIB/pnmpi-modules $RPM_BUILD_ROOT$MPI_BIN\ pushd $RPM_BUILD_ROOT$MPI_LIB\ pnmpi-patch libipm.so pnmpi-modules/libipm.so\ popd} %{_openmpi_load} pushd openmpi %inst popd %{_openmpi_unload} %if %{with mpich} %{_mpich_load} pushd mpich %inst popd %{_mpich_unload} %endif %if %{with openmpi3} %{_openmpi3_load} pushd openmpi3 %inst popd %{_openmpi3_unload} %endif find $RPM_BUILD_ROOT -name \*.la -exec rm {} \; chmod -x {AUTHORS,TODO,README,COPYING} doc/* install -m 644 %SOURCE6 $RPM_BUILD_ROOT%_mandir/man1/ipm_parse.1 install -m 644 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir %files %_bindir/ipm_parse %_sysconfdir/ipm_key* %_mandir/man1/ipm_parse.1* %config(noreplace) %_sysconfdir/ipm.conf %doc README* COPYING LICENSE %files -n libipm-openmpi %doc README* AUTHORS COPYING LICENSE doc/* %_libdir/openmpi/bin/ipmrun %_libdir/openmpi/lib/*.so* %{?with_pnmpi:%_libdir/openmpi/lib/pnmpi-modules/*.so*} %_mandir/man1/ipmrun.1* %files -n libipm-openmpi-devel %_libdir/openmpi/lib/*.a %if %{with mpich} %files -n libipm-mpich %doc README* AUTHORS COPYING LICENSE doc/* %_libdir/mpich/bin/ipmrun %_libdir/mpich/lib/*.so* %{?with_pnmpi:%_libdir/mpich/lib/pnmpi-modules/*.so*} %_mandir/man1/ipmrun.1* %files -n libipm-mpich-devel %_libdir/mpich/lib/*.a %endif %if %{with openmpi3} %files -n libipm-openmpi3 %doc README* AUTHORS COPYING LICENSE doc/* %_libdir/openmpi3/bin/ipmrun %_libdir/openmpi3/lib/*.so* %_libdir/openmpi3/lib/pnmpi-modules/*.so* %_mandir/man1/ipmrun.1* %files -n libipm-openmpi3-devel %_libdir/openmpi3/lib/*.a %endif %changelog * Tue Jul 30 2019 Dave Love - 2.0.6-8.%(c=%{commit}; echo ${c:0:7})git%{?dist} - Patch to avoid noise from failed PAPI init - Update URLs * Fri May 17 2019 Dave Love - 2.0.6-7.%(c=%{commit}; echo ${c:0:7})git%{?dist} - Rebuild for mpich * Fri Apr 12 2019 Dave Love - 2.0.6-6.%(c=%{commit}; echo ${c:0:7})git%{?dist} - Add patch for SEGV when PAPI doesn't work * Tue Apr 9 2019 Dave Love - 2.0.6-5.%(c=%{commit}; echo ${c:0:7})git%{?dist} - Fix build for PAPI * Wed Dec 19 2018 Dave Love - 2.0.6-4.%(c=%{commit}; echo ${c:0:7})git%{?dist} - Make pnmpi optional * Fri Oct 26 2018 Dave Love - 2.0.6-3.02f0cdcegit - Add openmpi3 sub-packages on el7 * Thu Nov 2 2017 Dave Love - 2.0.6-2.02f0cdcegit - Fix non-x86_64 EPEL build * Fri Oct 13 2017 Dave Love - 2.0.6-1.02f0cdcegit - Snapshot update, particularly for working plotting - Add patch to avoid trashing LDFLAGS - Conditionalize SCL PAPI and update it * Fri Sep 30 2016 Dave Love - 2.0.6-1 - New version - Remove el5-isms from spec * Fri Nov 27 2015 Dave Love - 2.0.5-1 - New version - Drop most patches * Thu Apr 9 2015 Dave Love - 2.0.3-4 - Fix libipm-openmpi requires * Mon Mar 23 2015 Dave Love - 2.0.3-3 - Proper 2.0.3 release - Rename to ipm from ipm2 * Fri Sep 19 2014 Dave Love - 2.0.3-2 - Fix for posixio - Don't run ldconfig - Rename lib packages, don't ship ipm2 -- parse programs not useful * Wed Feb 19 2014 Dave Love - 2.0.3-1 - Update to current source with unused, differently-licensed source removed - Install in openmpi tree and patch installation in etc subdir - Add LD_PRELOAD shim and README with pointer to doc - Split into multiple packages - Build against libunwind * Wed Nov 27 2013 Dave Love - 2.0.2-1 - Initial packaging