[mpich] Initial commit
Deji Akingunola
deji at fedoraproject.org
Fri Jul 19 16:31:33 UTC 2013
commit 4ee7807037622d95c83af3f256d7d2ee2affb283
Author: Deji Akingunola <dakingun at gmail.com>
Date: Fri Jul 19 12:31:27 2013 -0400
Initial commit
.gitignore | 1 +
mpich-modules.patch | 30 ++++++
mpich.macros | 7 ++
mpich.spec | 279 +++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
5 files changed, 318 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..51e8ad7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/mpich-3.0.4.tar.gz
diff --git a/mpich-modules.patch b/mpich-modules.patch
new file mode 100644
index 0000000..6b6d354
--- /dev/null
+++ b/mpich-modules.patch
@@ -0,0 +1,30 @@
+--- src/packaging/envmods/mpich.module.in 2013-01-30 14:45:08.000000000 -0500
++++ src/packaging/envmods/mpich.module.in.new 2013-02-21 18:28:01.218528398 -0500
+@@ -3,12 +3,21 @@
+ # 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@/@MPILIBNAME@/bin
++setenv MPI_SYSCONFIG @sysconfdir@
++setenv MPI_FORTRAN_MOD_DIR @includedir@
++setenv MPI_INCLUDE @includedir@
++setenv MPI_LIB @libdir@
++setenv MPI_MAN @mandir@
++setenv MPI_PYTHON_SITEARCH @pysitearch@/@MPILIBNAME@
++setenv MPI_COMPILER @MPILIBNAME at -@ARCH@
++setenv MPI_SUFFIX _ at MPILIBNAME@
++setenv MPI_HOME @LIBDIR@/@MPILIBNAME@
+ prepend-path PATH @bindir@
++prepend-path LD_LIBRARY_PATH @libdir@
+ prepend-path MANPATH @mandir@
+-
+-# Undefine prefix and exec_prefix which are too generic environment variables.
+-unsetenv prefix
+-unsetenv exec_prefix
++prepend-path PYTHONPATH @pysitearch@/@MPILIBNAME@
diff --git a/mpich.macros b/mpich.macros
new file mode 100644
index 0000000..85443f4
--- /dev/null
+++ b/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/mpich.spec b/mpich.spec
new file mode 100644
index 0000000..3167daa
--- /dev/null
+++ b/mpich.spec
@@ -0,0 +1,279 @@
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+Summary: A high-performance implementation of MPI
+Name: mpich
+Version: 3.0.4
+Release: 2%{?dist}
+License: MIT
+Group: Development/Libraries
+URL: http://www.mpich.org/
+
+Source0: http://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz
+Source1: mpich.macros
+Patch0: mpich-modules.patch
+
+BuildRequires: gcc-gfortran
+BuildRequires: hwloc-devel >= 1.6
+%ifnarch s390 s390x %{arm}
+BuildRequires: valgrind-devel
+%endif
+Provides: mpi
+Provides: mpich2 = 3.0.1
+Obsoletes: mpich2 < 3.0
+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
+
+%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
+
+# 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}
+%global m_option ""
+%endif
+
+%ifarch %{ix86} x86_64
+%global selected_channels ch3:nemesis
+%else
+%global selected_channels ch3:sock
+%endif
+
+%ifarch %{ix86} x86_64 s390 %{arm}
+%global XFLAGS -fPIC
+%endif
+
+%prep
+%setup -q
+%patch0 -p0 -b .modu
+
+%build
+%configure \
+ --enable-sharedlibs=gcc \
+ --enable-shared \
+ --enable-lib-depend \
+ --disable-rpath \
+ --enable-fc \
+ --with-device=%{selected_channels} \
+ --with-pm=hydra:gforker \
+ --sysconfdir=%{_sysconfdir}/%{name}-%{_arch} \
+ --includedir=%{_includedir}/%{name}-%{_arch} \
+ --bindir=%{_libdir}/%{name}/bin \
+ --libdir=%{_libdir}/%{name}/lib \
+ --datadir=%{_datadir}/%{name} \
+ --mandir=%{_mandir}/%{name} \
+ --docdir=%{_datadir}/%{name}/doc \
+ --htmldir=%{_datadir}/%{name}/doc \
+ --with-hwloc-prefix=system \
+ FC=%{opt_fc} \
+ F77=%{opt_f77} \
+ CFLAGS="%{m_option} -O2 %{?XFLAGS}" \
+ CXXFLAGS="%{m_option} -O2 %{?XFLAGS}" \
+ FCFLAGS="%{m_option} -O2 %{?XFLAGS}" \
+ FFLAGS="%{m_option} -O2 %{?XFLAGS}" \
+ LDFLAGS='-Wl,-z,noexecstack' \
+ MPICHLIB_CFLAGS="%{?opt_cc_cflags}" \
+ MPICHLIB_CXXFLAGS="%{optflags}" \
+ MPICHLIB_FCFLAGS="%{?opt_fc_fflags}" \
+ MPICHLIB_FFLAGS="%{?opt_f77_fflags}"
+# MPICHLIB_LDFLAGS='-Wl,-z,noexecstack' \
+# MPICH_MPICC_FLAGS="%{m_option} -O2 %{?XFLAGS}" \
+# MPICH_MPICXX_FLAGS="%{m_option} -O2 %{?XFLAGS}" \
+# MPICH_MPIFC_FLAGS="%{m_option} -O2 %{?XFLAGS}" \
+# MPICH_MPIF77_FLAGS="%{m_option} -O2 %{?XFLAGS}"
+# --with-openpa-prefix=embedded \
+
+# FCFLAGS="%{?opt_fc_fflags} -I%{_fmoddir}/%{name} %{?XFLAGS}" \
+
+#Try and work around 'unused-direct-shlib-dependency' rpmlint warnning
+sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
+
+make %{?_smp_mflags} VERBOSE=1
+
+%install
+make DESTDIR=%{buildroot} install
+
+mv %{buildroot}%{_libdir}/%{name}/lib/pkgconfig %{buildroot}%{_libdir}/
+chmod -x %{buildroot}%{_libdir}/pkgconfig/*.pc
+
+#mkdir -p %{buildroot}/%{_fmoddir}/%{name}
+#mv %{buildroot}%{_includedir}/%{name}/*.mod %{buildroot}/%{_fmoddir}/%{name}/
+
+# Install the module file
+mkdir -p %{buildroot}%{_sysconfdir}/modulefiles/mpi
+mkdir -p %{buildroot}%{python_sitearch}/%{name}
+cp -pr src/packaging/envmods/mpich.module %{buildroot}%{_sysconfdir}/modulefiles/mpi/%{name}-%{_arch}
+sed -i 's#'%{_bindir}'#'%{_libdir}/%{name}/bin'#;s#@LIBDIR@#'%{_libdir}'#;s#@pysitearch@#'%{python_sitearch}'#;s#@ARCH@#'%{_arch}'#' %{buildroot}%{_sysconfdir}/modulefiles/mpi/%{name}-%{_arch}
+cp -p %{buildroot}%{_sysconfdir}/modulefiles/mpi/%{name}-%{_arch} %{buildroot}%{_sysconfdir}/modulefiles/%{name}-%{_arch}
+
+mkdir -p %{buildroot}%{_sysconfdir}/profile.d
+cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.sh
+# Load mpich environment module
+module load mpi/%{name}-%{_arch}
+EOF
+cp -p %{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.{sh,csh}
+
+# Install the RPM macro
+mkdir -p %{buildroot}%{_sysconfdir}/rpm
+cp -pr %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.%{name}
+
+# Silence rpmlint
+sed -i '/^#! \//,1 d' %{buildroot}%{_sysconfdir}/%{name}-%{_arch}/mpi*.conf
+
+find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
+rm -f %{buildroot}%{_libdir}/%{name}/lib/lib{*mpich*,opa,mpl}.a
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%doc CHANGES COPYRIGHT README README.envvar RELEASE_NOTES
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/lib
+%dir %{_libdir}/%{name}/bin
+%{_libdir}/%{name}/lib/*.so.*
+%{_libdir}/%{name}/bin/*
+%config %{_sysconfdir}/%{name}-%{_arch}/
+%dir %{python_sitearch}/%{name}
+%dir %{_mandir}/%{name}
+%doc %{_mandir}/%{name}/man1/
+%{_sysconfdir}/modulefiles/mpi/
+%{_sysconfdir}/modulefiles/%{name}-%{_arch}
+
+%files autoload
+%{_sysconfdir}/profile.d/mpich-%{_arch}.*
+
+%files devel
+%{_includedir}/%{name}-%{_arch}/
+##%{_fmoddir}/%{name}/
+%{_libdir}/%{name}/lib/*.so
+%{_libdir}/pkgconfig/%{name}.pc
+%{_libdir}/pkgconfig/openpa.pc
+%config %{_sysconfdir}/rpm/macros.%{name}
+
+%files doc
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/doc/
+%{_mandir}/%{name}/man3/
+
+%changelog
+* Thu Jul 18 2013 Deji Akingunola <dakingun at gmail.com> - 3.0.4-2
+- Fix some of the rpmlint warnings from package review (BZ #973493)
+
+* Wed Jun 12 2013 Deji Akingunola <dakingun at gmail.com> - 3.0.4-1
+- Update to 3.0.4
+
+* Thu Feb 21 2013 Deji Akingunola <dakingun at gmail.com> - 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 <rel-eng at lists.fedoraproject.org> - 1.5-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Thu Nov 1 2012 Orion Poplawski <orion at cora.nwra.com> - 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 <orion at cora.nwra.com> - 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 <rel-eng at lists.fedoraproject.org> - 1.4.1p1-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Wed Feb 15 2012 Peter Robinson <pbrobinson at fedoraproject.org> - 1.4.1p1-7
+- Rebuild for new hwloc
+
+* Wed Feb 15 2012 Peter Robinson <pbrobinson at fedoraproject.org> - 1.4.1p1-6
+- Update ARM build configuration
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.1p1-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Mon Jan 2 2012 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1.4.1p1-4
+- Bump spec.
+
+* Wed Nov 16 2011 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1.4.1p1-3
+- Comply to MPI guidelines by separating autoloading into separate package
+ (BZ #647147).
+
+* Tue Oct 18 2011 Deji Akingunola <dakingun at gmail.com> - 1.4.1p1-2
+- Rebuild for hwloc soname bump.
+
+* Sun Sep 11 2011 Deji Akingunola <dakingun at gmail.com> - 1.4.1p1-1
+- Update to 1.4.1p1 patch update
+- Add enable-lib-depend to configure flags
+
+* Sat Aug 27 2011 Deji Akingunola <dakingun at gmail.com> - 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 <jussilehtola at fedoraproject.org> - 1.4-2
+- Respect environment module guidelines wrt placement of module file.
+
+* Fri Jun 17 2011 Deji Akingunola <dakingun at gmail.com> - 1.4-1
+- Update to 1.4 final
diff --git a/sources b/sources
index e69de29..73a95ad 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+9c5d5d4fe1e17dd12153f40bc5b6dbc0 mpich-3.0.4.tar.gz
More information about the scm-commits
mailing list