2017-06-23 05:56:52 +00:00
|
|
|
#
|
2025-03-24 16:00:26 +00:00
|
|
|
# spec file for package mpich
|
2017-06-23 05:56:52 +00:00
|
|
|
#
|
2025-10-09 13:41:40 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
2017-06-23 05:56:52 +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-03-21 13:00:04 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-06-23 05:56:52 +00:00
|
|
|
#
|
|
|
|
|
|
2017-09-12 09:44:37 +00:00
|
|
|
|
2017-07-05 11:53:19 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%nil
|
2017-06-23 05:56:52 +00:00
|
|
|
|
2017-10-27 13:54:07 +00:00
|
|
|
# Static libraries are disabled by default
|
|
|
|
|
# for non HPC builds
|
|
|
|
|
# To enable them, simply uncomment:
|
|
|
|
|
# % define build_static_devel 1
|
|
|
|
|
|
|
|
|
|
%define pname mpich
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
|
%endif
|
|
|
|
|
|
2025-11-04 19:03:23 +01:00
|
|
|
%if "%{flavor}" == "ucx"
|
2021-04-02 14:12:08 +00:00
|
|
|
%define build_flavor ucx
|
2017-10-27 13:54:07 +00:00
|
|
|
%endif
|
2025-11-04 19:03:23 +01:00
|
|
|
%if "%{flavor}" == "ucx-testsuite"
|
2021-04-02 14:12:08 +00:00
|
|
|
%define build_flavor ucx
|
2017-10-27 13:54:07 +00:00
|
|
|
%define testsuite 1
|
2017-07-05 11:53:19 +00:00
|
|
|
%endif
|
|
|
|
|
|
2017-10-27 13:54:07 +00:00
|
|
|
%if "%{flavor}" == "ofi"
|
|
|
|
|
%define build_flavor ofi
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{flavor}" == "ofi-testsuite"
|
|
|
|
|
%define build_flavor ofi
|
|
|
|
|
%define testsuite 1
|
2020-07-23 18:49:04 +00:00
|
|
|
%endif
|
|
|
|
|
|
2021-04-02 14:12:08 +00:00
|
|
|
%if "%{build_flavor}" != "ucx"
|
2017-10-27 13:54:07 +00:00
|
|
|
%define pack_suff %{?build_flavor:-%{build_flavor}}
|
|
|
|
|
%endif
|
|
|
|
|
|
2021-04-02 14:12:08 +00:00
|
|
|
%if "%{build_flavor}" == "ucx"
|
|
|
|
|
%ifarch %ix86 %arm
|
|
|
|
|
# UCX is not available on 32b system so silently fallback
|
2022-09-30 11:26:08 +00:00
|
|
|
# on ch4:ofi
|
|
|
|
|
%define build_flavor ofi
|
2021-04-02 14:12:08 +00:00
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
2017-10-27 13:54:07 +00:00
|
|
|
%define module_name mpich%{?pack_suff}
|
|
|
|
|
%define p_prefix /usr/%_lib/mpi/gcc/%{module_name}
|
|
|
|
|
%define p_bindir %{p_prefix}/bin
|
|
|
|
|
%define p_datadir %{p_prefix}/share
|
|
|
|
|
%define p_includedir %{p_prefix}/include
|
|
|
|
|
%define p_mandir %{p_datadir}/man
|
|
|
|
|
%define p_libdir %{p_prefix}/%{_lib}
|
|
|
|
|
%define p_libexecdir %{p_prefix}/%{_lib}
|
2025-06-26 16:15:31 +00:00
|
|
|
%define p_sysconfdir %{p_prefix}/%{_sysconfdir}
|
2017-07-05 11:53:19 +00:00
|
|
|
%define _moduledir /usr/share/modules/gnu-%{module_name}
|
2017-10-27 13:54:07 +00:00
|
|
|
%define package_name %{pname}%{?pack_suff}
|
2017-07-05 11:53:19 +00:00
|
|
|
|
2017-10-27 13:54:07 +00:00
|
|
|
Name: %{package_name}%{?testsuite:-testsuite}
|
2025-10-28 18:55:43 +01:00
|
|
|
Version: 4.3.2
|
2017-06-23 05:56:52 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: High-performance and widely portable implementation of MPI
|
|
|
|
|
License: MIT
|
|
|
|
|
Group: Development/Libraries/Parallel
|
2019-11-28 14:08:23 +00:00
|
|
|
URL: http://www.mpich.org/
|
2025-03-30 15:33:43 +00:00
|
|
|
Source0: http://www.mpich.org/static/downloads/%{version}/mpich-%{version}.tar.gz
|
2017-07-06 07:18:01 +00:00
|
|
|
Source1: mpivars.sh
|
|
|
|
|
Source2: mpivars.csh
|
2017-07-05 11:53:19 +00:00
|
|
|
Source100: _multibuild
|
2025-10-27 17:35:26 +01:00
|
|
|
Source101: README.md
|
2021-04-02 14:12:08 +00:00
|
|
|
Patch1: autogen-only-deal-with-json-yaksa-if-enabled.patch
|
|
|
|
|
Patch2: autoconf-pull-dynamic-and-not-static-libs-from-pkg-config.patch
|
2025-10-09 13:41:40 +00:00
|
|
|
Patch3: romio-test-fix-bad-snprintf-arguments.patch
|
2025-11-08 23:38:38 +01:00
|
|
|
Patch4: ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch
|
2017-06-23 05:56:52 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
|
|
BuildRequires: fdupes
|
2021-04-02 14:12:08 +00:00
|
|
|
BuildRequires: libjson-c-devel
|
2017-06-23 05:56:52 +00:00
|
|
|
BuildRequires: libtool
|
|
|
|
|
BuildRequires: pkg-config
|
2021-04-02 14:12:08 +00:00
|
|
|
|
2022-10-17 18:18:51 +00:00
|
|
|
%ifnarch s390 s390x %{arm} ppc64
|
2017-06-23 05:56:52 +00:00
|
|
|
BuildRequires: valgrind-devel
|
|
|
|
|
%endif
|
2017-07-05 11:53:19 +00:00
|
|
|
%ifnarch s390 s390x armv7hl
|
|
|
|
|
BuildRequires: libnuma-devel
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
BuildRequires: mpi-selector
|
2021-04-02 14:12:08 +00:00
|
|
|
BuildRequires: python3-devel
|
2025-11-03 18:46:42 +01:00
|
|
|
BuildRequires: hwloc-devel >= 2.0
|
2021-04-02 14:12:08 +00:00
|
|
|
|
|
|
|
|
%if "%{build_flavor}" == "ofi"
|
2017-07-05 11:53:19 +00:00
|
|
|
BuildRequires: libfabric-devel
|
|
|
|
|
%endif
|
2017-10-27 13:54:07 +00:00
|
|
|
|
2021-04-02 14:12:08 +00:00
|
|
|
%if "%{build_flavor}" == "ucx"
|
Accepting request 960004 from home:NMoreyChaisemartin:branches:science:HPC
- Update to mpich 4.0.1 (bsc#1194369)
- All MPI-4 APIs have been implemented. Major MPI-4 features include MPI
sessions, partitioned point-to-point communications, events in the MPI tool
information interface, large-count functions, persistent collectives,
MPI_Comm_idup_with_info, MPI_Isendrecv and MPI_Isendrecv_replace,
MPI_Info_get_string, MPI_Comm_split_type with new split_type --
MPI_COMM_TYPE_HW_GUIDED and MPI_COMM_TYPE_HW_UNGUIDED.
- Add MPIX_Delete_error_{class,code,string}.
- MPI_Info objects can be accessed before MPI_Init{_thread}.
- Drop support for UCX version < 1.7.0.
- Multi-NIC support in ch4:ofi.
- Extend IPC to support non-contig datatypes.
- Many bug fixes and code clean-ups.
- Drop 0001-Drop-real128.patch as it was fixed upstream
- Refresh autogen-only-deal-with-json-yaksa-if-enabled.patch
against latest sources
OBS-URL: https://build.opensuse.org/request/show/960004
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=60
2022-03-07 15:37:47 +00:00
|
|
|
BuildRequires: libucm-devel >= 1.7.0
|
|
|
|
|
BuildRequires: libucp-devel >= 1.7.0
|
|
|
|
|
BuildRequires: libucs-devel >= 1.7.0
|
|
|
|
|
BuildRequires: libuct-devel >= 1.7.0
|
2021-04-02 14:12:08 +00:00
|
|
|
# UCX is only available for 64b archs
|
|
|
|
|
ExcludeArch: %ix86 %arm
|
|
|
|
|
%endif
|
2017-06-23 05:56:52 +00:00
|
|
|
Provides: mpi
|
2017-10-27 13:54:07 +00:00
|
|
|
BuildRequires: Modules
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: gcc-fortran
|
2017-07-06 07:18:01 +00:00
|
|
|
BuildRequires: mpi-selector
|
|
|
|
|
Requires: mpi-selector
|
2025-03-24 16:00:26 +00:00
|
|
|
Requires(preun): mpi-selector
|
2017-10-27 13:54:07 +00:00
|
|
|
|
|
|
|
|
%if 0%{?testsuite}
|
2025-10-09 13:41:40 +00:00
|
|
|
BuildRequires: %package_name-devel = %{version}
|
2017-10-27 13:54:07 +00:00
|
|
|
%endif
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
MPICH is a high performance and widely portable implementation of the Message
|
|
|
|
|
Passing Interface (MPI) standard.
|
|
|
|
|
|
|
|
|
|
The goals of MPICH are:
|
|
|
|
|
|
|
|
|
|
* to provide an MPI implementation that efficiently supports different
|
|
|
|
|
computation and communication platforms including commodity clusters
|
|
|
|
|
(desktop systems, shared-memory systems, multicore architectures),
|
|
|
|
|
high-speed networks and proprietary high-end computing systems
|
|
|
|
|
(Blue Gene, Cray)
|
|
|
|
|
* to enable cutting-edge research in MPI through an easy-to-extend modular
|
|
|
|
|
framework for other derived implementations
|
|
|
|
|
|
2017-07-05 11:53:19 +00:00
|
|
|
%if 0%{!?testsuite:1}
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
%package devel
|
2025-03-30 15:33:43 +00:00
|
|
|
Summary: SDK for MPICH version %{version}
|
2017-06-23 05:56:52 +00:00
|
|
|
Group: Development/Libraries/Parallel
|
|
|
|
|
Requires: %{name} = %{version}
|
2017-10-27 13:54:07 +00:00
|
|
|
Requires: %{name} = %{version}
|
2025-03-30 15:33:43 +00:00
|
|
|
Requires: libstdc++-devel
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
MPICH is a freely available, portable implementation of MPI, the
|
|
|
|
|
Standard for message-passing libraries. This package contains manpages,
|
|
|
|
|
headers and libraries needed for developing MPI applications.
|
|
|
|
|
|
2017-10-27 13:54:07 +00:00
|
|
|
This RPM contains all the wrappers necessary to compile, link, and run
|
|
|
|
|
Open MPI jobs.
|
|
|
|
|
|
|
|
|
|
%if 0%{?build_static_devel}
|
2017-07-05 11:53:19 +00:00
|
|
|
%package devel-static
|
2025-03-30 15:33:43 +00:00
|
|
|
Summary: Static libraries for MPICH version %{version}
|
2017-07-05 11:53:19 +00:00
|
|
|
Group: Development/Libraries/Parallel
|
|
|
|
|
Requires: %{name}-devel = %{version}
|
2017-06-23 05:56:52 +00:00
|
|
|
|
2017-07-05 11:53:19 +00:00
|
|
|
%description devel-static
|
2017-10-27 13:54:07 +00:00
|
|
|
MPICH is a freely available, portable implementation of MPI, the
|
|
|
|
|
Standard for message-passing libraries. This package contains manpages,
|
|
|
|
|
headers and libraries needed for developing MPI applications.
|
|
|
|
|
|
|
|
|
|
This RPM contains the static library files, which are packaged separately from
|
|
|
|
|
the dynamic library and headers.
|
|
|
|
|
%endif
|
|
|
|
|
|
2017-07-05 11:53:19 +00:00
|
|
|
%endif # ! testsuite
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
%prep
|
2017-10-27 13:54:07 +00:00
|
|
|
echo FLAVOR %{flavor}
|
2024-05-27 11:05:19 +00:00
|
|
|
%autosetup -p0 -n mpich-%{version}%{?rc_ver}
|
|
|
|
|
|
2021-04-02 14:12:08 +00:00
|
|
|
# Make sure prebuilt dependencies are used and not mpich submodules
|
|
|
|
|
rm -R modules/{ucx,libfabric,json-c}
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
%build
|
2019-10-01 12:38:10 +00:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2020-06-09 20:03:56 +00:00
|
|
|
|
|
|
|
|
# GCC10 needs an extra flag to allow badly passed parameters
|
2025-03-30 15:33:43 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
2025-11-09 00:53:40 +01:00
|
|
|
export FFLAGS="-fallow-argument-mismatch %{optflags}"
|
|
|
|
|
export FCFLAGS="-fallow-argument-mismatch %{optflags}"
|
2020-06-09 20:03:56 +00:00
|
|
|
%endif
|
2025-11-09 00:30:48 +01:00
|
|
|
%ifarch aarch64
|
|
|
|
|
# For some reason, configure has random issue with defining this
|
|
|
|
|
# on aarch64 only. Set it to avoid random failure
|
|
|
|
|
export CROSS_F77_SIZEOF_INTEGER=4
|
|
|
|
|
%endif
|
2025-11-04 21:22:41 +01:00
|
|
|
autoreconf -fi
|
2017-07-06 07:18:01 +00:00
|
|
|
%configure \
|
2017-10-27 13:54:07 +00:00
|
|
|
--prefix=%{p_prefix} \
|
|
|
|
|
--exec-prefix=%{p_prefix} \
|
|
|
|
|
--datadir=%{p_datadir} \
|
|
|
|
|
--bindir=%{p_bindir} \
|
|
|
|
|
--includedir=%{p_includedir} \
|
|
|
|
|
--libdir=%{p_libdir} \
|
|
|
|
|
--libexecdir=%{p_libexecdir} \
|
|
|
|
|
--mandir=%{p_mandir} \
|
|
|
|
|
--docdir=%{_datadir}/doc/%{name} \
|
2025-06-26 16:15:31 +00:00
|
|
|
--sysconfdir=%{p_sysconfdir} \
|
2017-07-05 11:53:19 +00:00
|
|
|
--disable-rpath \
|
2017-07-13 08:01:54 +00:00
|
|
|
--disable-wrapper-rpath \
|
2025-11-03 18:46:42 +01:00
|
|
|
--with-hwloc \
|
2021-04-02 14:12:08 +00:00
|
|
|
%if "%{build_flavor}" == "ofi"
|
Accepting request 960004 from home:NMoreyChaisemartin:branches:science:HPC
- Update to mpich 4.0.1 (bsc#1194369)
- All MPI-4 APIs have been implemented. Major MPI-4 features include MPI
sessions, partitioned point-to-point communications, events in the MPI tool
information interface, large-count functions, persistent collectives,
MPI_Comm_idup_with_info, MPI_Isendrecv and MPI_Isendrecv_replace,
MPI_Info_get_string, MPI_Comm_split_type with new split_type --
MPI_COMM_TYPE_HW_GUIDED and MPI_COMM_TYPE_HW_UNGUIDED.
- Add MPIX_Delete_error_{class,code,string}.
- MPI_Info objects can be accessed before MPI_Init{_thread}.
- Drop support for UCX version < 1.7.0.
- Multi-NIC support in ch4:ofi.
- Extend IPC to support non-contig datatypes.
- Many bug fixes and code clean-ups.
- Drop 0001-Drop-real128.patch as it was fixed upstream
- Refresh autogen-only-deal-with-json-yaksa-if-enabled.patch
against latest sources
OBS-URL: https://build.opensuse.org/request/show/960004
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=60
2022-03-07 15:37:47 +00:00
|
|
|
--with-ofi \
|
2021-04-02 14:12:08 +00:00
|
|
|
--with-device=ch4:ofi \
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{build_flavor}" == "ucx"
|
Accepting request 960004 from home:NMoreyChaisemartin:branches:science:HPC
- Update to mpich 4.0.1 (bsc#1194369)
- All MPI-4 APIs have been implemented. Major MPI-4 features include MPI
sessions, partitioned point-to-point communications, events in the MPI tool
information interface, large-count functions, persistent collectives,
MPI_Comm_idup_with_info, MPI_Isendrecv and MPI_Isendrecv_replace,
MPI_Info_get_string, MPI_Comm_split_type with new split_type --
MPI_COMM_TYPE_HW_GUIDED and MPI_COMM_TYPE_HW_UNGUIDED.
- Add MPIX_Delete_error_{class,code,string}.
- MPI_Info objects can be accessed before MPI_Init{_thread}.
- Drop support for UCX version < 1.7.0.
- Multi-NIC support in ch4:ofi.
- Extend IPC to support non-contig datatypes.
- Many bug fixes and code clean-ups.
- Drop 0001-Drop-real128.patch as it was fixed upstream
- Refresh autogen-only-deal-with-json-yaksa-if-enabled.patch
against latest sources
OBS-URL: https://build.opensuse.org/request/show/960004
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=60
2022-03-07 15:37:47 +00:00
|
|
|
--with-ucx \
|
2021-04-02 14:12:08 +00:00
|
|
|
--with-device=ch4:ucx \
|
2017-07-05 11:53:19 +00:00
|
|
|
%endif
|
|
|
|
|
CFLAGS="%optflags -fPIC" \
|
|
|
|
|
CXXLAGS="%optflags -fPIC" \
|
|
|
|
|
MPICHLIB_CFLAGS="%{optflags}" \
|
|
|
|
|
MPICHLIB_CXXFLAGS="%{optflags}"
|
2017-06-23 05:56:52 +00:00
|
|
|
|
2025-11-09 00:20:19 +01:00
|
|
|
%if 0%{?testsuite}
|
|
|
|
|
%install
|
|
|
|
|
rm -rf %{buildroot}/*
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# Disable CMA. Modern kernels require specific ptrace capabilities
|
|
|
|
|
# that are not available in OBS
|
|
|
|
|
export MPIR_CVAR_CH4_CMA_ENABLE=0
|
|
|
|
|
for dir in src/mpl src/mpi/romio/test; do
|
2025-11-09 00:30:48 +01:00
|
|
|
(
|
|
|
|
|
cd $dir && make check
|
|
|
|
|
)
|
|
|
|
|
done
|
2025-11-09 00:20:19 +01:00
|
|
|
|
|
|
|
|
%else
|
2017-06-23 05:56:52 +00:00
|
|
|
make %{?_smp_mflags} VERBOSE=1
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
make DESTDIR=%{buildroot} install
|
2017-10-27 13:54:07 +00:00
|
|
|
|
|
|
|
|
# sanitize .la files
|
|
|
|
|
list="$(find %{buildroot} -name "*.la" -printf "%%h\n" | sort | uniq)"
|
|
|
|
|
for dir in ${list}
|
|
|
|
|
do
|
|
|
|
|
deps="${deps} -L${dir##%{buildroot}}"
|
|
|
|
|
done
|
|
|
|
|
for dir in ${list}
|
|
|
|
|
do
|
|
|
|
|
%if !0%{?build_static_devel}
|
|
|
|
|
rm -f ${dir}/*.la
|
|
|
|
|
%else
|
|
|
|
|
for file in ${dir}/*.la
|
|
|
|
|
do
|
|
|
|
|
sed -i -e "s@ [^[:space:]]*home[^[:space:]\']*@${deps}@" \
|
|
|
|
|
-e "s@ [^[:space:]]*home[^[:space:]\']*@@g" \
|
|
|
|
|
-e "s@-L.*.libs @@g" ${file}
|
|
|
|
|
done
|
|
|
|
|
%endif
|
|
|
|
|
done
|
|
|
|
|
# sanitize .la files
|
|
|
|
|
%if !0%{?build_static_devel}
|
|
|
|
|
find %{buildroot} -name "*.a" -delete
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%fdupes %{buildroot}%{p_mandir}
|
|
|
|
|
%fdupes %{buildroot}%{p_datadir}
|
|
|
|
|
%fdupes %{buildroot}%{p_libdir}/pkgconfig
|
2017-06-23 05:56:52 +00:00
|
|
|
|
2017-10-27 13:54:07 +00:00
|
|
|
# make and install mpivars files
|
|
|
|
|
install -m 0755 -d %{buildroot}%{_bindir}
|
|
|
|
|
sed -e 's,prefix,%p_prefix,g' -e 's,libdir,%{p_libdir},g' %{S:1} > %{buildroot}%{p_bindir}/mpivars.sh
|
|
|
|
|
sed -e 's,prefix,%p_prefix,g' -e 's,libdir,%{p_libdir},g' %{S:2} > %{buildroot}%{p_bindir}/mpivars.csh
|
|
|
|
|
|
2017-07-05 11:53:19 +00:00
|
|
|
mkdir -p %{buildroot}%{_moduledir}
|
|
|
|
|
|
|
|
|
|
cat << EOF > %{buildroot}%{_moduledir}/%{version}
|
|
|
|
|
#%%Module
|
|
|
|
|
proc ModulesHelp { } {
|
|
|
|
|
global dotversion
|
|
|
|
|
puts stderr "\tLoads the gnu - mpich %{version} Environment"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module-whatis "Loads the gnu mpich %{version} Environment."
|
2017-10-27 13:54:07 +00:00
|
|
|
conflict gnu-mpich
|
|
|
|
|
prepend-path PATH %{%p_bindir}
|
|
|
|
|
prepend-path INCLUDE %{p_includedir}
|
|
|
|
|
prepend-path INCLUDE %{p_libdir}
|
|
|
|
|
prepend-path MANPATH %{p_mandir}
|
|
|
|
|
prepend-path LD_LIBRARY_PATH %{p_libdir}
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
2017-07-05 11:53:19 +00:00
|
|
|
cat << EOF > %{buildroot}%{_moduledir}/.version
|
|
|
|
|
#%%Module1.0
|
|
|
|
|
set ModulesVersion "%{version}"
|
2017-06-23 05:56:52 +00:00
|
|
|
|
2017-07-05 11:53:19 +00:00
|
|
|
EOF
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
|
|
|
|
|
|
|
|
|
|
%fdupes -s %{buildroot}
|
|
|
|
|
|
2017-07-06 07:18:01 +00:00
|
|
|
%post
|
2017-10-27 13:54:07 +00:00
|
|
|
/sbin/ldconfig
|
2018-09-06 15:42:17 +00:00
|
|
|
# Always register. We might be already registered in the case of an udate
|
|
|
|
|
# but mpi-selector handles it fine
|
2017-07-06 07:18:01 +00:00
|
|
|
/usr/bin/mpi-selector \
|
2018-09-06 15:42:17 +00:00
|
|
|
--register %{name}%{?pack_suff} \
|
2017-10-27 13:54:07 +00:00
|
|
|
--source-dir %{p_bindir} \
|
2017-07-06 07:18:01 +00:00
|
|
|
--yes
|
|
|
|
|
|
2017-10-27 13:54:07 +00:00
|
|
|
%postun
|
|
|
|
|
/sbin/ldconfig
|
2018-09-06 15:42:17 +00:00
|
|
|
# Only unregister when uninstalling
|
2018-09-07 09:15:15 +00:00
|
|
|
if [ "$1" = "0" ]; then
|
2018-09-06 15:42:17 +00:00
|
|
|
/usr/bin/mpi-selector --unregister %{name}%{?pack_suff} --yes
|
|
|
|
|
# Deregister the default if we are uninstalling it
|
2018-09-17 09:24:38 +00:00
|
|
|
if [ "$(/usr/bin/mpi-selector --system --query)" = "%{name}%{?pack_suff}" ]; then
|
2018-09-06 15:42:17 +00:00
|
|
|
/usr/bin/mpi-selector --system --unset --yes
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root)
|
2025-10-28 18:55:43 +01:00
|
|
|
%doc CHANGES COPYRIGHT README README.envvar
|
2017-07-05 11:53:19 +00:00
|
|
|
%dir /usr/%_lib/mpi
|
|
|
|
|
%dir /usr/%_lib/mpi/gcc
|
|
|
|
|
%dir /usr/share/modules
|
2021-06-18 12:51:18 +00:00
|
|
|
%doc %{_datadir}/doc/*
|
2017-10-27 13:54:07 +00:00
|
|
|
%dir %{p_prefix}
|
|
|
|
|
%dir %{p_bindir}
|
|
|
|
|
%dir %{p_datadir}
|
|
|
|
|
%dir %{p_includedir}
|
|
|
|
|
%dir %{p_mandir}
|
|
|
|
|
%dir %{p_mandir}/man1
|
|
|
|
|
%dir %{p_mandir}/man3
|
|
|
|
|
%dir %{p_libdir}
|
2025-06-26 16:15:31 +00:00
|
|
|
%{_moduledir}
|
2017-10-27 13:54:07 +00:00
|
|
|
%{p_bindir}/*
|
|
|
|
|
%{p_mandir}/man1/*
|
|
|
|
|
%{p_libdir}/*.so.*
|
2025-06-26 16:15:31 +00:00
|
|
|
%{p_sysconfdir}
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-,root,root)
|
2017-10-27 13:54:07 +00:00
|
|
|
%dir %{p_libdir}/pkgconfig
|
|
|
|
|
%{p_mandir}/man3/*
|
|
|
|
|
%{p_includedir}
|
|
|
|
|
%{p_libdir}/*.so
|
|
|
|
|
%{p_libdir}/pkgconfig/mpich.pc
|
|
|
|
|
|
|
|
|
|
%if 0%{?build_static_devel}
|
2017-07-05 11:53:19 +00:00
|
|
|
%files devel-static
|
2017-06-23 05:56:52 +00:00
|
|
|
%defattr(-,root,root)
|
2017-10-27 13:54:07 +00:00
|
|
|
%{p_libdir}/*.a
|
|
|
|
|
%endif
|
|
|
|
|
|
2017-07-05 11:53:19 +00:00
|
|
|
%endif # !testsuite
|
2017-06-23 05:56:52 +00:00
|
|
|
|
|
|
|
|
%changelog
|