[scalapack/el6] update to 2.0.2, rebuild against new mpich in 6.6

Tom Callaway spot at fedoraproject.org
Tue Oct 21 17:32:26 UTC 2014


commit dd8168ae4b95e102fa8ed852d46c789c218b4f4f
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Tue Oct 21 13:32:26 2014 -0400

    update to 2.0.2, rebuild against new mpich in 6.6

 scalapack-2.0.2-fedora.patch       |   83 ++++++++++
 scalapack-2.0.2-shared-blacs.patch |   12 ++
 scalapack.spec                     |  293 ++++++++++++++++++++++++++----------
 sources                            |    2 +-
 4 files changed, 312 insertions(+), 78 deletions(-)
---
diff --git a/scalapack-2.0.2-fedora.patch b/scalapack-2.0.2-fedora.patch
new file mode 100644
index 0000000..ac0f0e8
--- /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 -lblas -llapack -L.. -lmpiblacs -lm -lgfortran ; 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..cbd2bfc
--- /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 ; ln -s libmpiblacs.so.2.0.0 ../../../libmpiblacs.so.2 ; ln -s libmpiblacs.so.2.0.0 ../../../libmpiblacs.so ; cd .. )
+ 
+ #  -----------------------
+ #  Delete the object files
diff --git a/scalapack.spec b/scalapack.spec
index a1bc4a7..1932e7f 100644
--- a/scalapack.spec
+++ b/scalapack.spec
@@ -1,37 +1,40 @@
+%ifarch s390 s390x
+  # No OpenMPI support on these arches
+  %bcond_with openmpi
+%else
+  %bcond_without openmpi
+%endif
+
+%if 0%{?rhel} < 7
+%ifarch ppc ppc64 s390 s390x
+  # No mpich in RHEL for these arches
+  %bcond_with mpich
+%else
+  %bcond_without mpich
+%endif
+%endif
+
 Summary: A subset of LAPACK routines redesigned for heterogeneous computing
 Name: scalapack
-Version: 1.7.5
-Release: 17%{?dist}.1
+Version: 2.0.2
+Release: 5%{?dist}.1
 # 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
-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
+%if %{with mpich}
+BuildRequires: mpich-devel
 %endif
 %if %{with openmpi}
-BuildRequires: blacs-openmpi-devel, openmpi-devel
+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 
@@ -59,6 +62,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
@@ -92,19 +112,61 @@ routines resemble their LAPACK equivalents as much as possible.
 This package contains common files which are not specific
 to any MPI implementation.
 
-%if %{with mpich2}
-%package mpich2
-Summary: ScaLAPACK libraries compiled against mpich2
+%if %{with mpich}
+
+%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
 Requires: %{name}-common = %{version}-%{release}
 # For dir ownership
-Requires: mpich2
+Requires: mpich
 
+Provides: %{name}-mpich2 = %{version}-%{release}
+Obsoletes: %{name}-mpich2 < 1.7.5-19
 # This is a lie, but something needs to obsolete it.
 Provides: %{name}-lam = %{version}-%{release}
 Obsoletes: %{name}-lam <= 1.7.5-7
 
-%description mpich2
+%description mpich
 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
@@ -130,30 +192,68 @@ 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 mpich.
 
-%package mpich2-devel
-Summary: Development libraries for ScaLAPACK (mpich2)
+%package mpich-devel
+Summary: Development libraries for ScaLAPACK (mpich)
 Group: Development/Libraries
-Requires: %{name}-mpich2 = %{version}-%{release}
+Requires: %{name}-mpich = %{version}-%{release}
 Provides: %{name}-lam-devel = %{version}-%{release}
 Obsoletes: %{name}-lam-devel <= 1.7.5-7
+Provides: %{name}-mpich2-devel = %{version}-%{release}
+Obsoletes: %{name}-mpich2-devel < 1.7.5-19
 
-%description mpich2-devel
-This package contains development libraries for ScaLAPACK, compiled against mpich2.
+%description mpich-devel
+This package contains development libraries for ScaLAPACK, compiled against mpich.
 
-%package mpich2-static
-Summary: Static libraries for ScaLAPACK (mpich2)
+%package mpich-static
+Summary: Static libraries for ScaLAPACK (mpich)
 Group: Development/Libraries
 Provides: %{name}-lam-static = %{version}-%{release}
 Obsoletes: %{name}-lam-static <= 1.7.5-7
-Requires: %{name}-mpich2-devel = %{version}-%{release}
+Requires: %{name}-mpich-devel = %{version}-%{release}
+Provides: %{name}-mpich2-static = %{version}-%{release}
+Obsoletes: %{name}-mpich2-static < 1.7.5-19
+
+%description mpich-static
+This package contains static libraries for ScaLAPACK, compiled against mpich.
 
-%description mpich2-static
-This package contains static libraries for ScaLAPACK, compiled against mpich2.
 %endif
 
 %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
@@ -209,12 +309,9 @@ This package contains static 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 %{?with_mpich2:mpich2} %{?with_openmpi:openmpi}; do
+%patch1 -p1
+for i in %{?with_mpich: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
@@ -223,13 +320,13 @@ cd %{name}-%{version}-$MPI_COMPILER_NAME ; \
 make lib ; \
 cd ..
 
-%if %{with mpich2}
-# Build mpich2 version
-export MPI_COMPILER_NAME=mpich2
-%{_mpich2_load}
+%if %{with mpich}
+# Build mpich version
+export MPI_COMPILER_NAME=mpich
+%{_mpich_load}
 RPM_OPT_FLAGS=`echo $CFLAGS`
 %dobuild
-%{_mpich2_unload}
+%{_mpich_unload}
 %endif
 
 %if %{with openmpi}
@@ -242,69 +339,111 @@ RPM_OPT_FLAGS=`echo $CFLAGS`
 %endif
 
 %install
-rm -fr ${RPM_BUILD_ROOT}
 mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
 mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
 
-for i in %{?with_mpich2:mpich2} %{?with_openmpi:openmpi}; do
+for i in %{?with_mpich: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}
-
-%clean
-rm -fr ${RPM_BUILD_ROOT}
-
 %files common
-%defattr(-,root,root,-)
-%doc scalapack_install.ps README
-# %{_bindir}/x*
+%doc README
+
+%files -n blacs-common
+%{_includedir}/blacs/
 
 %if %{with mpich2}
-%files mpich2
-%defattr(-,root,root,-)
-%{_libdir}/mpich2/lib/libscalapack.so.*
 
-%files mpich2-devel
-%defattr(-,root,root,-)
-%{_libdir}/mpich2/lib/libscalapack.so
+%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 mpich2-static
-%defattr(-,root,root,-)
-%{_libdir}/mpich2/lib/libscalapack.a
+%files mpich
+%{_libdir}/mpich/lib/libscalapack.so.*
+
+%files mpich-devel
+%{_libdir}/mpich/lib/libscalapack.so
+
+%files mpich-static
+%{_libdir}/mpich/lib/libscalapack.a
 %endif
 
 %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
-* Tue Mar  5 2013 Tom Callaway <spot at fedoraproject.org> - 1.7.5-17.1
-- add EL conditionalization
+* Tue Oct 21 2014 Tom Callaway <spot at fedoraproject.org> - 2.0.2-5.1
+- fixup el6
+
+* Thu Sep  4 2014 Thomas Spura <tomspur at fedoraproject.org> - 2.0.2-5
+- rebuild for changed library inside openmpi (#1135728)
+
+* Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.2-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Tue Jul  1 2014 Tom Callaway <spot at fedoraproject.org> - 2.0.2-3
+- explictly link to other dependent libs
+
+* Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* 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
+
+* Sat Jul 20 2013 Deji Akingunola <dakingun at gmail.com> - 1.7.5-19
+- Rename mpich2 sub-packages to mpich and rebuild for mpich-3.0
+
+* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.7.5-18
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
 * Thu Nov 15 2012 Tom Callaway <spot at fedoraproject.org> - 1.7.5-17
 - rebuild for new mpich2
@@ -336,7 +475,7 @@ rm -fr ${RPM_BUILD_ROOT}
 - Move all BuildRequires to the top of the spec file
 - -static packages now Require matching -devel package, they're not very useful otherwise
 
-* Wed Dec 15 2009 Deji Akingunola <dakingun at gmail.com> - 1.7.5-9
+* Tue Dec 15 2009 Deji Akingunola <dakingun at gmail.com> - 1.7.5-9
 - Buildrequire mpich2-devel-static
 
 * Wed Dec  9 2009 Tom "spot" Callaway <tcallawa at redhat.com> - 1.7.5-8
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