2017-10-06 06:36:48 +00:00
|
|
|
#
|
2025-03-25 07:33:09 +00:00
|
|
|
# spec file for package mpiP
|
2017-10-06 06:36:48 +00:00
|
|
|
#
|
2025-03-25 07:33:09 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2017-10-06 06:36:48 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2019-09-26 11:09:56 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-10-06 06:36:48 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
|
|
|
|
|
%define pname mpiP
|
|
|
|
|
|
2025-03-31 19:55:39 +00:00
|
|
|
%if 0%{?sle_version:1} && 0%{?sle_version} < 150300
|
|
|
|
|
%define DisOMPI4 ExclusiveArch: do_not_build
|
2019-11-29 17:42:07 +00:00
|
|
|
%endif
|
2025-03-31 19:55:39 +00:00
|
|
|
%if 0%{?sle_version:1} && 0%{?sle_version} < 160000
|
|
|
|
|
%define DisOMPI5 ExclusiveArch: do_not_build
|
2020-11-28 16:53:30 +00:00
|
|
|
%endif
|
2018-01-12 17:07:57 +00:00
|
|
|
|
2017-10-06 06:36:48 +00:00
|
|
|
%if "%flavor" == ""
|
|
|
|
|
ExclusiveArch: do_not_build
|
2025-03-31 19:55:39 +00:00
|
|
|
%define p_suffix %{nil}
|
|
|
|
|
%else
|
|
|
|
|
%define p_suffix -%{flavor}
|
2025-03-25 07:33:09 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "openmpi4"
|
|
|
|
|
%{?DisOMPI4}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "openmpi5"
|
|
|
|
|
ExcludeArch: %{ix86} %{arm}
|
|
|
|
|
%{?DisOMPI5}
|
|
|
|
|
%endif
|
|
|
|
|
|
2025-03-31 19:55:39 +00:00
|
|
|
%define package_name %{pname}%{p_suffix}
|
|
|
|
|
%define p_prefix %{_libdir}/mpi/gcc/%{flavor}
|
2019-11-29 19:43:25 +00:00
|
|
|
|
2025-03-31 19:55:39 +00:00
|
|
|
%define p_bindir %{p_prefix}/bin
|
|
|
|
|
%define p_datadir %{p_prefix}/share
|
|
|
|
|
%define p_incdir %{p_prefix}/include/
|
|
|
|
|
%define p_libdir %{p_prefix}/%{_lib}/
|
|
|
|
|
%define p_libexecdir %{p_prefix}/%{_lib}
|
|
|
|
|
%define p_mandir %{p_prefix}/share/man
|
2019-11-29 19:43:25 +00:00
|
|
|
|
2025-03-31 19:55:39 +00:00
|
|
|
Name: %{package_name}
|
2017-10-20 08:42:41 +00:00
|
|
|
Summary: A profiling library for MPI applications
|
|
|
|
|
License: BSD-3-Clause
|
|
|
|
|
Group: Development/Tools/Debuggers
|
2023-10-10 13:57:23 +00:00
|
|
|
Version: 3.5
|
2017-10-20 08:42:41 +00:00
|
|
|
Release: 0
|
2024-06-25 14:27:27 +00:00
|
|
|
ExcludeArch: i586 %arm s390
|
2020-11-28 16:53:30 +00:00
|
|
|
URL: https://github.com/LLNL/mpiP
|
|
|
|
|
Source0: https://github.com/LLNL/mpiP/releases/download/%{version}/mpip-%{version}.tgz#/%{pname}-%{version}.tgz
|
2017-10-20 08:42:41 +00:00
|
|
|
Patch1: mpip.unwinder.patch
|
2020-11-30 16:43:27 +00:00
|
|
|
Patch2: Add-return-value-to-non-void-function.patch
|
2022-10-17 08:50:51 +00:00
|
|
|
Patch3: pc_lookup-replace-PTR-with-void.patch
|
2024-09-07 11:25:34 +00:00
|
|
|
Patch4: configure-fix-compilation-error-for-GCC-14.patch
|
|
|
|
|
Patch5: arch-add-generic-arch-using-GCC-builtins.patch
|
2025-03-25 07:33:09 +00:00
|
|
|
|
2025-03-31 19:55:39 +00:00
|
|
|
BuildRequires: %{flavor}-devel
|
|
|
|
|
BuildRequires: binutils-devel
|
|
|
|
|
BuildRequires: dejagnu
|
2025-03-25 07:33:09 +00:00
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: gcc-fortran
|
2020-11-28 16:53:30 +00:00
|
|
|
BuildRequires: libunwind-devel
|
2022-10-24 07:02:03 +00:00
|
|
|
BuildRequires: python3
|
2025-03-31 19:55:39 +00:00
|
|
|
Requires: %{flavor}-libs
|
2017-10-06 06:36:48 +00:00
|
|
|
|
|
|
|
|
%description
|
2017-10-16 15:57:04 +00:00
|
|
|
mpiP is a profiling library for MPI applications.
|
|
|
|
|
It only collects statistical information about MPI functions, so mpiP
|
|
|
|
|
generates less overhead and much less data than tracing
|
2017-10-06 06:36:48 +00:00
|
|
|
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.
|
|
|
|
|
|
2020-11-28 16:53:30 +00:00
|
|
|
%package devel
|
|
|
|
|
Summary: Headers for profiling library for MPI applications
|
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
mpiP is a profiling library for MPI applications. This packages contains
|
|
|
|
|
the build headers.
|
|
|
|
|
|
2017-10-06 06:36:48 +00:00
|
|
|
%package devel-static
|
2017-10-20 08:42:41 +00:00
|
|
|
Summary: Static version of profiling library for MPI applications
|
|
|
|
|
Group: Development/Libraries/C and C++
|
2017-10-06 06:36:48 +00:00
|
|
|
|
|
|
|
|
%description devel-static
|
2017-10-16 15:57:04 +00:00
|
|
|
mpiP is a profiling library for MPI applications.
|
2017-10-06 06:36:48 +00:00
|
|
|
|
2020-11-30 16:43:27 +00:00
|
|
|
This package contains the static libraries.
|
|
|
|
|
|
2017-10-06 06:36:48 +00:00
|
|
|
%package doc
|
2017-10-20 08:42:41 +00:00
|
|
|
Summary: Documentation for the mpiP profiling library
|
|
|
|
|
Group: Documentation/Other
|
2017-10-06 06:36:48 +00:00
|
|
|
|
|
|
|
|
%description doc
|
2017-10-16 15:57:04 +00:00
|
|
|
mpiP is a profiling library for MPI applications.
|
|
|
|
|
|
|
|
|
|
This contains the documentation.
|
2017-10-06 06:36:48 +00:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{pname}-%{version}
|
2024-09-07 11:25:34 +00:00
|
|
|
%autopatch -p0
|
2020-11-30 16:43:27 +00:00
|
|
|
sed -i -e "/-shared -o \$@/s#\(\${LDFLAGS}\)#\1 -Wl,-soname,\$@#" Makefile.in
|
2017-10-06 06:36:48 +00:00
|
|
|
|
|
|
|
|
%build
|
2019-09-26 11:09:56 +00:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2025-03-25 07:33:09 +00:00
|
|
|
export CC=gcc
|
|
|
|
|
source %{p_bindir}/mpivars.sh
|
|
|
|
|
|
2020-11-30 16:43:27 +00:00
|
|
|
export CC=mpicc
|
|
|
|
|
export CXX=mpicxx
|
|
|
|
|
export FC=mpifort
|
|
|
|
|
export F77=$FC
|
|
|
|
|
export CFLAGS="-D__DATE__=\\\"NODATE\\\" -D__TIME__=\\\"NOTIME\\\""
|
|
|
|
|
export FFLAGS="-std=legacy"
|
2022-10-24 07:02:03 +00:00
|
|
|
export HAVE_PYTHON="python3"
|
2025-03-25 07:33:09 +00:00
|
|
|
%configure \
|
|
|
|
|
--prefix=%{p_prefix} \
|
|
|
|
|
--exec-prefix=%{p_prefix} \
|
|
|
|
|
--datadir=%{p_datadir} \
|
|
|
|
|
--bindir=%{p_bindir} \
|
|
|
|
|
--includedir=%{p_incdir} \
|
|
|
|
|
--libdir=%{p_libdir} \
|
|
|
|
|
--libexecdir=%{p_libexecdir} \
|
|
|
|
|
--mandir=%{p_mandir} \
|
2017-10-06 06:36:48 +00:00
|
|
|
--enable-demangling \
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
--enable-setjmp \
|
|
|
|
|
%endif
|
|
|
|
|
--docdir=%{_docdir}/%{name}
|
|
|
|
|
|
2022-10-24 07:02:03 +00:00
|
|
|
make %{?_smp_mflags} PYTHON="python3" shared
|
2017-10-06 06:36:48 +00:00
|
|
|
|
|
|
|
|
%install
|
2025-03-25 07:33:09 +00:00
|
|
|
source %{p_bindir}/mpivars.sh
|
|
|
|
|
|
2020-11-28 16:53:30 +00:00
|
|
|
make install-all DESTDIR=%{?buildroot}
|
2017-10-16 15:57:04 +00:00
|
|
|
find "%{buildroot}" -type f -name "*.a" -exec chmod a-x {} +
|
|
|
|
|
find "%{buildroot}/%{_docdir}" -type f -exec chmod a-x {} +
|
2025-03-25 07:33:09 +00:00
|
|
|
find "%{buildroot}/%{p_incdir}" -type f -exec chmod a-x {} +
|
2020-11-28 16:53:30 +00:00
|
|
|
for i in mpirun-mpip srun-mpip; do
|
|
|
|
|
sed -i \
|
2025-03-25 07:33:09 +00:00
|
|
|
-e "s@\(MPIP_DIR=\).*@\1%{?p_prefix}@" \
|
2020-11-28 16:53:30 +00:00
|
|
|
-e "s@\(LD_PRELOAD=\).*:\(.*\)@\1\2@" \
|
|
|
|
|
-e "s@\(ADDTL_RT_LIBS=.*\)@#\1@" \
|
2025-03-25 07:33:09 +00:00
|
|
|
-e "s@/lib/libmpiP.so@/%{_lib}/libmpiP.so@" %{buildroot}%{p_bindir}/$i
|
2020-11-28 16:53:30 +00:00
|
|
|
done
|
2017-10-06 06:36:48 +00:00
|
|
|
|
2020-11-30 16:43:27 +00:00
|
|
|
%check
|
2025-03-25 07:33:09 +00:00
|
|
|
source %{p_bindir}/mpivars.sh
|
2020-11-30 16:43:27 +00:00
|
|
|
export CC=mpicc
|
|
|
|
|
export CXX=mpicxx
|
|
|
|
|
export FC=mpifort
|
|
|
|
|
export F77=$FC
|
|
|
|
|
export FFLAGS="-std=legacy"
|
|
|
|
|
LD_LIBRARY_PATH=$(pwd)${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
|
|
|
|
|
make FFLAGS+=${FFLAGS} check || exit 0
|
|
|
|
|
|
2017-10-06 06:36:48 +00:00
|
|
|
%files
|
2025-03-25 07:33:09 +00:00
|
|
|
%{p_libdir}/*so
|
|
|
|
|
%{p_bindir}
|
2017-10-06 06:36:48 +00:00
|
|
|
|
|
|
|
|
%files doc
|
2017-10-13 10:42:48 +00:00
|
|
|
%{_docdir}/%{name}/
|
2017-10-06 06:36:48 +00:00
|
|
|
|
2020-11-28 16:53:30 +00:00
|
|
|
%files devel
|
2025-03-25 07:33:09 +00:00
|
|
|
%{p_incdir}
|
2020-11-28 16:53:30 +00:00
|
|
|
|
2017-10-06 06:36:48 +00:00
|
|
|
%files devel-static
|
2025-03-25 07:33:09 +00:00
|
|
|
%{p_libdir}/*.a
|
2017-10-06 06:36:48 +00:00
|
|
|
|
|
|
|
|
%changelog
|