[scalapack] 2.0.2 with blacs subpackages

Tom Callaway spot at fedoraproject.org
Mon May 12 17:36:54 UTC 2014


commit ca806bb02672f7fb19057136342c6624e660b9a0
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Mon May 12 13:36:39 2014 -0400

    2.0.2 with blacs subpackages

 .gitignore                         |    1 +
 scalapack-2.0.2-fedora.patch       |   83 ++++++++++++++++
 scalapack-2.0.2-shared-blacs.patch |   12 +++
 scalapack.spec                     |  184 +++++++++++++++++++++++++++++------
 sources                            |    2 +-
 5 files changed, 249 insertions(+), 33 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 29f9c7e..b4e938a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 scalapack-1.7.5.tgz
+/scalapack-2.0.2.tgz
diff --git a/scalapack-2.0.2-fedora.patch b/scalapack-2.0.2-fedora.patch
new file mode 100644
index 0000000..2a385a6
--- /dev/null
+++ b/scalapack-2.0.2-fedora.patch
@@ -0,0 +1,83 @@
+diff -up scalapack-2.0.2/scalapack-2.0.2/Makefile.fedora scalapack-2.0.2/scalapack-2.0.2/Makefile
+--- scalapack-2.0.2/scalapack-2.0.2/Makefile.fedora	2014-02-12 11:09:48.585913344 -0500
++++ scalapack-2.0.2/scalapack-2.0.2/Makefile	2014-02-12 11:11:45.726759063 -0500
+@@ -49,7 +49,7 @@ PRECISIONS = single double complex compl
+ 
+ all: lib exe example
+ 
+-lib: blacslib toolslib pblaslib redistlib scalapacklib
++lib: blacslib toolslib pblaslib redistlib scalapacklib shared
+ 
+ exe: blacsexe pblasexe redistexe scalapackexe
+ 
+@@ -107,3 +107,5 @@ cleanlib:
+ cleanexample:
+ 	( cd EXAMPLE; $(MAKE) clean )
+ 
++shared: scalapacklib
++	( mkdir tmp ; cp $(SCALAPACKLIB) tmp ; cd tmp ; ar x $(SCALAPACKLIB) ; $(CC) -shared -o ../libscalapack.so.2.0.0 *.o -Wl,-soname=libscalapack.so.2 ; cd .. )
+diff -up scalapack-2.0.2/scalapack-2.0.2/SLmake.inc.fedora scalapack-2.0.2/scalapack-2.0.2/SLmake.inc
+--- scalapack-2.0.2/scalapack-2.0.2/SLmake.inc.fedora	2014-02-12 11:19:04.618179216 -0500
++++ scalapack-2.0.2/scalapack-2.0.2/SLmake.inc	2014-02-12 11:19:00.675184482 -0500
+@@ -0,0 +1,61 @@
++############################################################################
++#
++#  Program:         ScaLAPACK
++#
++#  Module:          SLmake.inc
++#
++#  Purpose:         Top-level Definitions
++#
++#  Creation date:   February 15, 2000
++#
++#  Modified:        October 13, 2011
++#
++#  Send bug reports, comments or suggestions to scalapack at cs.utk.edu
++#
++############################################################################
++#
++#  C preprocessor definitions:  set CDEFS to one of the following:
++#
++#     -DNoChange (fortran subprogram names are lower case without any suffix)
++#     -DUpCase   (fortran subprogram names are upper case without any suffix)
++#     -DAdd_     (fortran subprogram names are lower case with "_" appended)
++
++CDEFS         = -DAdd_
++
++#
++#  The fortran and C compilers, loaders, and their flags
++#
++
++FC            = mpif90
++CC            = mpicc 
++NOOPT         = -fPIC
++FCFLAGS       = $(RPM_OPT_FLAGS) -fPIC
++CFLAGS        = $(RPM_OPT_FLAGS) -fPIC
++CCFLAGS       = $(RPM_OPT_FLAGS) -fPIC
++FCLOADER      = $(FC)
++CCLOADER      = $(CC)
++FCLOADFLAGS   = $(FCFLAGS)
++CCLOADFLAGS   = $(CCFLAGS)
++
++#
++#  The archiver and the flag(s) to use when building archive (library)
++#  Also the ranlib routine.  If your system has no ranlib, set RANLIB = echo
++#
++
++ARCH          = ar
++ARCHFLAGS     = cr
++RANLIB        = ranlib
++
++#
++#  The name of the ScaLAPACK library to be created
++#
++
++SCALAPACKLIB  = libscalapack.a
++
++#
++#  BLAS, LAPACK (and possibly other) libraries needed for linking test programs
++#
++
++BLASLIB       = -lblas
++LAPACKLIB     = -llapack
++LIBS          = $(LAPACKLIB) $(BLASLIB)
diff --git a/scalapack-2.0.2-shared-blacs.patch b/scalapack-2.0.2-shared-blacs.patch
new file mode 100644
index 0000000..1695137
--- /dev/null
+++ b/scalapack-2.0.2-shared-blacs.patch
@@ -0,0 +1,12 @@
+diff -up scalapack-2.0.2/scalapack-2.0.2/BLACS/SRC/Makefile.shared scalapack-2.0.2/scalapack-2.0.2/BLACS/SRC/Makefile
+--- scalapack-2.0.2/scalapack-2.0.2/BLACS/SRC/Makefile.shared	2014-05-03 09:57:18.423192929 -0400
++++ scalapack-2.0.2/scalapack-2.0.2/BLACS/SRC/Makefile	2014-05-03 09:57:14.128198052 -0400
+@@ -71,6 +71,8 @@ $(Fintobj): Bdef.h Bconfig.h
+ all : $(internal) $(Fintobj) $(Cintobj)
+ 	$(ARCH) $(ARCHFLAGS) ../../$(SCALAPACKLIB) $(internal) $(Fintobj) $(Cintobj)
+ 	$(RANLIB) ../../$(SCALAPACKLIB)
++	cp -a ../../$(SCALAPACKLIB) ../../libmpiblacs.a
++	( mkdir tmp ; cp ../../$(SCALAPACKLIB) tmp ; cd tmp ; ar x $(SCALAPACKLIB) ; mpif77 -shared -o ../../../libmpiblacs.so.2.0.0 *.o *.oo -Wl,-soname=libmpiblacs.so.2 ; cd .. )
+ 
+ #  -----------------------
+ #  Delete the object files
diff --git a/scalapack.spec b/scalapack.spec
index 1e97be7..9aa1bda 100644
--- a/scalapack.spec
+++ b/scalapack.spec
@@ -1,18 +1,29 @@
+%ifarch s390 s390x
+  # No OpenMPI support on these arches
+  %bcond_with openmpi
+%else
+  %bcond_without openmpi
+%endif
+
 Summary: A subset of LAPACK routines redesigned for heterogeneous computing
 Name: scalapack
-Version: 1.7.5
-Release: 21%{?dist}
+Version: 2.0.2
+Release: 1%{?dist}
 # This is freely distributable without any restrictions.
 License: Public Domain
 Group: Development/Libraries
-URL: http://www.netlib.org/lapack-dev/
+URL: http://www.netlib.org/scalapack/
 Source0: http://www.netlib.org/scalapack/scalapack-%{version}.tgz
 BuildRequires: lapack-devel, blas-devel
 BuildRequires: gcc-gfortran, glibc-devel
-BuildRequires: blacs-mpich-devel, mpich-devel-static
-BuildRequires: blacs-openmpi-devel, openmpi-devel
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Patch0: scalapack-1.7-fedora.patch
+BuildRequires: mpich-devel-static
+%if %{with openmpi}
+BuildRequires: openmpi-devel
+%endif
+# Build shared-library for ScaLAPACK
+Patch0: scalapack-2.0.2-fedora.patch
+# Build shared library for BLACS
+Patch1: scalapack-2.0.2-shared-blacs.patch
 
 %description
 The ScaLAPACK (or Scalable LAPACK) library includes a subset 
@@ -40,6 +51,23 @@ 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. 
 
+%package -n blacs-common
+Summary: Common files for blacs
+Group: Development/Libraries
+
+%description -n blacs-common
+The BLACS (Basic Linear Algebra Communication Subprograms) project is
+an ongoing investigation whose purpose is to create a linear algebra
+oriented message passing interface that may be implemented efficiently
+and uniformly across a large range of distributed memory platforms.
+
+The length of time required to implement efficient distributed memory
+algorithms makes it impractical to rewrite programs for every new
+parallel machine. The BLACS exist in order to make linear algebra
+applications both easier to program and more portable.
+
+This file contains common files which are not specific to any MPI implementation.
+
 %package common
 Summary: Common files for scalapack
 Group: Development/Libraries
@@ -73,6 +101,45 @@ routines resemble their LAPACK equivalents as much as possible.
 This package contains common files which are not specific
 to any MPI implementation.
 
+%package -n blacs-mpich
+Summary: BLACS libraries compiled against mpich
+Group: Development/Libraries
+Requires: blacs-common = %{version}-%{release}
+Provides: blacs-mpich2 = %{version}-%{release}
+Obsoletes: blacs-mpich2 < 1.1-50
+
+%description -n blacs-mpich
+The BLACS (Basic Linear Algebra Communication Subprograms) project is
+an ongoing investigation whose purpose is to create a linear algebra
+oriented message passing interface that may be implemented efficiently
+and uniformly across a large range of distributed memory platforms.
+
+The length of time required to implement efficient distributed memory
+algorithms makes it impractical to rewrite programs for every new
+parallel machine. The BLACS exist in order to make linear algebra
+applications both easier to program and more portable.
+
+This package contains BLACS libraries compiled with mpich.
+
+%package -n blacs-mpich-devel
+Summary: Development libraries for blacs (mpich)
+Group: Development/Libraries
+Requires: blacs-mpich = %{version}-%{release}
+Provides: blacs-mpich2-devel = %{version}-%{release}
+Obsoletes: blacs-mpich2-devel < 1.1-50
+
+%description -n blacs-mpich-devel
+This package contains development libraries for blacs, compiled against mpich.
+
+%package -n blacs-mpich-static
+Summary: Static libraries for blacs (mpich)
+Group: Development/Libraries
+Provides: blacs-mpich2-static = %{version}-%{release}
+Obsoletes: blacs-mpich2-static < 1.1-50
+
+%description -n blacs-mpich-static
+This package contains static libraries for blacs, compiled against mpich.
+
 %package mpich
 Summary: ScaLAPACK libraries compiled against mpich
 Group: Development/Libraries
@@ -138,6 +205,40 @@ Obsoletes: %{name}-mpich2-static < 1.7.5-19
 %description mpich-static
 This package contains static libraries for ScaLAPACK, compiled against mpich.
 
+%if %{with openmpi}
+%package -n blacs-openmpi
+Summary: BLACS libraries compiled against openmpi
+Group: Development/Libraries
+Requires: %{name}-common = %{version}-%{release}
+
+%description -n blacs-openmpi
+The BLACS (Basic Linear Algebra Communication Subprograms) project is
+an ongoing investigation whose purpose is to create a linear algebra
+oriented message passing interface that may be implemented efficiently
+and uniformly across a large range of distributed memory platforms.
+
+The length of time required to implement efficient distributed memory
+algorithms makes it impractical to rewrite programs for every new
+parallel machine. The BLACS exist in order to make linear algebra
+applications both easier to program and more portable.
+
+This package contains BLACS libraries compiled with openmpi.
+
+%package -n blacs-openmpi-devel
+Summary: Development libraries for blacs (openmpi)
+Group: Development/Libraries
+Requires: blacs-openmpi = %{version}-%{release}
+
+%description -n blacs-openmpi-devel
+This package contains development libraries for blacs, compiled against openmpi.
+
+%package -n blacs-openmpi-static
+Summary: Static libraries for blacs (openmpi)
+Group: Development/Libraries
+
+%description -n blacs-openmpi-static
+This package contains static libraries for blacs, compiled against openmpi.
+
 %package openmpi
 Summary: ScaLAPACK libraries compiled against openmpi
 Group: Development/Libraries
@@ -188,16 +289,14 @@ 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}
 %patch0 -p1
-cd %{name}-%{version}/
-sed -i 's!BLACSdir      =.*!BLACSdir      = %{_libdir}!' SLmake.inc
-cd ..
-for i in mpich openmpi; do
+%patch1 -p1
+for i in mpich %{?with_openmpi:openmpi}; do
   cp -a %{name}-%{version} %{name}-%{version}-$i
-  sed -i "s|FOO|$i|g" %{name}-%{version}-$i/SLmake.inc
 done
 
 %build
@@ -213,73 +312,94 @@ RPM_OPT_FLAGS=`echo $CFLAGS`
 %dobuild
 %{_mpich_unload}
 
+%if %{with openmpi}
 # Build OpenMPI version
 export MPI_COMPILER_NAME=openmpi
 %{_openmpi_load}
 RPM_OPT_FLAGS=`echo $CFLAGS`
 %dobuild
 %{_openmpi_unload}
+%endif
 
 %install
-rm -fr ${RPM_BUILD_ROOT}
 mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
 mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
 
-for i in mpich openmpi; do
+for i in mpich %{?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}/$i/lib/$f
   done
   popd
+  mkdir -p %{buildroot}%{_includedir}/$i-%{_arch}/
+  # This file is independent of the MPI compiler used, but it is poorly named
+  # So we'll put it in %{_includedir}/blacs/
+  mkdir -p %{buildroot}%{_includedir}/blacs/
+  install -p %{name}-%{version}-$i/BLACS/SRC/Bdef.h %{buildroot}%{_includedir}/blacs/
+
   pushd %{buildroot}%{_libdir}/$i/lib/
-  ln -fs libscalapack.so.1.0.0 libscalapack.so.1
-  ln -s libscalapack.so.1.0.0 libscalapack.so
+  ln -fs libscalapack.so.2.0.0 libscalapack.so.2
+  ln -s libscalapack.so.2.0.0 libscalapack.so
+  ln -fs libmpiblacs.so.2.0.0 libmpiblacs.so.2
+  ln -s libmpiblacs.so.2.0.0 libmpiblacs.so
   popd
 done
 
 # Copy docs
 cd %{name}-%{version}
-cp -f INSTALL/scalapack_install.ps ../
 cp -f README ../
 
-#cp -f TESTING/x* ${RPM_BUILD_ROOT}%{_bindir}
+%files common
+%doc README
 
-%clean
-rm -fr ${RPM_BUILD_ROOT}
+%files -n blacs-common
+%{_includedir}/blacs/
 
-%files common
-%defattr(-,root,root,-)
-%doc scalapack_install.ps README
-# %{_bindir}/x*
+%files -n blacs-mpich
+%{_libdir}/mpich/lib/libmpiblacs*.so.*
+
+%files -n blacs-mpich-devel
+%{_includedir}/mpich-%{_arch}/
+%{_libdir}/mpich/lib/libmpiblacs*.so
+
+%files -n blacs-mpich-static
+%{_libdir}/mpich/lib/libmpiblacs*.a
 
 %files mpich
-%defattr(-,root,root,-)
 %{_libdir}/mpich/lib/libscalapack.so.*
 
 %files mpich-devel
-%defattr(-,root,root,-)
 %{_libdir}/mpich/lib/libscalapack.so
 
 %files mpich-static
-%defattr(-,root,root,-)
 %{_libdir}/mpich/lib/libscalapack.a
 
+%if %{with openmpi}
+%files -n blacs-openmpi
+%{_libdir}/openmpi/lib/libmpiblacs*.so.*
+
+%files -n blacs-openmpi-devel
+%{_includedir}/openmpi-%{_arch}/
+%{_libdir}/openmpi/lib/libmpiblacs*.so
+
+%files -n blacs-openmpi-static
+%{_libdir}/openmpi/lib/libmpiblacs*.a
+
 %files openmpi
-%defattr(-,root,root,-)
 %{_libdir}/openmpi/lib/libscalapack.so.*
 
 %files openmpi-devel
-%defattr(-,root,root,-)
 %{_libdir}/openmpi/lib/libscalapack.so
 
 %files openmpi-static
-%defattr(-,root,root,-)
 %{_libdir}/openmpi/lib/libscalapack.a
+%endif
 
 %changelog
-* Sat Feb 22 2014 Deji Akingunola <dakingun at gmail.com> - 1.7.5-21
-- Rebuild for mpich-3.1
+* Sat May 3 2014 Tom Callaway <spot at fedoraproject.org> - 2.0.2-1
+- update to 2.0.2
+- subpackage blacs
 
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.7.5-20
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources
index 3c43a57..9496727 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-122226d32ce02e2651988f905367a6f8  scalapack-1.7.5.tgz
+2f75e600a2ba155ed9ce974a1c4b536f  scalapack-2.0.2.tgz


More information about the scm-commits mailing list