From 35ceac4c7e5ff361b97f2e4d80de02ee48a752e5 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Tue, 23 Jul 2013 13:06:13 +0300 Subject: [PATCH] Update to 0.2.7. --- .gitignore | 1 + openblas-0.2.5-no-openblas-lapack.patch | 42 ----------- openblas-0.2.5-system_lapack.patch | 81 ---------------------- openblas-0.2.7-system_lapack.patch | 92 +++++++++++++++++++++++++ openblas.spec | 33 +++++---- sources | 2 +- 6 files changed, 113 insertions(+), 138 deletions(-) delete mode 100644 openblas-0.2.5-no-openblas-lapack.patch delete mode 100644 openblas-0.2.5-system_lapack.patch create mode 100644 openblas-0.2.7-system_lapack.patch diff --git a/.gitignore b/.gitignore index 7febb18..2f4dc6d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /v0.2.5.tar.gz +/v0.2.7.tar.gz diff --git a/openblas-0.2.5-no-openblas-lapack.patch b/openblas-0.2.5-no-openblas-lapack.patch deleted file mode 100644 index a88c1a5..0000000 --- a/openblas-0.2.5-no-openblas-lapack.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up serial/interface/Makefile.nolapack serial/interface/Makefile ---- serial/interface/Makefile.nolapack 2012-11-27 01:24:53.000000000 +0200 -+++ serial/interface/Makefile 2013-07-08 11:45:48.731294440 +0300 -@@ -372,15 +372,6 @@ XLAPACKOBJS = \ - xpotf2.$(SUFFIX) xpotrf.$(SUFFIX) xtrti2.$(SUFFIX) xtrtri.$(SUFFIX) \ - xlaswp.$(SUFFIX) xgetrs.$(SUFFIX) xgesv.$(SUFFIX) xpotri.$(SUFFIX) \ - --ifneq ($(NO_LAPACK), 1) --SBLASOBJS += $(SLAPACKOBJS) --DBLASOBJS += $(DLAPACKOBJS) --QBLASOBJS += $(QLAPACKOBJS) --CBLASOBJS += $(CLAPACKOBJS) --ZBLASOBJS += $(ZLAPACKOBJS) --XBLASOBJS += $(XLAPACKOBJS) -- --endif - - FUNCOBJS = $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) - -@@ -786,7 +777,7 @@ endif - - qgemv.$(SUFFIX) qgemv.$(PSUFFIX): gemv.c - $(CC) -c $(CFLAGS) -o $(@F) $< -- -+ - ifndef USE_NETLIB_GEMV - cgemv.$(SUFFIX) cgemv.$(PSUFFIX): zgemv.c - $(CC) -c $(CFLAGS) -o $(@F) $< -diff -up serial/lapack/Makefile.nolapack serial/lapack/Makefile ---- serial/lapack/Makefile.nolapack 2012-11-27 01:24:53.000000000 +0200 -+++ serial/lapack/Makefile 2013-07-08 10:39:00.578175235 +0300 -@@ -1,10 +1,6 @@ - TOPDIR = .. - include ../Makefile.system - --SUBDIRS = laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs -- --FLAMEDIRS = laswp getf2 potf2 lauu2 trti2 -- - libs: - @for d in $(SUBDIRS) ; \ - do if test -d $$d; then \ diff --git a/openblas-0.2.5-system_lapack.patch b/openblas-0.2.5-system_lapack.patch deleted file mode 100644 index 6eda04a..0000000 --- a/openblas-0.2.5-system_lapack.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff -up xianyi-OpenBLAS-e42259c.mod/Makefile.orig xianyi-OpenBLAS-e42259c.mod/Makefile ---- xianyi-OpenBLAS-e42259c.mod/Makefile.orig 2012-11-26 11:32:56.000000000 +0200 -+++ xianyi-OpenBLAS-e42259c.mod/Makefile 2012-12-12 23:06:03.076579588 +0200 -@@ -199,18 +199,9 @@ hpl_p : - fi; \ - done - --ifeq ($(NO_LAPACK), 1) --netlib : -+netlib : -+ -@$(MAKE) -C netliblapack - --else --netlib : lapack-3.4.2 patch.for_lapack-3.4.2 $(NETLIB_LAPACK_DIR)/make.inc --ifndef NOFORTRAN -- -@$(MAKE) -C $(NETLIB_LAPACK_DIR) lapacklib --endif --ifndef NO_LAPACKE -- -@$(MAKE) -C $(NETLIB_LAPACK_DIR) lapackelib --endif --endif - - prof_lapack : lapack-3.4.2 $(NETLIB_LAPACK_DIR)/make.inc - -@$(MAKE) -C $(NETLIB_LAPACK_DIR) lapack_prof -@@ -241,37 +232,6 @@ endif - -@cat make.inc >> $(NETLIB_LAPACK_DIR)/make.inc - endif - --lapack-3.4.2 : lapack-3.4.2.tgz --ifndef NOFORTRAN --ifndef NO_LAPACK -- @if test `$(MD5SUM) lapack-3.4.2.tgz | $(AWK) '{print $$1}'` = 61bf1a8a4469d4bdb7604f5897179478; then \ -- echo $(TAR) zxf $< ;\ -- $(TAR) zxf $< && (cd $(NETLIB_LAPACK_DIR); $(PATCH) -p1 < ../patch.for_lapack-3.4.2) ;\ -- rm -f $(NETLIB_LAPACK_DIR)/lapacke/make.inc ;\ -- else \ -- rm -rf $(NETLIB_LAPACK_DIR) ;\ -- echo " Cannot download lapack-3.4.2.tgz or the MD5 check sum is wrong (Please use orignal)."; \ -- exit 1; \ -- fi --endif --endif -- --LAPACK_URL=http://www.netlib.org/lapack/lapack-3.4.2.tgz -- --lapack-3.4.2.tgz : --ifndef NOFORTRAN --#http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or --ifeq ($(OSNAME), $(filter $(OSNAME),Darwin NetBSD)) -- curl -O $(LAPACK_URL) --else --ifeq ($(OSNAME), FreeBSD) -- fetch $(LAPACK_URL) --else -- wget $(LAPACK_URL) --endif --endif --endif -- - large.tgz : - ifndef NOFORTRAN - -wget http://www.netlib.org/lapack/timing/large.tgz -@@ -320,4 +280,4 @@ clean :: - rm -rf $(NETLIB_LAPACK_DIR) ;\ - fi - @rm -f *.grd Makefile.conf_last config_last.h -- @echo Done. -\ No newline at end of file -+ @echo Done. -diff -up xianyi-OpenBLAS-e42259c.mod/Makefile.system.orig xianyi-OpenBLAS-e42259c.mod/Makefile.system ---- xianyi-OpenBLAS-e42259c.mod/Makefile.system.orig 2012-11-26 11:32:56.000000000 +0200 -+++ xianyi-OpenBLAS-e42259c.mod/Makefile.system 2012-12-12 22:56:06.147413758 +0200 -@@ -10,7 +10,7 @@ TOPDIR = . - endif - - ifndef NETLIB_LAPACK_DIR --NETLIB_LAPACK_DIR = $(TOPDIR)/lapack-3.4.2 -+NETLIB_LAPACK_DIR = $(TOPDIR)/netliblapack - endif - - # Default C compiler diff --git a/openblas-0.2.7-system_lapack.patch b/openblas-0.2.7-system_lapack.patch new file mode 100644 index 0000000..bb79d4f --- /dev/null +++ b/openblas-0.2.7-system_lapack.patch @@ -0,0 +1,92 @@ +diff -up serial/Makefile.system_lapack serial/Makefile +--- serial/Makefile.system_lapack 2013-07-20 18:05:36.000000000 +0300 ++++ serial/Makefile 2013-07-23 12:28:02.961948050 +0300 +@@ -202,74 +202,8 @@ hpl_p : + fi; \ + done + +-ifeq ($(NO_LAPACK), 1) +-netlib : +- +-else +-netlib : lapack_prebuild +-ifndef NOFORTRAN +- @$(MAKE) -C $(NETLIB_LAPACK_DIR) lapacklib +-endif +-ifndef NO_LAPACKE +- @$(MAKE) -C $(NETLIB_LAPACK_DIR) lapackelib +-endif +-endif +- +-prof_lapack : lapack_prebuild +- @$(MAKE) -C $(NETLIB_LAPACK_DIR) lapack_prof +- +-lapack_prebuild : +-ifndef NOFORTRAN +- -@echo "FORTRAN = $(FC)" > $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "OPTS = $(FFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "POPTS = $(FPFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "NOOPT = $(FFLAGS) -O0" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "PNOOPT = $(FPFLAGS) -O0" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "LOADOPTS = $(FFLAGS) $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "CC = $(CC)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "override CFLAGS = $(LAPACK_CFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "ARCH = $(AR)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "ARCHFLAGS = -ru" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "RANLIB = $(RANLIB)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "LAPACKLIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "LAPACKELIB = ../$(LIBNAME)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "LAPACKLIB_P = ../$(LIBNAME_P)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "SUFFIX = $(SUFFIX)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "PSUFFIX = $(PSUFFIX)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@echo "CEXTRALIB = $(EXTRALIB)" >> $(NETLIB_LAPACK_DIR)/make.inc +- -@cat make.inc >> $(NETLIB_LAPACK_DIR)/make.inc +-endif +- +-lapack-3.4.2 : lapack-3.4.2.tgz +-ifndef NOFORTRAN +-ifndef NO_LAPACK +- @if test `$(MD5SUM) $< | $(AWK) '{print $$1}'` = 61bf1a8a4469d4bdb7604f5897179478; then \ +- echo $(TAR) zxf $< ;\ +- $(TAR) zxf $< && (cd $(NETLIB_LAPACK_DIR); $(PATCH) -p1 < ../patch.for_lapack-3.4.2) ;\ +- rm -f $(NETLIB_LAPACK_DIR)/lapacke/make.inc ;\ +- else \ +- rm -rf $(NETLIB_LAPACK_DIR) ;\ +- echo " Cannot download lapack-3.4.2.tgz or the MD5 check sum is wrong (Please use orignal)."; \ +- exit 1; \ +- fi +-endif +-endif +- +-LAPACK_URL=http://www.netlib.org/lapack/lapack-3.4.2.tgz +- +-lapack-3.4.2.tgz : +-ifndef NOFORTRAN +-#http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or +-ifeq ($(OSNAME), $(filter $(OSNAME),Darwin NetBSD)) +- curl -O $(LAPACK_URL); +-else +-ifeq ($(OSNAME), FreeBSD) +- fetch $(LAPACK_URL); +-else +- wget -O $@ $(LAPACK_URL); +-endif +-endif +-endif ++netlib : ++ @$(MAKE) -C $(NETLIB_LAPACK_DIR) + + large.tgz : + ifndef NOFORTRAN +diff -up serial/Makefile.system.system_lapack serial/Makefile.system +--- serial/Makefile.system.system_lapack 2013-07-20 18:05:36.000000000 +0300 ++++ serial/Makefile.system 2013-07-23 12:29:00.084410995 +0300 +@@ -9,7 +9,7 @@ ifndef TOPDIR + TOPDIR = . + endif + +-NETLIB_LAPACK_DIR = $(TOPDIR)/lapack-netlib ++NETLIB_LAPACK_DIR = $(TOPDIR)/netliblapack + + # Default C compiler + # - Only set if not specified on the command line or inherited from the environment. diff --git a/openblas.spec b/openblas.spec index f1d1129..cfab9bd 100644 --- a/openblas.spec +++ b/openblas.spec @@ -1,17 +1,15 @@ Name: openblas -Version: 0.2.5 -Release: 10%{?dist} +Version: 0.2.7 +Release: 1%{?dist} Summary: An optimized BLAS library based on GotoBLAS2 Group: Development/Libraries License: BSD URL: https://github.com/xianyi/OpenBLAS/ -Source0: https://github.com/xianyi/OpenBLAS/archive/v0.2.5.tar.gz +Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}.tar.gz # Use system lapack -Patch0: openblas-0.2.5-system_lapack.patch +Patch0: openblas-0.2.7-system_lapack.patch # Drop extra p from threaded library name Patch1: openblas-0.2.5-libname.patch -# Don't use lapack functions from openblas, since they are buggy -Patch2: openblas-0.2.5-no-openblas-lapack.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: gcc-gfortran @@ -96,18 +94,20 @@ This package contains the static libraries. # Untar source tar zxf %{SOURCE0} cd OpenBLAS-%{version} -%patch0 -p1 -b .netlib_lapack +%patch0 -p1 -b .system_lapack %patch1 -p1 -b .libname -%patch2 -p1 -b .nolapack + +# Get rid of bundled LAPACK sources +rm -rf lapack-netlib # Setup LAPACK mkdir netliblapack cd netliblapack ar x %{_libdir}/liblapack_pic.a -## Get rid of duplicate functions (disabled because of patch2) -#for f in getf2 getrf getrs laswp lauu2 lauum potf2 potrf trti2 trtri; do -# \rm {c,d,s,z}$f.o -#done +# Get rid of duplicate functions. See list in Makefile of lapack directory +for f in laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs; do + \rm {c,d,s,z}$f.o +done # LAPACKE %if %{lapacke} @@ -235,7 +235,7 @@ rm -rf %{buildroot} %{_libdir}/lib%{name}.so %{_libdir}/lib%{name}o.so %{_libdir}/lib%{name}p.so -%{_includedir}/%{name} +%{_includedir}/%{name}/ %files static %defattr(-,root,root,-) @@ -244,9 +244,14 @@ rm -rf %{buildroot} %{_libdir}/lib%{name}p.a %changelog +* Tue Jul 23 2013 Susi Lehtola - 0.2.7-1 +- Update to 0.2.7. +- Use OpenBLAS versions of LAPACK functions, as they seem to be + working now. + * Mon Jul 08 2013 Susi Lehtola - 0.2.5-10 - Due to long standing bug, replace all OpenBLAS LAPACK functions with - generic ones, so that package can be released in stable. + generic ones, so that package can finally be released in stable. * Thu Feb 14 2013 Fedora Release Engineering - 0.2.5-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index 981b00c..3956aed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f1d80f2ebbba2cbd019a86b6f1cbb165 v0.2.5.tar.gz +687dd49fabd79bb12979ea68ade3fdd8 v0.2.7.tar.gz