[blacs/el6] conditionalize mpich2
Tom Callaway
spot at fedoraproject.org
Tue Mar 5 17:52:16 UTC 2013
commit 8bf6d93e138d67687afdf0bac88eb00c4718bc53
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue Mar 5 12:55:20 2013 -0500
conditionalize mpich2
blacs.spec | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/blacs.spec b/blacs.spec
index d0f9b6c..a2df8a4 100644
--- a/blacs.spec
+++ b/blacs.spec
@@ -15,6 +15,12 @@ Source6: http://www.netlib.org/blacs/cblacsqref.ps
Source7: http://www.netlib.org/blacs/lawn94.ps
BuildRequires: gcc-gfortran
Patch0: blacs-fedora.patch
+%ifarch ppc ppc64 s390 s390x
+ # No mpich2 in RHEL for these arches
+ %bcond_with mpich2
+%else
+ %bcond_without mpich2
+%endif
%ifarch s390 s390x %{arm}
# No OpenMPI support on these arches
@@ -52,6 +58,7 @@ applications both easier to program and more portable.
This file contains common files which are not specific to any MPI implementation.
+%if %{with mpich2}
%package mpich2
Summary: BLACS libraries compiled against mpich2
Group: Development/Libraries
@@ -90,6 +97,7 @@ Group: Development/Libraries
%description mpich2-static
This package contains static libraries for blacs, compiled against mpich2.
+%endif
%if %{with openmpi}
%package openmpi
@@ -131,7 +139,7 @@ This package contains static libraries for blacs, compiled against openmpi.
%prep
%setup -q -c -n %{name}
%patch0 -p1
-for i in mpich2 %{?with_openmpi:openmpi}
+for i in %{?with_mpich2:mpich2} %{?with_openmpi:openmpi}
do
cp -ap BLACS BLACS-$i
cp -fp %{SOURCE1} BLACS-$i/
@@ -161,12 +169,14 @@ cd BLACS-$MPI_COMPILER_NAME; \
make mpi ; \
cd ..
+%if %{with mpich2}
# Build mpich2 version
export MPI_COMPILER_NAME=mpich2
%{_mpich2_load}
RPM_OPT_FLAGS=`echo $CFLAGS`
%dobuild
%{_mpich2_unload}
+%endif
%if %{with openmpi}
# Build OpenMPI version
@@ -184,7 +194,7 @@ RPM_OPT_FLAGS=`echo $CFLAGS`
%install
# mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
-for i in mpich2 %{?with_openmpi:openmpi}
+for i in %{?with_mpich2:mpich2} %{?with_openmpi:openmpi}
do
mkdir -p %{buildroot}%{_libdir}/$i/lib/
mkdir -p %{buildroot}%{_includedir}/$i-%{_arch}/
@@ -217,6 +227,7 @@ rm -fr ${RPM_BUILD_ROOT}
%{_includedir}/blacs/
# %{_bindir}/x*test_MPI-LINUX-0
+%if %{with mpich2}
%files mpich2
%defattr(-,root,root,0755)
%{_libdir}/mpich2/lib/*.so.*
@@ -229,6 +240,7 @@ rm -fr ${RPM_BUILD_ROOT}
%files mpich2-static
%defattr(-,root,root,0755)
%{_libdir}/mpich2/lib/*.a
+%endif
%if %{with openmpi}
%files openmpi
@@ -248,6 +260,7 @@ rm -fr ${RPM_BUILD_ROOT}
%changelog
* Thu Feb 28 2013 Tom Callaway <spot at fedoraproject.org> - 1.1-47.1
- epel one off
+- conditionalize mpich2
* Thu Nov 15 2012 Tom Callaway <spot at fedoraproject.org> - 1.1-47
- rebuild for new mpich2
More information about the scm-commits
mailing list