Use reference versions instead of optimized (but buggy) internal LAPACK functions.

This commit is contained in:
Susi Lehtola 2013-07-08 18:13:00 +03:00
parent eb85a1a895
commit 3e16f6ac81
2 changed files with 54 additions and 5 deletions

View File

@ -0,0 +1,42 @@
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 \

View File

@ -1,6 +1,6 @@
Name: openblas
Version: 0.2.5
Release: 9%{?dist}
Release: 10%{?dist}
Summary: An optimized BLAS library based on GotoBLAS2
Group: Development/Libraries
License: BSD
@ -10,6 +10,8 @@ Source0: https://github.com/xianyi/OpenBLAS/archive/v0.2.5.tar.gz
Patch0: openblas-0.2.5-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,15 +98,16 @@ tar zxf %{SOURCE0}
cd OpenBLAS-%{version}
%patch0 -p1 -b .netlib_lapack
%patch1 -p1 -b .libname
%patch2 -p1 -b .nolapack
# Setup LAPACK
mkdir netliblapack
cd netliblapack
ar x %{_libdir}/liblapack_pic.a
# Get rid of duplicate functions
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 (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
# LAPACKE
%if %{lapacke}
@ -241,6 +244,10 @@ rm -rf %{buildroot}
%{_libdir}/lib%{name}p.a
%changelog
* Mon Jul 08 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 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.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild