From 69a54e624237f400662876f66233297892800f8f Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Nov 29 2016 10:09:58 +0000 Subject: - still use blas if openblas is not available --- diff --git a/scalapack-1.7-fedora.patch b/scalapack-1.7-fedora.patch deleted file mode 100644 index 27c8105..0000000 --- a/scalapack-1.7-fedora.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- scalapack-1.7/scalapack-1.7.5/Makefile.fedora 2001-08-10 11:44:13.000000000 -0500 -+++ scalapack-1.7/scalapack-1.7.5/Makefile 2006-03-08 18:08:21.000000000 -0600 -@@ -49,7 +49,7 @@ - all: lib - #all: lib exe - --lib: toolslib pblaslib redistlib scalapacklib -+lib: toolslib pblaslib redistlib scalapacklib shared - - exe: pblasexe redistexe scalapackexe - -@@ -90,3 +90,6 @@ - ( cd $(SRCdir); $(MAKE) clean ) - ( cd $(TOOLSdir); $(MAKE) clean ) - ( cd $(REDISTdir)/SRC; $(MAKE) clean ) -+ -+shared: scalapacklib -+ ( 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 @@ - # The complete path to the top level of ScaLAPACK directory, usually - # $(HOME)/SCALAPACK - # --home = $(HOME)/SCALAPACK -+home = $(RPM_BUILD_DIR)/scalapack-1.7.5/scalapack-1.7.5-FOO - # - # The platform identifier to suffix to the end of library names - # -@@ -35,10 +35,10 @@ - # Will need to comment out these 6 lines if using PVM - # - USEMPI = -DUsingMpiBlacs --SMPLIB = /usr/local/mpich-1.2.1/lib/libmpich.a --BLACSFINIT = $(BLACSdir)/libmpiblacsF77init-p4.a --BLACSCINIT = $(BLACSdir)/libmpiblacsCinit-p4.a --BLACSLIB = $(BLACSdir)/libmpiblacs-p4.a -+SMPLIB = -+BLACSFINIT = -lmpiblacsF77init -+BLACSCINIT = -lmpiblacsCinit -+BLACSLIB = -lmpiblacs - TESTINGdir = $(home)/TESTING - - # -@@ -67,12 +67,12 @@ - # - # The fortran and C compilers, loaders, and their flags - # --F77 = g77 -+F77 = mpif77 - #F77 = /usr/local/pgi/linux86/bin/pgf77 --CC = gcc --NOOPT = --F77FLAGS = -O3 $(NOOPT) --CCFLAGS = -O4 -+CC = mpicc -+NOOPT = -fPIC -+F77FLAGS = $(RPM_OPT_FLAGS) $(NOOPT) -+CCFLAGS = $(RPM_OPT_FLAGS) $(NOOPT) - SRCFLAG = - F77LOADER = $(F77) - CCLOADER = $(CC) -@@ -82,7 +82,7 @@ - # C preprocessor defs for compilation - # (-DNoChange, -DAdd_, -DUpCase, or -Df77IsF2C) - # --CDEFS = -Df77IsF2C -DNO_IEEE $(USEMPI) -+CDEFS = -DAdd_ -DNO_IEEE $(USEMPI) - # - # 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 -@@ -94,9 +94,10 @@ - # The name of the libraries to be created/linked to - # - SCALAPACKLIB = $(home)/libscalapack.a --BLASLIB = /usr/local/lib/libf77blas.a /usr/local/lib/libatlas.a -+SCALAPACKSLIB = -L$(home) -lscalapack -+BLASLIB = -lblas - # --PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(BLASLIB) $(SMPLIB) --PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB) --RLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(CBLACSLIB) $(BLASLIB) $(SMPLIB) -+PBLIBS = $(SCALAPACKSLIB) $(FBLACSLIB) $(BLASLIB) $(SMPLIB) -+PRLIBS = $(SCALAPACKSLIB) $(CBLACSLIB) $(SMPLIB) -+RLIBS = $(SCALAPACKSLIB) $(FBLACSLIB) $(CBLACSLIB) $(BLASLIB) $(SMPLIB) - LIBS = $(PBLIBS) diff --git a/scalapack.spec b/scalapack.spec index ce6770d..062a9e8 100644 --- a/scalapack.spec +++ b/scalapack.spec @@ -12,16 +12,26 @@ %bcond_without mpich %endif +%ifarch x86_64 %{ix86} armv7hl %{power64} aarch64 +# matches openblas ExclusiveArch +%bcond without openblas +%endif + Summary: A subset of LAPACK routines redesigned for heterogeneous computing Name: scalapack Version: 2.0.2 -Release: 19%{?dist} +Release: 20%{?dist} # This is freely distributable without any restrictions. License: Public Domain Group: Development/Libraries URL: http://www.netlib.org/scalapack/ Source0: http://www.netlib.org/scalapack/scalapack-%{version}.tgz -BuildRequires: lapack-devel, openblas-devel +BuildRequires: lapack-devel +%if %{with openblas} +BuildRequires: openblas-devel +%else +BuildRequires: blas-devel +%endif BuildRequires: gcc-gfortran, glibc-devel %if %{with mpich} %if 0%{?rhel} && 0%{?rhel} < 7 @@ -39,6 +49,8 @@ Patch0: scalapack-2.0.2-fedora.patch Patch1: scalapack-2.0.2-shared-blacs.patch # Add missing functions Patch2: scalapack-2.0.2-missing-functions.patch +# Still use blas if openblas is not available +Patch3: scalapack-2.0.2-fedora-blas.patch %description The ScaLAPACK (or Scalable LAPACK) library includes a subset @@ -320,6 +332,9 @@ This package contains static libraries for ScaLAPACK, compiled against openmpi. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%if %{without openblas} +%patch3 -p1 +%endif for i in %{?with_mpich:mpich} %{?with_openmpi:openmpi}; do cp -a %{name}-%{version} %{name}-%{version}-$i done @@ -427,6 +442,9 @@ cp -f README ../ %endif %changelog +* Tue Nov 29 2016 Dan Horák - 2.0.2-20 +- still use blas if openblas is not available + * Mon Nov 28 2016 Tom Callaway - 2.0.2-19 - build against openblas