diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..510fc13 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/mpich-3.2.1.tar.gz diff --git a/.mpich.metadata b/.mpich.metadata new file mode 100644 index 0000000..d18e8d3 --- /dev/null +++ b/.mpich.metadata @@ -0,0 +1 @@ +24c53333927d1760db78be2b9ef217f4f3dcf771 SOURCES/mpich-3.2.1.tar.gz diff --git a/SOURCES/0003-soften-version-check.patch b/SOURCES/0003-soften-version-check.patch new file mode 100644 index 0000000..6d75cc6 --- /dev/null +++ b/SOURCES/0003-soften-version-check.patch @@ -0,0 +1,13 @@ +diff --git mpich-3.2/./src/binding/cxx/mpicxx.h.in~ mpich-3.2/./src/binding/cxx/mpicxx.h.in +index 375c081e0e..24f1d6c2cc 100644 +--- mpich-3.2/./src/binding/cxx/mpicxx.h.in~ ++++ mpich-3.2/./src/binding/cxx/mpicxx.h.in +@@ -17,7 +17,7 @@ + // between 3.2.3 and 3.4.3 (!!) Normally such changes + // should only occur at major releases (e.g., version 3 to 4) + #ifdef __GNUC__ +-# if __GNUC__ >= @GNUCXX_VERSION@ ++# if __GNUC__ >= @GNUCXX_VERSION@ && @GNUCXX_VERSION@ == 3 + # if __GNUC_MINOR__ > 2 && @GNUCXX_MINORVERSION@ == 2 + # error 'Please use the same version of GCC and g++ for compiling MPICH and user MPI programs' + # endif diff --git a/SOURCES/mpich-modules.patch b/SOURCES/mpich-modules.patch new file mode 100644 index 0000000..ef05f74 --- /dev/null +++ b/SOURCES/mpich-modules.patch @@ -0,0 +1,33 @@ +--- mpich-3.2.1/src/packaging/envmods/mpich.module.in.orig 2017-11-11 03:19:44.000000000 +0100 ++++ mpich-3.2.1/src/packaging/envmods/mpich.module.in 2018-04-04 14:14:16.553160669 +0200 +@@ -3,12 +3,23 @@ + # MPICH module for use with 'environment-modules' package: + # + ++# Only allow one mpi module to be loaded at a time ++conflict mpi ++ + # Define prefix so PATH and MANPATH can be updated. +-setenv prefix @prefix@ +-setenv exec_prefix @exec_prefix@ ++setenv MPI_BIN @LIBDIR@/bin ++setenv MPI_SYSCONFIG @sysconfdir@/@MPINAME@-@ARCH@ ++setenv MPI_FORTRAN_MOD_DIR @fortranmoddir@/@MPINAME@ ++setenv MPI_INCLUDE @includedir@ ++setenv MPI_LIB @libdir@ ++setenv MPI_MAN @mandir@ ++setenv MPI_PYTHON_SITEARCH @py3sitearch@/@MPINAME@ ++setenv MPI_PYTHON2_SITEARCH @py3sitearch@/@MPINAME@ ++setenv MPI_PYTHON3_SITEARCH @py3sitearch@/@MPINAME@ ++setenv MPI_COMPILER @MPINAME@-@ARCH@ ++setenv MPI_SUFFIX _@MPINAME@ ++setenv MPI_HOME @LIBDIR@ + prepend-path PATH @bindir@ +-prepend-path MANPATH @mandir@ +- +-# Undefine prefix and exec_prefix which are too generic environment variables. +-unsetenv prefix +-unsetenv exec_prefix ++prepend-path LD_LIBRARY_PATH @libdir@ ++prepend-path MANPATH :@mandir@ ++prepend-path PKG_CONFIG_PATH @LIBDIR@/lib/pkgconfig diff --git a/SOURCES/mpich.macros b/SOURCES/mpich.macros new file mode 100644 index 0000000..85443f4 --- /dev/null +++ b/SOURCES/mpich.macros @@ -0,0 +1,7 @@ +%_mpich_load \ + . /etc/profile.d/modules.sh; \ + module load mpi/mpich-%{_arch}; \ + export CFLAGS="$CFLAGS %{optflags}"; +%_mpich_unload \ + . /etc/profile.d/modules.sh; \ + module unload mpi/mpich-%{_arch}; diff --git a/SOURCES/mpich.pth.py3 b/SOURCES/mpich.pth.py3 new file mode 100644 index 0000000..ced8c64 --- /dev/null +++ b/SOURCES/mpich.pth.py3 @@ -0,0 +1 @@ +import sys, os; s = os.getenv('MPI_PYTHON3_SITEARCH'); s and (s in sys.path or sys.path.append(s)) diff --git a/SPECS/mpich.spec b/SPECS/mpich.spec new file mode 100644 index 0000000..9e86c4a --- /dev/null +++ b/SPECS/mpich.spec @@ -0,0 +1,423 @@ +Summary: A high-performance implementation of MPI +Name: mpich +Version: 3.2.1 +Release: 9%{?dist} +License: MIT +URL: http://www.mpich.org/ + +Source0: http://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz +Source1: mpich.macros +Source2: mpich.pth.py3 +Patch0: mpich-modules.patch +Patch3: 0003-soften-version-check.patch + +BuildRequires: gcc-gfortran +BuildRequires: hwloc-devel >= 1.8 +%ifarch %{valgrind_arches} +BuildRequires: valgrind-devel +%endif +BuildRequires: rpm-mpi-hooks +BuildRequires: automake +Provides: mpi +Requires: environment(modules) + +%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 +Summary: Load mpich automatically into profile +Group: System Environment/Base +Requires: mpich = %{version}-%{release} + +%description autoload +This package contains profile files that make mpich automatically loaded. + +%package devel +Summary: Development files for mpich +Group: Development/Libraries +Provides: %{name}-devel-static = %{version}-%{release} +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig +Requires: gcc-gfortran +Requires: rpm-mpi-hooks + +%description devel +Contains development headers and libraries for mpich + +%package doc +Summary: Documentations and examples for mpich +Group: Documentation +BuildArch: noarch +Requires: %{name}-devel = %{version}-%{release} + +%description doc +Contains documentations, examples and man-pages for mpich + +%package -n python3-mpich +Summary: mpich support for Python 3 +Group: Development/Libraries + +BuildRequires: python3-devel +Provides: python-mpich + +%description -n python3-mpich +mpich support for Python 3. + +# We only compile with gcc, but other people may want other compilers. +# Set the compiler here. +%{!?opt_cc: %global opt_cc gcc} +%{!?opt_fc: %global opt_fc gfortran} +%{!?opt_f77: %global opt_f77 gfortran} +# Optional CFLAGS to use with the specific compiler...gcc doesn't need any, +# so uncomment and undefine to NOT use +%{!?opt_cc_cflags: %global opt_cc_cflags %{optflags}} +%{!?opt_fc_fflags: %global opt_fc_fflags %{optflags}} +#%%{!?opt_fc_fflags: %%global opt_fc_fflags %%{optflags} -I%%{_fmoddir}} +%{!?opt_f77_fflags: %global opt_f77_fflags %{optflags}} + +%ifarch s390 +%global m_option -m31 +%else +%global m_option -m%{__isa_bits} +%endif + +%ifarch %{arm} aarch64 %{mips} +%global m_option "" +%endif + +%global selected_channels ch3:nemesis + +%ifarch %{ix86} x86_64 s390 %{arm} aarch64 +%global XFLAGS -fPIC +%endif + +%prep +%autosetup -p1 + +%build +%configure \ + --enable-sharedlibs=gcc \ + --enable-shared \ + --enable-static=no \ + --enable-lib-depend \ + --disable-rpath \ + --disable-silent-rules \ + --enable-fc \ + --with-device=%{selected_channels} \ + --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 \ + FC=%{opt_fc} \ + F77=%{opt_f77} \ + CFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + CXXFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + FCFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + FFLAGS="%{m_option} %{optflags} %{?XFLAGS}" \ + LDFLAGS="%{build_ldflags}" \ + MPICHLIB_CFLAGS="%{?opt_cc_cflags}" \ + MPICHLIB_CXXFLAGS="%{optflags}" \ + MPICHLIB_FCFLAGS="%{?opt_fc_fflags}" \ + MPICHLIB_FFLAGS="%{?opt_f77_fflags}" + +# 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 + +#Try and work around 'unused-direct-shlib-dependency' rpmlint warnning +sed -i -e 's| -shared | -Wl,--as-needed\0|g' libtool + +%make_build VERBOSE=1 + +%install +%make_install + +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 + +# Install the module file +mkdir -p %{buildroot}%{_sysconfdir}/modulefiles/mpi +sed -r 's|%{_bindir}|%{_libdir}/%{name}/bin|; + s|@LIBDIR@|%{_libdir}/%{name}|; + s|@MPINAME@|%{name}|; + s|@py3sitearch@|%{python3_sitearch}|; + s|@ARCH@|%{_arch}|; + s|@fortranmoddir@|%{_fmoddir}|; + ' \ + %{buildroot}%{_sysconfdir}/modulefiles/mpi/%{name}-%{_arch} + +mkdir -p %{buildroot}%{_sysconfdir}/profile.d +cat >%{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.sh < - 3.2.1-9 +- Use proper distro compile flags throughout build +- Related: rhbz#1624144 + +* Thu Sep 13 2018 Jarod Wilson - 3.2.1-8 +- Remove python2 bits entirely, fix mpi lib dependencies +- Remove obsolete Provides/Obsoletes for mpich2 +- Resolves: rhbz#1628628 + +* Fri Aug 3 2018 Florian Weimer - 3.2.1-7 +- Honor %%{valgrind_arches} + +* Thu May 17 2018 Charalampos Stratakis - 3.2.1-6 +- Do not build the python2 subpackage on EL > 7 + +* Wed Apr 4 2018 Zbigniew Jędrzejewski-Szmek - 3.2.1-5 +- Update MANPATH so that normal man pages can still be found (#1533717) + +* Thu Feb 08 2018 Fedora Release Engineering - 3.2.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Feb 01 2018 Ralf Corsépius - 3.2.1-3 +- Rebuilt for GCC-8.0.1. + +* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek - 3.2.1-2 +- Update $modincdir in mpifort after moving .mod files (#1301533) +- Move compiler wrappers to mpich-devel (#1353621) +- Remove bogus rpath (#1361586) + +* Sun Nov 12 2017 Zbigniew Jędrzejewski-Szmek - 3.2.1-1 +- Update to latest bugfix release (#1512188) + +* Thu Aug 03 2017 Fedora Release Engineering - 3.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 3.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 3.2-7 +- Rebuild for Python 3.6 + +* Wed Nov 2 2016 Orion Poplawski - 3.2-7 +- Split python support into sub-packages + +* Wed Mar 30 2016 Michal Toman - 3.2-6 +- Fix build on MIPS + +* Thu Feb 04 2016 Fedora Release Engineering - 3.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 22 2016 Orion Poplawski - 3.2-4 +- Add patch to allow -host localhost to work on builders + +* Wed Jan 20 2016 Orion Poplawski - 3.2-3 +- Use nemesis channel on all platforms + +* Wed Dec 9 2015 Zbigniew Jędrzejewski-Szmek - 3.2-2 +- Soften version check (#1289779) + +* Tue Dec 1 2015 Zbigniew Jędrzejewski-Szmek - 3.2-1 +- Update to latest version + +* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-9 +- Update requires and fix MPI_FORTRAN_MOD_DIR var + +* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-8 +- Move fortran .mod files to %%{_fmoddir}/mpich (#1154991) +- Move man pages to arch-specific dir (#1264359) + +* Tue Nov 10 2015 Fedora Release Engineering - 3.1.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Aug 27 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-6 +- Use .pth files to set the python path (https://fedorahosted.org/fpc/ticket/563) +- Cleanups to the spec file + +* Sun Jul 26 2015 Sandro Mani - 3.1.4-5 +- Require, BuildRequire: rpm-mpi-hooks + +* Wed Jun 17 2015 Fedora Release Engineering - 3.1.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 9 2015 Zbigniew Jędrzejewski-Szmek - 3.1.4-3 +- Change MPI_SYCONFIG to /etc/mpich-x86_64 (#1196728) + +* Fri Mar 13 2015 Orion Poplawski - 3.1.4-2 +- Set PKG_CONFIG_DIR (bug #1113627) +- Fix modulefile names and python paths (bug#1201343) + +* Wed Mar 11 2015 Orion Poplawski - 3.1.4-1 +- Update to 3.1.4 +- Own and set PKG_CONFIG_DIR (bug #1113627) +- Do not ship old modulefile location (bug #921534) + +* Sun Aug 17 2014 Fedora Release Engineering - 3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Feb 21 2014 Ville Skyttä - 3.1-2 +- Install rpm macros to %%{_rpmconfigdir}/macros.d as non-%%config. + +* Fri Feb 21 2014 Deji Akingunola - 3.1-1 +- Update to 3.1 + +* Mon Jan 6 2014 Peter Robinson 3.0.4-7 +- Set the aarch64 compiler options + +* Fri Dec 13 2013 Peter Robinson 3.0.4-6 +- Now have valgrind on ARMv7 +- No valgrind on aarch64 + +* Fri Aug 23 2013 Orion Poplawski - 3.0.4-5 +- Add %%check + +* Sat Aug 03 2013 Fedora Release Engineering - 3.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sat Jul 20 2013 Deji Akingunola - 3.0.4-3 +- Add proper Provides and Obsoletes for the sub-packages + +* Thu Jul 18 2013 Deji Akingunola - 3.0.4-2 +- Fix some of the rpmlint warnings from package review (BZ #973493) + +* Wed Jun 12 2013 Deji Akingunola - 3.0.4-1 +- Update to 3.0.4 + +* Thu Feb 21 2013 Deji Akingunola - 3.0.2-1 +- Update to 3.0.2 +- Rename to mpich. +- Drop check for old alternatives' installation + +* Thu Feb 14 2013 Fedora Release Engineering - 1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Nov 1 2012 Orion Poplawski - 1.5-1 +- Update to 1.5 +- Drop destdir-fix and mpicxx-und patches +- Update rpm macros to use the new module location + +* Wed Oct 31 2012 Orion Poplawski - 1.4.1p1-9 +- Install module file in mpi subdirectory and conflict with other mpi modules +- Leave existing module file location for backwards compatibility for a while + +* Fri Jul 20 2012 Fedora Release Engineering - 1.4.1p1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Feb 15 2012 Peter Robinson - 1.4.1p1-7 +- Rebuild for new hwloc + +* Wed Feb 15 2012 Peter Robinson - 1.4.1p1-6 +- Update ARM build configuration + +* Fri Jan 13 2012 Fedora Release Engineering - 1.4.1p1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Jan 2 2012 Jussi Lehtola - 1.4.1p1-4 +- Bump spec. + +* Wed Nov 16 2011 Jussi Lehtola - 1.4.1p1-3 +- Comply to MPI guidelines by separating autoloading into separate package + (BZ #647147). + +* Tue Oct 18 2011 Deji Akingunola - 1.4.1p1-2 +- Rebuild for hwloc soname bump. + +* Sun Sep 11 2011 Deji Akingunola - 1.4.1p1-1 +- Update to 1.4.1p1 patch update +- Add enable-lib-depend to configure flags + +* Sat Aug 27 2011 Deji Akingunola - 1.4.1-1 +- Update to 1.4.1 final +- Drop the mpd subpackage, the PM is no longer supported upstream +- Fix undefined symbols in libmpichcxx (again) (#732926) + +* Wed Aug 03 2011 Jussi Lehtola - 1.4-2 +- Respect environment module guidelines wrt placement of module file. + +* Fri Jun 17 2011 Deji Akingunola - 1.4-1 +- Update to 1.4 final