2015-12-01 20:59:32 +00:00
|
|
|
Summary: A high-performance implementation of MPI
|
|
|
|
Name: mpich
|
2021-01-30 10:29:05 +00:00
|
|
|
Version: 3.4.1
|
2022-01-19 07:38:05 +00:00
|
|
|
Release: %autorelease
|
2015-12-01 20:59:32 +00:00
|
|
|
License: MIT
|
2019-11-17 10:38:42 +00:00
|
|
|
URL: https://www.mpich.org/
|
2015-12-01 20:59:32 +00:00
|
|
|
|
2019-11-17 10:38:42 +00:00
|
|
|
Source0: https://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz
|
2015-12-01 20:59:32 +00:00
|
|
|
Source1: mpich.macros
|
|
|
|
Source2: mpich.pth.py2
|
|
|
|
Source3: mpich.pth.py3
|
2022-02-08 09:27:19 +00:00
|
|
|
|
|
|
|
Patch0: 0001-Drop-real128.patch
|
|
|
|
Patch1: mpich-modules.patch
|
2020-08-06 00:58:04 +00:00
|
|
|
# Drop build flags, e.g. -specs... and -lto from mpi wrappers (mpicc and mpicxx)
|
|
|
|
# for discussion see:
|
|
|
|
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/7TFWEKTDWBYBHEGMIWBVI3AVGORZGNBS/
|
2022-02-08 09:27:19 +00:00
|
|
|
Patch2: fix_wrapper_flags.patch
|
|
|
|
Patch3: 0001-pkgconf-remove-optimization-and-link-flags-from-pkgc.patch
|
|
|
|
Patch4: 0002-pkgconf-also-drop-rpath-flags-from-pkgconf-file.patch
|
|
|
|
# TODO: submit ^ upstream
|
|
|
|
|
2021-01-30 15:19:23 +00:00
|
|
|
# https://github.com/pmodels/mpich/issues/4534
|
2022-02-08 09:27:19 +00:00
|
|
|
Patch5: 0001-Revert-Remove-use-of-vasprintf.patch
|
|
|
|
|
|
|
|
# There seems to be some syntax error, but I cannot figure out what it
|
|
|
|
# is (";;" is missing, but adding it doesn't fix things). Since we use
|
|
|
|
# clock_gettime anyway, just rip out the whole block.
|
|
|
|
Patch6: esac-syntax-fix.diff
|
2013-07-19 16:31:27 +00:00
|
|
|
|
2021-05-17 07:49:23 +00:00
|
|
|
BuildRequires: make
|
2018-07-19 10:50:40 +00:00
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: gcc-c++
|
2015-12-01 20:59:32 +00:00
|
|
|
BuildRequires: gcc-gfortran
|
2019-08-24 18:05:14 +00:00
|
|
|
BuildRequires: hwloc-devel >= 2.0
|
2021-01-30 15:19:23 +00:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libtool
|
|
|
|
# For ./maint/extractcvars
|
|
|
|
BuildRequires: perl(lib)
|
2016-03-30 16:36:08 +00:00
|
|
|
%ifnarch s390 %{mips}
|
2015-12-01 20:59:32 +00:00
|
|
|
BuildRequires: valgrind-devel
|
2013-07-19 16:31:27 +00:00
|
|
|
%endif
|
2019-11-17 10:40:34 +00:00
|
|
|
# For %%{python3_sitearch}
|
2015-08-27 21:35:04 +00:00
|
|
|
BuildRequires: python3-devel
|
2015-07-26 21:17:27 +00:00
|
|
|
BuildRequires: rpm-mpi-hooks
|
2015-12-01 20:59:32 +00:00
|
|
|
Provides: mpi
|
|
|
|
Provides: mpich2 = %{version}
|
|
|
|
Obsoletes: mpich2 < 3.0
|
|
|
|
Requires: environment(modules)
|
2013-07-19 16:31:27 +00:00
|
|
|
|
2019-05-07 09:31:59 +00:00
|
|
|
# Make sure this package is rebuilt with correct Python version when updating
|
|
|
|
# Otherwise mpi.req from rpm-mpi-hooks doesn't work
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1705296
|
|
|
|
Requires: (python(abi) = %{python3_version} if python3)
|
|
|
|
|
2013-07-19 16:31:27 +00:00
|
|
|
%description
|
|
|
|
MPICH is a high-performance and widely portable implementation of the Message
|
|
|
|
Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3). The goals of MPICH
|
|
|
|
are: (1) 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
|
|
|
|
(10 Gigabit Ethernet, InfiniBand, Myrinet, Quadrics) and proprietary high-end
|
|
|
|
computing systems (Blue Gene, Cray) and (2) to enable cutting-edge research in
|
|
|
|
MPI through an easy-to-extend modular framework for other derived
|
|
|
|
implementations.
|
|
|
|
|
|
|
|
The mpich binaries in this RPM packages were configured to use the default
|
|
|
|
process manager (Hydra) using the default device (ch3). The ch3 device
|
|
|
|
was configured with support for the nemesis channel that allows for
|
|
|
|
shared-memory and TCP/IP sockets based communication.
|
|
|
|
|
|
|
|
This build also include support for using the 'module environment' to select
|
|
|
|
which MPI implementation to use when multiple implementations are installed.
|
|
|
|
If you want MPICH support to be automatically loaded, you need to install the
|
|
|
|
mpich-autoload package.
|
|
|
|
|
|
|
|
%package autoload
|
2015-12-01 20:59:32 +00:00
|
|
|
Summary: Load mpich automatically into profile
|
|
|
|
Requires: mpich = %{version}-%{release}
|
|
|
|
Provides: mpich2-autoload = 3.0.1
|
|
|
|
Obsoletes: mpich2-autoload < 3.0
|
2013-07-19 16:31:27 +00:00
|
|
|
|
|
|
|
%description autoload
|
|
|
|
This package contains profile files that make mpich automatically loaded.
|
|
|
|
|
|
|
|
%package devel
|
2015-12-01 20:59:32 +00:00
|
|
|
Summary: Development files for mpich
|
|
|
|
Provides: %{name}-devel-static = %{version}-%{release}
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: pkgconfig
|
|
|
|
Requires: gcc-gfortran
|
|
|
|
Requires: rpm-mpi-hooks
|
2020-01-30 15:20:45 +00:00
|
|
|
Requires: redhat-rpm-config
|
2015-12-01 20:59:32 +00:00
|
|
|
Provides: mpich2-devel = 3.0.1
|
|
|
|
Obsoletes: mpich2-devel < 3.0
|
2013-07-19 16:31:27 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Contains development headers and libraries for mpich
|
|
|
|
|
|
|
|
%package doc
|
2015-12-01 20:59:32 +00:00
|
|
|
Summary: Documentations and examples for mpich
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
|
Provides: mpich2-doc = 3.0.1
|
|
|
|
Obsoletes: mpich2-doc < 3.0
|
2013-07-19 16:31:27 +00:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
Contains documentations, examples and man-pages for mpich
|
|
|
|
|
2016-11-02 17:32:19 +00:00
|
|
|
%package -n python3-mpich
|
|
|
|
Summary: mpich support for Python 3
|
2019-05-08 06:27:15 +00:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: python(abi) = %{python3_version}
|
2016-11-02 17:32:19 +00:00
|
|
|
|
|
|
|
%description -n python3-mpich
|
|
|
|
mpich support for Python 3.
|
|
|
|
|
2013-07-19 16:31:27 +00:00
|
|
|
%prep
|
2019-08-28 11:04:49 +00:00
|
|
|
%setup
|
|
|
|
|
|
|
|
%ifarch %{arm}
|
2022-02-08 09:27:19 +00:00
|
|
|
%patch0 -p1
|
2019-08-28 11:04:49 +00:00
|
|
|
%endif
|
2013-07-19 16:31:27 +00:00
|
|
|
|
2022-02-08 09:27:19 +00:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
2021-01-27 06:57:24 +00:00
|
|
|
%patch3 -p1
|
2021-01-30 15:19:23 +00:00
|
|
|
%patch4 -p1
|
2021-05-17 07:49:23 +00:00
|
|
|
%patch5 -p1
|
2022-02-08 09:27:19 +00:00
|
|
|
%patch6 -p1
|
2021-05-17 07:49:23 +00:00
|
|
|
|
2013-07-19 16:31:27 +00:00
|
|
|
%build
|
2021-01-30 15:19:23 +00:00
|
|
|
./autogen.sh
|
|
|
|
|
Drop custom compilation and link flags
They were added in this form in the initial commit.
I think it's hard to say at this point what if anything needs to be customized
like that. Let's try to go back to the defaults and see what happens.
(before)
libtool: link: gcc -m64 -O2 -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -Wl,-z -Wl,noexecstack -o hydra_nameserver tools/nameserver/hydra_nameserver-hydra_nameserver.o /builddir/build/BUILD/mpich-3.2.1/src/pm/hydra/.libs/libhydra.a mpl/.libs/libmpl.a -lpthread -lhwloc
(after)
libtool: link: gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o hydra_nameserver tools/nameserver/hydra_nameserver-hydra_nameserver.o /builddir/build/BUILD/mpich-3.2.1/src/pm/hydra/.libs/libhydra.a mpl/.libs/libmpl.a -lpthread -lhwloc
2019-05-07 07:57:04 +00:00
|
|
|
CONFIGURE_OPTS=(
|
|
|
|
--enable-sharedlibs=gcc
|
|
|
|
--enable-shared
|
|
|
|
--enable-static=no
|
|
|
|
--enable-lib-depend
|
|
|
|
--disable-rpath
|
|
|
|
--disable-silent-rules
|
2021-01-30 10:29:05 +00:00
|
|
|
--enable-fortran
|
|
|
|
--with-gnu-ld
|
Drop custom compilation and link flags
They were added in this form in the initial commit.
I think it's hard to say at this point what if anything needs to be customized
like that. Let's try to go back to the defaults and see what happens.
(before)
libtool: link: gcc -m64 -O2 -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -Wl,-z -Wl,noexecstack -o hydra_nameserver tools/nameserver/hydra_nameserver-hydra_nameserver.o /builddir/build/BUILD/mpich-3.2.1/src/pm/hydra/.libs/libhydra.a mpl/.libs/libmpl.a -lpthread -lhwloc
(after)
libtool: link: gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o hydra_nameserver tools/nameserver/hydra_nameserver-hydra_nameserver.o /builddir/build/BUILD/mpich-3.2.1/src/pm/hydra/.libs/libhydra.a mpl/.libs/libmpl.a -lpthread -lhwloc
2019-05-07 07:57:04 +00:00
|
|
|
--with-device=ch3:nemesis
|
|
|
|
--with-pm=hydra:gforker
|
|
|
|
--includedir=%{_includedir}/%{name}-%{_arch}
|
|
|
|
--bindir=%{_libdir}/%{name}/bin
|
|
|
|
--libdir=%{_libdir}/%{name}/lib
|
|
|
|
--datadir=%{_datadir}/%{name}
|
|
|
|
--mandir=%{_mandir}/%{name}-%{_arch}
|
|
|
|
--docdir=%{_datadir}/%{name}/doc
|
|
|
|
--htmldir=%{_datadir}/%{name}/doc
|
|
|
|
--with-hwloc-prefix=system
|
|
|
|
)
|
|
|
|
|
2020-01-29 09:01:40 +00:00
|
|
|
# Set -fallow-argument-mismatch for #1795817
|
|
|
|
%configure "${CONFIGURE_OPTS[@]}" FFLAGS="$FFLAGS -fallow-argument-mismatch"
|
2013-07-19 16:31:27 +00:00
|
|
|
|
2017-11-12 12:14:04 +00:00
|
|
|
# Remove rpath
|
|
|
|
sed -r -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
|
|
|
sed -r -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|
|
|
|
2013-07-19 16:31:27 +00:00
|
|
|
#Try and work around 'unused-direct-shlib-dependency' rpmlint warnning
|
2017-11-12 12:14:04 +00:00
|
|
|
sed -i -e 's| -shared | -Wl,--as-needed\0|g' libtool
|
2013-07-19 16:31:27 +00:00
|
|
|
|
2019-08-24 18:05:14 +00:00
|
|
|
# work-around libtool error: cannot determine absolute directory name of 'system/lib'
|
|
|
|
mkdir -p system/lib
|
|
|
|
|
2017-11-12 07:59:41 +00:00
|
|
|
%make_build VERBOSE=1
|
2013-07-19 16:31:27 +00:00
|
|
|
|
|
|
|
%install
|
2015-11-16 16:24:53 +00:00
|
|
|
%make_install
|
2013-07-19 16:31:27 +00:00
|
|
|
|
2017-11-12 12:07:10 +00:00
|
|
|
mkdir -p %{buildroot}%{_fmoddir}/%{name}
|
|
|
|
mv %{buildroot}%{_includedir}/%{name}-*/*.mod %{buildroot}%{_fmoddir}/%{name}/
|
|
|
|
sed -r -i 's|^modincdir=.*|modincdir=%{_fmoddir}/%{name}|' %{buildroot}%{_libdir}/%{name}/bin/mpifort
|
2013-07-19 16:31:27 +00:00
|
|
|
|
|
|
|
# Install the module file
|
2019-05-07 09:18:12 +00:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/modulefiles/mpi
|
2015-11-16 16:24:53 +00:00
|
|
|
sed -r 's|%{_bindir}|%{_libdir}/%{name}/bin|;
|
|
|
|
s|@LIBDIR@|%{_libdir}/%{name}|;
|
|
|
|
s|@MPINAME@|%{name}|;
|
|
|
|
s|@py2sitearch@|%{python2_sitearch}|;
|
|
|
|
s|@py3sitearch@|%{python3_sitearch}|;
|
|
|
|
s|@ARCH@|%{_arch}|;
|
|
|
|
s|@fortranmoddir@|%{_fmoddir}|;
|
|
|
|
' \
|
2015-08-27 21:34:05 +00:00
|
|
|
<src/packaging/envmods/mpich.module \
|
2019-05-07 09:18:12 +00:00
|
|
|
>%{buildroot}%{_datadir}/modulefiles/mpi/%{name}-%{_arch}
|
2013-07-19 16:31:27 +00:00
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
|
2015-11-16 16:24:53 +00:00
|
|
|
cat >%{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.sh <<EOF
|
2013-07-19 16:31:27 +00:00
|
|
|
# Load mpich environment module
|
|
|
|
module load mpi/%{name}-%{_arch}
|
|
|
|
EOF
|
|
|
|
cp -p %{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.{sh,csh}
|
2015-12-01 20:59:32 +00:00
|
|
|
|
2014-02-21 17:18:38 +00:00
|
|
|
# Install the RPM macros
|
2015-08-27 21:34:05 +00:00
|
|
|
install -pDm0644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{name}
|
|
|
|
|
2015-08-27 21:35:04 +00:00
|
|
|
# Install the .pth files
|
|
|
|
mkdir -p %{buildroot}%{python2_sitearch}/%{name}
|
|
|
|
install -pDm0644 %{SOURCE2} %{buildroot}%{python2_sitearch}/%{name}.pth
|
|
|
|
mkdir -p %{buildroot}%{python3_sitearch}/%{name}
|
|
|
|
install -pDm0644 %{SOURCE3} %{buildroot}%{python3_sitearch}/%{name}.pth
|
2013-07-19 16:31:27 +00:00
|
|
|
|
2022-01-19 22:23:50 +00:00
|
|
|
# Create cmake directory
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/%{name}/lib/cmake/
|
|
|
|
|
2015-08-27 21:34:05 +00:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete
|
2013-07-19 16:31:27 +00:00
|
|
|
|
2013-08-23 22:54:00 +00:00
|
|
|
%check
|
2020-09-15 15:14:05 +00:00
|
|
|
make check VERBOSE=1 \
|
|
|
|
%ifarch ppc64le
|
|
|
|
|| :
|
|
|
|
%endif
|
|
|
|
# The test results are ignored on ppc64le. The tests started failing
|
|
|
|
# in the bundled openpa checksuite. Upstream has already removed it,
|
|
|
|
# so the issue should resolve itself for the next release and I don't
|
|
|
|
# think it's worth the time to solve it here.
|
2013-08-23 22:54:00 +00:00
|
|
|
|
2019-01-22 17:40:27 +00:00
|
|
|
%ldconfig_scriptlets
|
2013-07-19 16:31:27 +00:00
|
|
|
|
|
|
|
%files
|
2015-08-27 21:34:05 +00:00
|
|
|
%license COPYRIGHT
|
|
|
|
%doc CHANGES README README.envvar RELEASE_NOTES
|
2013-07-19 16:31:27 +00:00
|
|
|
%dir %{_libdir}/%{name}
|
|
|
|
%dir %{_libdir}/%{name}/lib
|
|
|
|
%dir %{_libdir}/%{name}/bin
|
|
|
|
%{_libdir}/%{name}/lib/*.so.*
|
2017-11-12 12:07:10 +00:00
|
|
|
%{_libdir}/%{name}/bin/hydra*
|
|
|
|
%{_libdir}/%{name}/bin/mpichversion
|
|
|
|
%{_libdir}/%{name}/bin/mpiexec*
|
|
|
|
%{_libdir}/%{name}/bin/mpirun
|
|
|
|
%{_libdir}/%{name}/bin/mpivars
|
|
|
|
%{_libdir}/%{name}/bin/parkill
|
2015-11-16 16:38:49 +00:00
|
|
|
%dir %{_mandir}/%{name}-%{_arch}
|
|
|
|
%doc %{_mandir}/%{name}-%{_arch}/man1/
|
2019-05-07 09:18:12 +00:00
|
|
|
%{_datadir}/modulefiles/mpi/
|
2013-07-19 16:31:27 +00:00
|
|
|
|
|
|
|
%files autoload
|
|
|
|
%{_sysconfdir}/profile.d/mpich-%{_arch}.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/%{name}-%{_arch}/
|
2015-03-11 18:28:47 +00:00
|
|
|
%{_libdir}/%{name}/lib/pkgconfig/
|
2022-01-19 22:23:50 +00:00
|
|
|
%{_libdir}/%{name}/lib/cmake/
|
2013-07-19 16:31:27 +00:00
|
|
|
%{_libdir}/%{name}/lib/*.so
|
2017-11-12 12:07:10 +00:00
|
|
|
%{_libdir}/%{name}/bin/mpicc
|
|
|
|
%{_libdir}/%{name}/bin/mpic++
|
|
|
|
%{_libdir}/%{name}/bin/mpicxx
|
|
|
|
%{_libdir}/%{name}/bin/mpif77
|
|
|
|
%{_libdir}/%{name}/bin/mpif90
|
|
|
|
%{_libdir}/%{name}/bin/mpifort
|
2015-11-16 16:24:53 +00:00
|
|
|
%{_fmoddir}/%{name}/
|
2014-02-21 17:18:38 +00:00
|
|
|
%{_rpmconfigdir}/macros.d/macros.%{name}
|
2015-11-16 18:06:19 +00:00
|
|
|
%{_mandir}/%{name}-%{_arch}/man3/
|
2013-07-19 16:31:27 +00:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
%{_datadir}/%{name}/doc/
|
|
|
|
|
2016-11-02 17:32:19 +00:00
|
|
|
%files -n python3-mpich
|
|
|
|
%dir %{python3_sitearch}/%{name}
|
|
|
|
%{python3_sitearch}/%{name}.pth
|
|
|
|
|
2013-07-19 16:31:27 +00:00
|
|
|
%changelog
|
2022-01-19 07:38:05 +00:00
|
|
|
%autochangelog
|