rpms/scalapack/devel scalapack-1.7-fedora.patch, 1.9, 1.10 scalapack.spec, 1.25, 1.26
Tom Callaway
spot at fedoraproject.org
Fri Aug 7 02:42:11 UTC 2009
Author: spot
Update of /cvs/pkgs/rpms/scalapack/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29363
Modified Files:
scalapack-1.7-fedora.patch scalapack.spec
Log Message:
update for new MPI
scalapack-1.7-fedora.patch:
scalapack-1.7.5/scalapack-1.7.5/SLmake.inc | 31 ++++++++++++++---------------
scalapack-1.7/scalapack-1.7.5/Makefile | 5 +++-
2 files changed, 20 insertions(+), 16 deletions(-)
Index: scalapack-1.7-fedora.patch
===================================================================
RCS file: /cvs/pkgs/rpms/scalapack/devel/scalapack-1.7-fedora.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- scalapack-1.7-fedora.patch 23 Sep 2008 17:59:13 -0000 1.9
+++ scalapack-1.7-fedora.patch 7 Aug 2009 02:42:10 -0000 1.10
@@ -15,7 +15,7 @@
( cd $(REDISTdir)/SRC; $(MAKE) clean )
+
+shared: scalapacklib
-+ ( mkdir tmp ; cp $(SCALAPACKLIB) tmp ; cd tmp ; ar x $(SCALAPACKLIB) ; gcc -shared -o $(home)/libscalapack.so.1.0.0 *.o -Wl,-soname=libscalapack.so.1 ; cd .. )
++ ( mkdir tmp ; cp $(SCALAPACKLIB) tmp ; cd tmp ; ar x $(SCALAPACKLIB) ; $(CC) -shared -o $(home)/libscalapack.so.1.0.0 *.o -Wl,-soname=libscalapack.so.1 ; cd .. )
--- scalapack-1.7.5/scalapack-1.7.5/SLmake.inc.fedora 2001-08-08 21:59:50.000000000 -0500
+++ scalapack-1.7.5/scalapack-1.7.5/SLmake.inc 2006-03-08 18:09:05.000000000 -0600
@@ -19,7 +19,7 @@
@@ -23,7 +23,7 @@
# $(HOME)/SCALAPACK
#
-home = $(HOME)/SCALAPACK
-+home = $(RPM_BUILD_DIR)/scalapack-1.7.5/scalapack-1.7.5
++home = $(RPM_BUILD_DIR)/scalapack-1.7.5/scalapack-1.7.5-FOO
#
# The platform identifier to suffix to the end of library names
#
Index: scalapack.spec
===================================================================
RCS file: /cvs/pkgs/rpms/scalapack/devel/scalapack.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- scalapack.spec 27 Jul 2009 03:51:18 -0000 1.25
+++ scalapack.spec 7 Aug 2009 02:42:10 -0000 1.26
@@ -1,13 +1,63 @@
+# These macros will go away soon. Hopefully.
+%global _openmpi_load \
+ . /etc/profile.d/modules.sh; \
+ module load openmpi-%{_arch}; \
+ export CFLAGS="$CFLAGS %{optflags}";
+%global _openmpi_unload \
+ . /etc/profile.d/modules.sh; \
+ module unload openmpi-%{_arch};
+
+%global _lam_load \
+ . /etc/profile.d/modules.sh; \
+ module load lam-%{_arch}; \
+ export CFLAGS="$CFLAGS %{optflags}";
+%global _lam_unload \
+ . /etc/profile.d/modules.sh; \
+ module unload lam-%{_arch};
+
+%global _mpich2_load \
+ . /etc/profile.d/modules.sh; \
+ module load mpich2-%{__isa_bits}; \
+ export CFLAGS="$CFLAGS %{optflags}";
+%global _mpich2_unload \
+ . /etc/profile.d/modules.sh; \
+ module unload mpich2-%{__isa_bits};
+
+# 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_lam_load \
+ . /etc/profile.d/modules.sh; \
+ module load blacs-lam-%{_arch}; \
+ export CFLAGS="$CFLAGS %{optflags}";
+%global _blacs_lam_unload \
+ . /etc/profile.d/modules.sh; \
+ module unload blacs-lam-%{_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
Name: scalapack
Version: 1.7.5
-Release: 6%{?dist}
+Release: 7%{?dist}
# This is freely distributable without any restrictions.
License: Public Domain
Group: Development/Libraries
URL: http://www.netlib.org/lapack-dev/
Source0: http://www.netlib.org/scalapack/scalapack-%{version}.tgz
-BuildRequires: lapack-devel, blas-devel, openmpi-devel, blacs-devel
+BuildRequires: lapack-devel, blas-devel
BuildRequires: gcc-gfortran, glibc-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: scalapack-1.7-fedora.patch
@@ -38,61 +88,294 @@ routines, all interprocessor communicati
BLACS. One of the design goals of ScaLAPACK was to have the ScaLAPACK
routines resemble their LAPACK equivalents as much as possible.
-%package devel
-Summary: Development libraries for scalapack
+%package common
+Summary: Common files for scalapack
+Group: Development/Libraries
+
+%description common
+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
+matrices are laid out in a two-dimensional block cyclic
+decomposition.
+
+ScaLAPACK is designed for heterogeneous computing and is
+portable on any computer that supports MPI or PVM.
+
+Like LAPACK, the ScaLAPACK routines are based on
+block-partitioned algorithms in order to minimize the frequency
+of data movement between different levels of the memory hierarchy.
+(For such machines, the memory hierarchy includes the off-processor
+memory of other processors, in addition to the hierarchy of registers,
+cache, and local memory on each processor.) The fundamental building
+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
+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.
+
+%package lam
+Summary: ScaLAPACK libraries compiled against lam
+Group: Development/Libraries
+BuildRequires: blacs-lam-devel, lam-devel
+Requires: %{name}-common = %{version}-%{release}
+Requires: environment-modules
+
+%description lam
+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
+matrices are laid out in a two-dimensional block cyclic
+decomposition.
+
+ScaLAPACK is designed for heterogeneous computing and is
+portable on any computer that supports MPI or PVM.
+
+Like LAPACK, the ScaLAPACK routines are based on
+block-partitioned algorithms in order to minimize the frequency
+of data movement between different levels of the memory hierarchy.
+(For such machines, the memory hierarchy includes the off-processor
+memory of other processors, in addition to the hierarchy of registers,
+cache, and local memory on each processor.) The fundamental building
+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
+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 lam.
+
+%package lam-devel
+Summary: Development libraries for ScaLAPACK (lam)
+Group: Development/Libraries
+Requires: %{name}-lam = %{version}-%{release}
+Provides: %{name}-lam-static = %{version}-%{release}
+
+%description lam-devel
+This package contains development libraries for ScaLAPACK, compiled against lam.
+
+%package mpich2
+Summary: ScaLAPACK libraries compiled against mpich2
+Group: Development/Libraries
+BuildRequires: blacs-mpich2-devel, mpich2-devel
+Requires: %{name}-common = %{version}-%{release}
+Requires: environment-modules
+
+%description mpich2
+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
+matrices are laid out in a two-dimensional block cyclic
+decomposition.
+
+ScaLAPACK is designed for heterogeneous computing and is
+portable on any computer that supports MPI or PVM.
+
+Like LAPACK, the ScaLAPACK routines are based on
+block-partitioned algorithms in order to minimize the frequency
+of data movement between different levels of the memory hierarchy.
+(For such machines, the memory hierarchy includes the off-processor
+memory of other processors, in addition to the hierarchy of registers,
+cache, and local memory on each processor.) The fundamental building
+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
+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.
+
+%package mpich2-devel
+Summary: Development libraries for ScaLAPACK (mpich2)
+Group: Development/Libraries
+Requires: %{name}-mpich2 = %{version}-%{release}
+Provides: %{name}-mpich2-static = %{version}-%{release}
+
+%description mpich2-devel
+This package contains development libraries for ScaLAPACK, compiled against mpich2.
+
+%package openmpi
+Summary: ScaLAPACK libraries compiled against openmpi
+Group: Development/Libraries
+BuildRequires: blacs-openmpi-devel, openmpi-devel
+Requires: %{name}-common = %{version}-%{release}
+Requires: environment-modules
+
+%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
+matrices are laid out in a two-dimensional block cyclic
+decomposition.
+
+ScaLAPACK is designed for heterogeneous computing and is
+portable on any computer that supports MPI or PVM.
+
+Like LAPACK, the ScaLAPACK routines are based on
+block-partitioned algorithms in order to minimize the frequency
+of data movement between different levels of the memory hierarchy.
+(For such machines, the memory hierarchy includes the off-processor
+memory of other processors, in addition to the hierarchy of registers,
+cache, and local memory on each processor.) The fundamental building
+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
+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.
+
+%package openmpi-devel
+Summary: Development libraries for ScaLAPACK (openmpi)
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-openmpi = %{version}-%{release}
+Provides: %{name}-openmpi-static = %{version}-%{release}
-%description devel
-This package contains development libraries for scalapack.
+%description openmpi-devel
+This package contains development libraries for ScaLAPACK, compiled against openmpi.
%prep
%setup -q -c -n %{name}-%{version}
%patch0 -p1
cd %{name}-%{version}/
sed -i 's!BLACSdir =.*!BLACSdir = %{_libdir}!' SLmake.inc
+cd ..
+for i in lam mpich2 openmpi; do
+ cp -a %{name}-%{version} %{name}-%{version}-$i
+ sed -i "s|FOO|$i|g" %{name}-%{version}-$i/SLmake.inc
+done
%build
-cd %{name}-%{version}
-make lib
-make exe
+%define dobuild() \
+cd %{name}-%{version}-$MPI_COMPILER ; \
+make lib ; \
+cd ..
+
+# Build LAM version
+export MPI_COMPILER=lam
+%{_lam_load}
+%{_blacs_lam_load}
+RPM_OPT_FLAGS=`echo $CFLAGS`
+%dobuild
+%{_blacs_lam_unload}
+%{_lam_unload}
+
+# Build mpich2 version
+export MPI_COMPILER=mpich2
+%{_mpich2_load}
+%{_blacs_mpich2_load}
+RPM_OPT_FLAGS=`echo $CFLAGS`
+%dobuild
+%{_blacs_mpich2_unload}
+%{_mpich2_unload}
+
+# Build OpenMPI version
+export MPI_COMPILER=openmpi
+%{_openmpi_load}
+%{_blacs_openmpi_load}
+RPM_OPT_FLAGS=`echo $CFLAGS`
+%dobuild
+%{_blacs_openmpi_unload}
+%{_openmpi_unload}
%install
rm -fr ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
+for i in lam mpich2 openmpi; do
+ mkdir -p %{buildroot}%{_libdir}/scalapack-$i/
+ pushd %{name}-%{version}-$i
+ for f in *.a *.so*; do
+ cp -f $f %{buildroot}%{_libdir}/scalapack-$i/$f
+ done
+ popd
+ pushd %{buildroot}%{_libdir}/scalapack-$i/
+ 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
cd %{name}-%{version}
cp -f INSTALL/scalapack_install.ps ../
cp -f README ../
-cp -f libscalapack.a ${RPM_BUILD_ROOT}%{_libdir}
-cp -f libscalapack.so* ${RPM_BUILD_ROOT}%{_libdir}
-cp -f TESTING/x* ${RPM_BUILD_ROOT}%{_bindir}
-
-cd ${RPM_BUILD_ROOT}%{_libdir}
-ln -fs libscalapack.so.1.0.0 libscalapack.so.1
-ln -s libscalapack.so.1.0.0 libscalapack.so
-cd ..
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
+#cp -f TESTING/x* ${RPM_BUILD_ROOT}%{_bindir}
%clean
rm -fr ${RPM_BUILD_ROOT}
-%files
-%defattr(-,root,root)
+%files common
+%defattr(-,root,root,-)
%doc scalapack_install.ps README
-%{_bindir}/x*
-%{_libdir}/libscalapack.so.*
+# %{_bindir}/x*
-%files devel
-%defattr(-,root,root)
-%{_libdir}/libscalapack.a
-%{_libdir}/libscalapack.so
+%files lam
+%defattr(-,root,root,-)
+%dir %{_libdir}/scalapack-lam/
+%{_datadir}/Modules/modulefiles/scalapack-lam-%{_arch}
+%{_libdir}/scalapack-lam/libscalapack.so.*
+
+%files lam-devel
+%defattr(-,root,root,-)
+%{_libdir}/scalapack-lam/libscalapack.a
+%{_libdir}/scalapack-lam/libscalapack.so
+
+%files mpich2
+%defattr(-,root,root,-)
+%dir %{_libdir}/scalapack-mpich2/
+%{_datadir}/Modules/modulefiles/scalapack-mpich2-%{_arch}
+%{_libdir}/scalapack-mpich2/libscalapack.so.*
+
+%files mpich2-devel
+%defattr(-,root,root,-)
+%{_libdir}/scalapack-mpich2/libscalapack.a
+%{_libdir}/scalapack-mpich2/libscalapack.so
+
+%files openmpi
+%defattr(-,root,root,-)
+%dir %{_libdir}/scalapack-openmpi/
+%{_datadir}/Modules/modulefiles/scalapack-openmpi-%{_arch}
+%{_libdir}/scalapack-openmpi/libscalapack.so.*
+
+%files openmpi-devel
+%defattr(-,root,root,-)
+%{_libdir}/scalapack-openmpi/libscalapack.a
+%{_libdir}/scalapack-openmpi/libscalapack.so
%changelog
+* Thu Aug 6 2009 Tom "spot" Callaway <tcallawa at redhat.com> - 1.7.5-7
+- rework package to handle all supported MPI environments in Fedora
+
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.7.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the scm-commits
mailing list