[mpi4py/el6] conditionalize mpich2 support, there is no mpich2 on el6-ppc64
tomspur
tomspur at fedoraproject.org
Sat Aug 4 18:11:10 UTC 2012
commit b48bd1efcef249607029f3a8038d09c2ed11ef30
Author: Thomas Spura <thomas.spura at gmail.com>
Date: Sat Aug 4 20:10:04 2012 +0200
conditionalize mpich2 support, there is no mpich2 on el6-ppc64
Signed-off-by: Thomas Spura <thomas.spura at gmail.com>
mpi4py.spec | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/mpi4py.spec b/mpi4py.spec
index cb08754..8d451a2 100644
--- a/mpi4py.spec
+++ b/mpi4py.spec
@@ -15,6 +15,13 @@
%filter_setup
}
+%global with_mpich2 1
+%if 0%{?rhel}
+%ifarch ppc64
+%global with_mpich2 0
+%endif
+%endif
+
### TESTSUITE ###
# The testsuite currently fails only on the buildsystem, but works localy.
# So to easy enable/disable the testsuite, I introduce the following
@@ -27,7 +34,7 @@
Name: mpi4py
Version: 1.3
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Python bindings of the Message Passing Interface (MPI)
Group: Development/Languages
@@ -97,6 +104,7 @@ objects).
This package contains %{name} compiled against Open MPI.
+%if %{with_mpich2}
%package -n python3-mpi4py-mpich2
BuildRequires: mpich2-devel
Requires: mpich2
@@ -113,6 +121,7 @@ single-segment buffer interface (NumPy arrays, built-in bytes/string/array
objects).
This package contains %{name} compiled against MPICH2.
+%endif
%endif # with_python3
%package common
@@ -142,6 +151,7 @@ objects).
This package contains %{name} compiled against Open MPI.
+%if %{with_mpich2}
%package mpich2
BuildRequires: mpich2-devel
Requires: mpich2
@@ -159,6 +169,7 @@ single-segment buffer interface (NumPy arrays, built-in bytes/string/array
objects).
This package contains %{name} compiled against MPICH2.
+%endif
%prep
@@ -189,11 +200,13 @@ CFLAGS="%{optflags}" %{__python} setup.py build
mv build openmpi
%{_openmpi_unload}
+%if %{with_mpich2}
# Build mpich2 version
%{_mpich2_load}
CFLAGS="%{optflags}" %{__python} setup.py build
mv build mpich2
%{_mpich2_unload}
+%endif
%if 0%{?with_python3}
pushd %{py3dir}
@@ -207,11 +220,13 @@ CFLAGS="%{optflags}" %{__python3} setup.py build
mv build openmpi
%{_openmpi_unload}
+%if %{with_mpich2}
# Build mpich2 version
%{_mpich2_load}
CFLAGS="%{optflags}" %{__python3} setup.py build
mv build mpich2
%{_mpich2_unload}
+%endif
popd
%endif
@@ -228,6 +243,7 @@ mv %{buildroot}%{python_sitearch}/%{name}/ %{buildroot}%{python_sitearch}/%{name
mv build openmpi
%{_openmpi_unload}
+%if %{with_mpich2}
# Install MPICH2 version
%{_mpich2_load}
mv mpich2 build
@@ -236,6 +252,7 @@ mkdir -p %{buildroot}%{python_sitearch}/mpich2
mv %{buildroot}%{python_sitearch}/%{name}/ %{buildroot}%{python_sitearch}/%{name}*.egg-info %{buildroot}%{python_sitearch}/mpich2
mv build mpich2
%{_mpich2_unload}
+%endif
%if 0%{?with_python3}
@@ -249,6 +266,7 @@ mv %{buildroot}%{python3_sitearch}/%{name}/ %{buildroot}%{python3_sitearch}/%{na
mv build openmpi
%{_openmpi_unload}
+%if %{with_mpich2}
# Install MPICH2 version
%{_mpich2_load}
mv mpich2 build
@@ -257,6 +275,7 @@ mkdir -p %{buildroot}%{python3_sitearch}/mpich2
mv %{buildroot}%{python3_sitearch}/%{name}/ %{buildroot}%{python3_sitearch}/%{name}*.egg-info %{buildroot}%{python3_sitearch}/mpich2
mv build mpich2
%{_mpich2_unload}
+%endif
popd
%endif
@@ -277,6 +296,7 @@ PYTHONPATH=%{buildroot}%{python_sitearch}/openmpi \
# test mpd?
%if 0%{?MPD}
+%if %{with_mpich2}
%{_mpich2_load}
# create mpd.conf
@@ -300,6 +320,7 @@ PYTHONPATH=%{buildroot}%{python_sitearch}/mpich2 \
%{_mpich2_unload}
%endif
+%endif
%if 0%{?with_python3}
# test openmpi?
@@ -316,6 +337,7 @@ PYTHONPATH=%{buildroot}%{python3_sitearch}/openmpi \
# test mpd?
%if 0%{?MPD}
+%if %{with_mpich2}
%{_mpich2_load}
# create mpd.conf
@@ -337,6 +359,7 @@ PYTHONPATH=%{buildroot}%{python3_sitearch}/mpich2 \
#unset MPD_CONF_FILE
%{_mpich2_unload}
+%endif
%endif # mpd disable
%endif # with_python3
@@ -353,10 +376,12 @@ rm -rf %{buildroot}
%{python_sitearch}/openmpi/%{name}-%{version}-py?.?.egg-info
%{python_sitearch}/openmpi/%{name}
+%if %{with_mpich2}
%files mpich2
%defattr(-,root,root,-)
%{python_sitearch}/mpich2/%{name}-%{version}-py?.?.egg-info
%{python_sitearch}/mpich2/%{name}
+%endif
%if 0%{?with_python3}
%files -n python3-mpi4py-openmpi
@@ -364,11 +389,13 @@ rm -rf %{buildroot}
%{python3_sitearch}/openmpi/%{name}-%{version}-py?.?.egg-info
%{python3_sitearch}/openmpi/%{name}
+%if %{with_mpich2}
%files -n python3-mpi4py-mpich2
%defattr(-,root,root,-)
%{python3_sitearch}/mpich2/%{name}-%{version}-py?.?.egg-info
%{python3_sitearch}/mpich2/%{name}
%endif
+%endif # with_python3
%files docs
%defattr(-,root,root,-)
@@ -376,6 +403,9 @@ rm -rf %{buildroot}
%changelog
+* Sat Aug 4 2012 Thomas Spura <tomspur at fedoraproject.org> - 1.3-5
+- conditionalize mpich2 support, there is no mpich2 on el6-ppc64
+
* Fri Aug 03 2012 David Malcolm <dmalcolm at redhat.com> - 1.3-4
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
More information about the scm-commits
mailing list