[scalapack/el6] el conditionalized build
Tom Callaway
spot at fedoraproject.org
Tue Mar 5 18:29:14 UTC 2013
commit ae5d5e72c4b587bc12b62ac2e3221c60f7530cb5
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue Mar 5 13:32:18 2013 -0500
el conditionalized build
scalapack.spec | 155 +++++++++++++++++++++++++++++++++-----------------------
1 files changed, 92 insertions(+), 63 deletions(-)
---
diff --git a/scalapack.spec b/scalapack.spec
index 882f218..a1bc4a7 100644
--- a/scalapack.spec
+++ b/scalapack.spec
@@ -1,24 +1,7 @@
-# The blacs packages should probably provide these.
-%global _blacs_openmpi_load \
- . /etc/profile.d/modules.sh; \
- module load blacs-openmpi-%{_arch}; \
- export CFLAGS="$CFLAGS %{optflags}";
-%global _blacs_openmpi_unload \
- . /etc/profile.d/modules.sh; \
- module unload blacs-openmpi-%{_arch};
-
-%global _blacs_mpich2_load \
- . /etc/profile.d/modules.sh; \
- module load blacs-mpich2-%{_arch}; \
- export CFLAGS="$CFLAGS %{optflags}";
-%global _blacs_mpich2_unload \
- . /etc/profile.d/modules.sh; \
- module unload blacs-mpich2-%{_arch};
-
-Summary: A subset of LAPACK routines redesigned for heterogenous computing
+Summary: A subset of LAPACK routines redesigned for heterogeneous computing
Name: scalapack
Version: 1.7.5
-Release: 10%{?dist}
+Release: 17%{?dist}.1
# This is freely distributable without any restrictions.
License: Public Domain
Group: Development/Libraries
@@ -26,17 +9,36 @@ URL: http://www.netlib.org/lapack-dev/
Source0: http://www.netlib.org/scalapack/scalapack-%{version}.tgz
BuildRequires: lapack-devel, blas-devel
BuildRequires: gcc-gfortran, glibc-devel
-BuildRequires: blacs-mpich2-devel, mpich2-devel-static
-BuildRequires: blacs-openmpi-devel, openmpi-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: scalapack-1.7-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
+ %bcond_with openmpi
+%else
+ %bcond_without openmpi
+%endif
+
+%if %{with mpich2}
+BuildRequires: blacs-mpich2-devel, mpich2-devel
+%endif
+%if %{with openmpi}
+BuildRequires: blacs-openmpi-devel, openmpi-devel
+%endif
+
%description
The ScaLAPACK (or Scalable LAPACK) library includes a subset
of LAPACK routines redesigned for distributed memory MIMD
parallel computers. It is currently written in a
Single-Program-Multiple-Data style using explicit message
-passing for interprocessor communication. It assumes
+passing for inter-processor communication. It assumes
matrices are laid out in a two-dimensional block cyclic
decomposition.
@@ -53,7 +55,7 @@ blocks of the ScaLAPACK library are distributed memory versions (PBLAS)
of the Level 1, 2 and 3 BLAS, and a set of Basic Linear Algebra
Communication Subprograms (BLACS) for communication tasks that arise
frequently in parallel linear algebra computations. In the ScaLAPACK
-routines, all interprocessor communication occurs within the PBLAS and the
+routines, all inter-processor communication occurs within the PBLAS and the
BLACS. One of the design goals of ScaLAPACK was to have the ScaLAPACK
routines resemble their LAPACK equivalents as much as possible.
@@ -66,7 +68,7 @@ The ScaLAPACK (or Scalable LAPACK) library includes a subset
of LAPACK routines redesigned for distributed memory MIMD
parallel computers. It is currently written in a
Single-Program-Multiple-Data style using explicit message
-passing for interprocessor communication. It assumes
+passing for inter-processor communication. It assumes
matrices are laid out in a two-dimensional block cyclic
decomposition.
@@ -83,17 +85,21 @@ blocks of the ScaLAPACK library are distributed memory versions (PBLAS)
of the Level 1, 2 and 3 BLAS, and a set of Basic Linear Algebra
Communication Subprograms (BLACS) for communication tasks that arise
frequently in parallel linear algebra computations. In the ScaLAPACK
-routines, all interprocessor communication occurs within the PBLAS and the
+routines, all inter-processor communication occurs within the PBLAS and the
BLACS. One of the design goals of ScaLAPACK was to have the ScaLAPACK
routines resemble their LAPACK equivalents as much as possible.
-This package contains common files which are not specific to any MPI implementation.
+This package contains common files which are not specific
+to any MPI implementation.
+%if %{with mpich2}
%package mpich2
Summary: ScaLAPACK libraries compiled against mpich2
Group: Development/Libraries
Requires: %{name}-common = %{version}-%{release}
-Requires: environment-modules
+# For dir ownership
+Requires: mpich2
+
# This is a lie, but something needs to obsolete it.
Provides: %{name}-lam = %{version}-%{release}
Obsoletes: %{name}-lam <= 1.7.5-7
@@ -103,7 +109,7 @@ The ScaLAPACK (or Scalable LAPACK) library includes a subset
of LAPACK routines redesigned for distributed memory MIMD
parallel computers. It is currently written in a
Single-Program-Multiple-Data style using explicit message
-passing for interprocessor communication. It assumes
+passing for inter-processor communication. It assumes
matrices are laid out in a two-dimensional block cyclic
decomposition.
@@ -120,11 +126,11 @@ blocks of the ScaLAPACK library are distributed memory versions (PBLAS)
of the Level 1, 2 and 3 BLAS, and a set of Basic Linear Algebra
Communication Subprograms (BLACS) for communication tasks that arise
frequently in parallel linear algebra computations. In the ScaLAPACK
-routines, all interprocessor communication occurs within the PBLAS and the
+routines, all inter-processor communication occurs within the PBLAS and the
BLACS. One of the design goals of ScaLAPACK was to have the ScaLAPACK
routines resemble their LAPACK equivalents as much as possible.
-This package contains ScaLAPACK libraries compiled with mpich2.
+This package contains ScaLAPACK libraries compiled with mpich2.
%package mpich2-devel
Summary: Development libraries for ScaLAPACK (mpich2)
@@ -145,19 +151,22 @@ Requires: %{name}-mpich2-devel = %{version}-%{release}
%description mpich2-static
This package contains static libraries for ScaLAPACK, compiled against mpich2.
+%endif
+%if %{with openmpi}
%package openmpi
Summary: ScaLAPACK libraries compiled against openmpi
Group: Development/Libraries
Requires: %{name}-common = %{version}-%{release}
-Requires: environment-modules
+# For dir ownership
+Requires: openmpi
%description openmpi
The ScaLAPACK (or Scalable LAPACK) library includes a subset
of LAPACK routines redesigned for distributed memory MIMD
parallel computers. It is currently written in a
Single-Program-Multiple-Data style using explicit message
-passing for interprocessor communication. It assumes
+passing for inter-processor communication. It assumes
matrices are laid out in a two-dimensional block cyclic
decomposition.
@@ -174,11 +183,11 @@ blocks of the ScaLAPACK library are distributed memory versions (PBLAS)
of the Level 1, 2 and 3 BLAS, and a set of Basic Linear Algebra
Communication Subprograms (BLACS) for communication tasks that arise
frequently in parallel linear algebra computations. In the ScaLAPACK
-routines, all interprocessor communication occurs within the PBLAS and the
+routines, all inter-processor communication occurs within the PBLAS and the
BLACS. One of the design goals of ScaLAPACK was to have the ScaLAPACK
routines resemble their LAPACK equivalents as much as possible.
-This package contains ScaLAPACK libraries compiled with openmpi.
+This package contains ScaLAPACK libraries compiled with openmpi.
%package openmpi-devel
Summary: Development libraries for ScaLAPACK (openmpi)
@@ -195,6 +204,7 @@ Requires: %{name}-openmpi-devel = %{version}-%{release}
%description openmpi-static
This package contains static libraries for ScaLAPACK, compiled against openmpi.
+%endif
%prep
%setup -q -c -n %{name}-%{version}
@@ -202,7 +212,7 @@ This package contains static libraries for ScaLAPACK, compiled against openmpi.
cd %{name}-%{version}/
sed -i 's!BLACSdir =.*!BLACSdir = %{_libdir}!' SLmake.inc
cd ..
-for i in mpich2 openmpi; do
+for i in %{?with_mpich2:mpich2} %{?with_openmpi:openmpi}; do
cp -a %{name}-%{version} %{name}-%{version}-$i
sed -i "s|FOO|$i|g" %{name}-%{version}-$i/SLmake.inc
done
@@ -213,50 +223,40 @@ cd %{name}-%{version}-$MPI_COMPILER_NAME ; \
make lib ; \
cd ..
+%if %{with mpich2}
# Build mpich2 version
export MPI_COMPILER_NAME=mpich2
%{_mpich2_load}
-%{_blacs_mpich2_load}
RPM_OPT_FLAGS=`echo $CFLAGS`
%dobuild
-%{_blacs_mpich2_unload}
%{_mpich2_unload}
+%endif
+%if %{with openmpi}
# Build OpenMPI version
export MPI_COMPILER_NAME=openmpi
%{_openmpi_load}
-%{_blacs_openmpi_load}
RPM_OPT_FLAGS=`echo $CFLAGS`
%dobuild
-%{_blacs_openmpi_unload}
%{_openmpi_unload}
+%endif
%install
rm -fr ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
-for i in mpich2 openmpi; do
- mkdir -p %{buildroot}%{_libdir}/scalapack-$i/
+for i in %{?with_mpich2:mpich2} %{?with_openmpi:openmpi}; do
+ mkdir -p %{buildroot}%{_libdir}/$i/lib/
pushd %{name}-%{version}-$i
for f in *.a *.so*; do
- cp -f $f %{buildroot}%{_libdir}/scalapack-$i/$f
+ cp -f $f %{buildroot}%{_libdir}/$i/lib/$f
done
popd
- pushd %{buildroot}%{_libdir}/scalapack-$i/
+ pushd %{buildroot}%{_libdir}/$i/lib/
ln -fs libscalapack.so.1.0.0 libscalapack.so.1
ln -s libscalapack.so.1.0.0 libscalapack.so
popd
-# Generate environment module file
-mkdir -p %{buildroot}%{_datadir}/Modules/modulefiles/
-cat << EOF > %{buildroot}%{_datadir}/Modules/modulefiles/scalapack-$i-%{_arch}
-#%Module 1.0
-#
-# Blacs libraries compiled with $i support
-#
-prepend-path LD_LIBRARY_PATH %{_libdir}/scalapack-$i
-setenv LDFLAGS -L%{_libdir}/scalapack-$i
-EOF
done
# Copy docs
@@ -274,35 +274,64 @@ rm -fr ${RPM_BUILD_ROOT}
%doc scalapack_install.ps README
# %{_bindir}/x*
+%if %{with mpich2}
%files mpich2
%defattr(-,root,root,-)
-%dir %{_libdir}/scalapack-mpich2/
-%{_datadir}/Modules/modulefiles/scalapack-mpich2-%{_arch}
-%{_libdir}/scalapack-mpich2/libscalapack.so.*
+%{_libdir}/mpich2/lib/libscalapack.so.*
%files mpich2-devel
%defattr(-,root,root,-)
-%{_libdir}/scalapack-mpich2/libscalapack.so
+%{_libdir}/mpich2/lib/libscalapack.so
%files mpich2-static
%defattr(-,root,root,-)
-%{_libdir}/scalapack-mpich2/libscalapack.a
+%{_libdir}/mpich2/lib/libscalapack.a
+%endif
+%if %{with openmpi}
%files openmpi
%defattr(-,root,root,-)
-%dir %{_libdir}/scalapack-openmpi/
-%{_datadir}/Modules/modulefiles/scalapack-openmpi-%{_arch}
-%{_libdir}/scalapack-openmpi/libscalapack.so.*
+%{_libdir}/openmpi/lib/libscalapack.so.*
%files openmpi-devel
%defattr(-,root,root,-)
-%{_libdir}/scalapack-openmpi/libscalapack.so
+%{_libdir}/openmpi/lib/libscalapack.so
%files openmpi-static
%defattr(-,root,root,-)
-%{_libdir}/scalapack-openmpi/libscalapack.a
+%{_libdir}/openmpi/lib/libscalapack.a
+%endif
%changelog
+* Tue Mar 5 2013 Tom Callaway <spot at fedoraproject.org> - 1.7.5-17.1
+- add EL conditionalization
+
+* Thu Nov 15 2012 Tom Callaway <spot at fedoraproject.org> - 1.7.5-17
+- rebuild for new mpich2
+
+* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.7.5-16
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.7.5-15
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Wed Aug 03 2011 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1.7.5-14
+- Bump spec.
+
+* Wed Aug 03 2011 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1.7.5-13
+- Honor MPI guidelines wrt placement of libraries.
+- Drop unnecessary module file.
+- A few rpmlint fixes.
+
+* Tue Mar 29 2011 Deji Akingunola <dakingun at gmail.com> - 1.7.5-12
+- Rebuild for mpich2 soname bump
+
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.7.5-12
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Tue Oct 19 2010 Deji Akingunola <dakingun at gmail.com> - 1.7.5-11
+- Rebuild for both mpich2 and openmpi updates
+
* Wed Jul 7 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 1.7.5-10
- Move all BuildRequires to the top of the spec file
- -static packages now Require matching -devel package, they're not very useful otherwise
More information about the scm-commits
mailing list