[scalapack/f16] build fixed scalapack

Tom Callaway spot at fedoraproject.org
Wed Nov 9 21:44:49 UTC 2011


commit 7a99025de92ae006ffb00c294ce708abfe06dff2
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Wed Nov 9 16:44:46 2011 -0500

    build fixed scalapack

 scalapack.spec |   95 +++++++++++++++++++++----------------------------------
 1 files changed, 36 insertions(+), 59 deletions(-)
---
diff --git a/scalapack.spec b/scalapack.spec
index 94029b8..01e9d73 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: 13%{?dist}
+Release: 14%{?dist}
 # This is freely distributable without any restrictions.
 License: Public Domain
 Group: Development/Libraries
@@ -36,7 +19,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.
 
@@ -53,7 +36,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 +49,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 +66,20 @@ 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.
 
 %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 +89,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 +106,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)
@@ -150,14 +136,15 @@ This package contains static libraries for ScaLAPACK, compiled against mpich2.
 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 +161,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)
@@ -216,19 +203,15 @@ cd ..
 # Build mpich2 version
 export MPI_COMPILER_NAME=mpich2
 %{_mpich2_load}
-%{_blacs_mpich2_load}
 RPM_OPT_FLAGS=`echo $CFLAGS`
 %dobuild
-%{_blacs_mpich2_unload}
 %{_mpich2_unload}
 
 # Build OpenMPI version
 export MPI_COMPILER_NAME=openmpi
 %{_openmpi_load}
-%{_blacs_openmpi_load}
 RPM_OPT_FLAGS=`echo $CFLAGS`
 %dobuild
-%{_blacs_openmpi_unload}
 %{_openmpi_unload}
 
 %install
@@ -237,26 +220,16 @@ mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
 mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
 
 for i in mpich2 openmpi; do
-  mkdir -p %{buildroot}%{_libdir}/scalapack-$i/
+  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
@@ -276,33 +249,37 @@ rm -fr ${RPM_BUILD_ROOT}
 
 %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
 
 %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
 
 %changelog
+* 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
 


More information about the scm-commits mailing list