[lapack] 02/03: New patches from upstream and OpenBLAS to fix bugs:

Sébastien Villemot sebastien at debian.org
Thu Aug 7 14:23:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastien pushed a commit to branch master
in repository lapack.

commit f4a450b8615fef5436d0976e04e2f17529bded12
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Thu Aug 7 15:14:49 2014 +0200

    New patches from upstream and OpenBLAS to fix bugs:
    
    - cgesvd-zgesvd-stack-corruption.patch
    - zlanhf-clanhf-norm.patch
    - zstemr-n2.patch
    
    Git-Dch: Full
---
 .../patches/cgesvd-zgesvd-stack-corruption.patch   | 297 +++++++++++++++++++++
 debian/patches/series                              |   3 +
 debian/patches/zlanhf-clanhf-norm.patch            |  29 ++
 debian/patches/zstemr-n2.patch                     |  35 +++
 4 files changed, 364 insertions(+)

diff --git a/debian/patches/cgesvd-zgesvd-stack-corruption.patch b/debian/patches/cgesvd-zgesvd-stack-corruption.patch
new file mode 100644
index 0000000..8b57451
--- /dev/null
+++ b/debian/patches/cgesvd-zgesvd-stack-corruption.patch
@@ -0,0 +1,297 @@
+Description: Fix {C,Z}GESVD stack corruption issue (upstream bug #114)
+Origin: upstream, commit: r1455
+Bug: http://icl.utk.edu/lapack-forum/viewtopic.php?f=13&t=4392
+Reviewed-by: Sébastien Villemot <sebastien at debian.org>
+Last-Update: 2014-08-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/cgesvd.f
++++ b/src/cgesvd.f
+@@ -321,24 +321,24 @@
+ *
+             MNTHR = ILAENV( 6, 'CGESVD', JOBU // JOBVT, M, N, 0, 0 )
+ *           Compute space needed for CGEQRF
+-            CALL CGEQRF( M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_CGEQRF=DUM(1)
++            CALL CGEQRF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_CGEQRF=CDUM(1)
+ *           Compute space needed for CUNGQR
+-            CALL CUNGQR( M, N, N, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_CUNGQR_N=DUM(1)
+-            CALL CUNGQR( M, M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_CUNGQR_M=DUM(1)
++            CALL CUNGQR( M, N, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_CUNGQR_N=CDUM(1)
++            CALL CUNGQR( M, M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_CUNGQR_M=CDUM(1)
+ *           Compute space needed for CGEBRD
+-            CALL CGEBRD( N, N, A, LDA, S, DUM(1), DUM(1),
+-     $                   DUM(1), DUM(1), -1, IERR )
+-            LWORK_CGEBRD=DUM(1)
++            CALL CGEBRD( N, N, A, LDA, S, DUM(1), CDUM(1),
++     $                   CDUM(1), CDUM(1), -1, IERR )
++            LWORK_CGEBRD=CDUM(1)
+ *           Compute space needed for CUNGBR
+-            CALL CUNGBR( 'P', N, N, N, A, LDA, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-            LWORK_CUNGBR_P=DUM(1)
+-            CALL CUNGBR( 'Q', N, N, N, A, LDA, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-            LWORK_CUNGBR_Q=DUM(1)
++            CALL CUNGBR( 'P', N, N, N, A, LDA, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++            LWORK_CUNGBR_P=CDUM(1)
++            CALL CUNGBR( 'Q', N, N, N, A, LDA, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++            LWORK_CUNGBR_Q=CDUM(1)
+ *
+             MNTHR = ILAENV( 6, 'CGESVD', JOBU // JOBVT, M, N, 0, 0 )
+             IF( M.GE.MNTHR ) THEN
+@@ -444,20 +444,20 @@
+ *
+ *              Path 10 (M at least N, but not much larger)
+ *
+-               CALL CGEBRD( M, N, A, LDA, S, DUM(1), DUM(1),
+-     $                   DUM(1), DUM(1), -1, IERR )
+-               LWORK_CGEBRD=DUM(1)
++               CALL CGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
++     $                   CDUM(1), CDUM(1), -1, IERR )
++               LWORK_CGEBRD=CDUM(1)
+                MAXWRK = 2*N + LWORK_CGEBRD
+                IF( WNTUS .OR. WNTUO ) THEN
+-                  CALL CUNGBR( 'Q', M, N, N, A, LDA, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-                  LWORK_CUNGBR_Q=DUM(1)
++                  CALL CUNGBR( 'Q', M, N, N, A, LDA, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++                  LWORK_CUNGBR_Q=CDUM(1)
+                   MAXWRK = MAX( MAXWRK, 2*N+LWORK_CUNGBR_Q )
+                END IF
+                IF( WNTUA ) THEN
+-                  CALL CUNGBR( 'Q', M, M, N, A, LDA, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-                  LWORK_CUNGBR_Q=DUM(1)
++                  CALL CUNGBR( 'Q', M, M, N, A, LDA, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++                  LWORK_CUNGBR_Q=CDUM(1)
+                   MAXWRK = MAX( MAXWRK, 2*N+LWORK_CUNGBR_Q )
+                END IF
+                IF( .NOT.WNTVN ) THEN
+@@ -471,25 +471,26 @@
+ *
+             MNTHR = ILAENV( 6, 'CGESVD', JOBU // JOBVT, M, N, 0, 0 )
+ *           Compute space needed for CGELQF
+-            CALL CGELQF( M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_CGELQF=DUM(1)
++            CALL CGELQF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_CGELQF=CDUM(1)
+ *           Compute space needed for CUNGLQ
+-            CALL CUNGLQ( N, N, M, DUM(1), N, DUM(1), DUM(1), -1, IERR )
+-            LWORK_CUNGLQ_N=DUM(1)
+-            CALL CUNGLQ( M, N, M, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_CUNGLQ_M=DUM(1)
++            CALL CUNGLQ( N, N, M, CDUM(1), N, CDUM(1), CDUM(1), -1,
++     $                   IERR )
++            LWORK_CUNGLQ_N=CDUM(1)
++            CALL CUNGLQ( M, N, M, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_CUNGLQ_M=CDUM(1)
+ *           Compute space needed for CGEBRD
+-            CALL CGEBRD( M, M, A, LDA, S, DUM(1), DUM(1),
+-     $                   DUM(1), DUM(1), -1, IERR )
+-            LWORK_CGEBRD=DUM(1)
++            CALL CGEBRD( M, M, A, LDA, S, DUM(1), CDUM(1),
++     $                   CDUM(1), CDUM(1), -1, IERR )
++            LWORK_CGEBRD=CDUM(1)
+ *            Compute space needed for CUNGBR P
+-            CALL CUNGBR( 'P', M, M, M, A, N, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-            LWORK_CUNGBR_P=DUM(1)
++            CALL CUNGBR( 'P', M, M, M, A, N, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++            LWORK_CUNGBR_P=CDUM(1)
+ *           Compute space needed for CUNGBR Q
+-            CALL CUNGBR( 'Q', M, M, M, A, N, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-            LWORK_CUNGBR_Q=DUM(1)
++            CALL CUNGBR( 'Q', M, M, M, A, N, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++            LWORK_CUNGBR_Q=CDUM(1)
+             IF( N.GE.MNTHR ) THEN
+                IF( WNTVN ) THEN
+ *
+@@ -593,21 +594,21 @@
+ *
+ *              Path 10t(N greater than M, but not much larger)
+ *
+-               CALL CGEBRD( M, N, A, LDA, S, DUM(1), DUM(1),
+-     $                   DUM(1), DUM(1), -1, IERR )
+-               LWORK_CGEBRD=DUM(1)
++               CALL CGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
++     $                   CDUM(1), CDUM(1), -1, IERR )
++               LWORK_CGEBRD=CDUM(1)
+                MAXWRK = 2*M + LWORK_CGEBRD
+                IF( WNTVS .OR. WNTVO ) THEN
+ *                Compute space needed for CUNGBR P
+-                 CALL CUNGBR( 'P', M, N, M, A, N, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-                 LWORK_CUNGBR_P=DUM(1)
++                 CALL CUNGBR( 'P', M, N, M, A, N, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++                 LWORK_CUNGBR_P=CDUM(1)
+                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_CUNGBR_P )
+                END IF
+                IF( WNTVA ) THEN
+-                 CALL CUNGBR( 'P', N,  N, M, A, N, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-                 LWORK_CUNGBR_P=DUM(1)
++                 CALL CUNGBR( 'P', N,  N, M, A, N, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++                 LWORK_CUNGBR_P=CDUM(1)
+                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_CUNGBR_P )
+                END IF
+                IF( .NOT.WNTUN ) THEN
+--- a/src/zgesvd.f
++++ b/src/zgesvd.f
+@@ -321,24 +321,24 @@
+ *
+             MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 )
+ *           Compute space needed for ZGEQRF
+-            CALL ZGEQRF( M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_ZGEQRF=DUM(1)
++            CALL ZGEQRF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_ZGEQRF=CDUM(1)
+ *           Compute space needed for ZUNGQR
+-            CALL ZUNGQR( M, N, N, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_ZUNGQR_N=DUM(1)
+-            CALL ZUNGQR( M, M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_ZUNGQR_M=DUM(1)
++            CALL ZUNGQR( M, N, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_ZUNGQR_N=CDUM(1)
++            CALL ZUNGQR( M, M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_ZUNGQR_M=CDUM(1)
+ *           Compute space needed for ZGEBRD
+-            CALL ZGEBRD( N, N, A, LDA, S, DUM(1), DUM(1),
+-     $                   DUM(1), DUM(1), -1, IERR )
+-            LWORK_ZGEBRD=DUM(1)
++            CALL ZGEBRD( N, N, A, LDA, S, DUM(1), CDUM(1),
++     $                   CDUM(1), CDUM(1), -1, IERR )
++            LWORK_ZGEBRD=CDUM(1)
+ *           Compute space needed for ZUNGBR
+-            CALL ZUNGBR( 'P', N, N, N, A, LDA, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-            LWORK_ZUNGBR_P=DUM(1)
+-            CALL ZUNGBR( 'Q', N, N, N, A, LDA, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-            LWORK_ZUNGBR_Q=DUM(1)
++            CALL ZUNGBR( 'P', N, N, N, A, LDA, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++            LWORK_ZUNGBR_P=CDUM(1)
++            CALL ZUNGBR( 'Q', N, N, N, A, LDA, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++            LWORK_ZUNGBR_Q=CDUM(1)
+ *
+             IF( M.GE.MNTHR ) THEN
+                IF( WNTUN ) THEN
+@@ -443,20 +443,20 @@
+ *
+ *              Path 10 (M at least N, but not much larger)
+ *
+-               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), DUM(1),
+-     $                   DUM(1), DUM(1), -1, IERR )
+-               LWORK_ZGEBRD=DUM(1)
++               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
++     $                   CDUM(1), CDUM(1), -1, IERR )
++               LWORK_ZGEBRD=CDUM(1)
+                MAXWRK = 2*N + LWORK_ZGEBRD
+                IF( WNTUS .OR. WNTUO ) THEN
+-                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-                  LWORK_ZUNGBR_Q=DUM(1)
++                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++                  LWORK_ZUNGBR_Q=CDUM(1)
+                   MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_Q )
+                END IF
+                IF( WNTUA ) THEN
+-                  CALL ZUNGBR( 'Q', M, M, N, A, LDA, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-                  LWORK_ZUNGBR_Q=DUM(1)
++                  CALL ZUNGBR( 'Q', M, M, N, A, LDA, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++                  LWORK_ZUNGBR_Q=CDUM(1)
+                   MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_Q )
+                END IF
+                IF( .NOT.WNTVN ) THEN
+@@ -470,25 +470,26 @@
+ *
+             MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 )
+ *           Compute space needed for ZGELQF
+-            CALL ZGELQF( M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_ZGELQF=DUM(1)
++            CALL ZGELQF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_ZGELQF=CDUM(1)
+ *           Compute space needed for ZUNGLQ
+-            CALL ZUNGLQ( N, N, M, DUM(1), N, DUM(1), DUM(1), -1, IERR )
+-            LWORK_ZUNGLQ_N=DUM(1)
+-            CALL ZUNGLQ( M, N, M, A, LDA, DUM(1), DUM(1), -1, IERR )
+-            LWORK_ZUNGLQ_M=DUM(1)
++            CALL ZUNGLQ( N, N, M, CDUM(1), N, CDUM(1), CDUM(1), -1,
++     $                   IERR )
++            LWORK_ZUNGLQ_N=CDUM(1)
++            CALL ZUNGLQ( M, N, M, A, LDA, CDUM(1), CDUM(1), -1, IERR )
++            LWORK_ZUNGLQ_M=CDUM(1)
+ *           Compute space needed for ZGEBRD
+-            CALL ZGEBRD( M, M, A, LDA, S, DUM(1), DUM(1),
+-     $                   DUM(1), DUM(1), -1, IERR )
+-            LWORK_ZGEBRD=DUM(1)
++            CALL ZGEBRD( M, M, A, LDA, S, DUM(1), CDUM(1),
++     $                   CDUM(1), CDUM(1), -1, IERR )
++            LWORK_ZGEBRD=CDUM(1)
+ *            Compute space needed for ZUNGBR P
+-            CALL ZUNGBR( 'P', M, M, M, A, N, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-            LWORK_ZUNGBR_P=DUM(1)
++            CALL ZUNGBR( 'P', M, M, M, A, N, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++            LWORK_ZUNGBR_P=CDUM(1)
+ *           Compute space needed for ZUNGBR Q
+-            CALL ZUNGBR( 'Q', M, M, M, A, N, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-            LWORK_ZUNGBR_Q=DUM(1)
++            CALL ZUNGBR( 'Q', M, M, M, A, N, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++            LWORK_ZUNGBR_Q=CDUM(1)
+             IF( N.GE.MNTHR ) THEN
+                IF( WNTVN ) THEN
+ *
+@@ -592,21 +593,21 @@
+ *
+ *              Path 10t(N greater than M, but not much larger)
+ *
+-               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), DUM(1),
+-     $                   DUM(1), DUM(1), -1, IERR )
+-               LWORK_ZGEBRD=DUM(1)
++               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
++     $                   CDUM(1), CDUM(1), -1, IERR )
++               LWORK_ZGEBRD=CDUM(1)
+                MAXWRK = 2*M + LWORK_ZGEBRD
+                IF( WNTVS .OR. WNTVO ) THEN
+ *                Compute space needed for ZUNGBR P
+-                 CALL ZUNGBR( 'P', M, N, M, A, N, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-                 LWORK_ZUNGBR_P=DUM(1)
++                 CALL ZUNGBR( 'P', M, N, M, A, N, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++                 LWORK_ZUNGBR_P=CDUM(1)
+                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_P )
+                END IF
+                IF( WNTVA ) THEN
+-                 CALL ZUNGBR( 'P', N,  N, M, A, N, DUM(1),
+-     $                   DUM(1), -1, IERR )
+-                 LWORK_ZUNGBR_P=DUM(1)
++                 CALL ZUNGBR( 'P', N,  N, M, A, N, CDUM(1),
++     $                   CDUM(1), -1, IERR )
++                 LWORK_ZUNGBR_P=CDUM(1)
+                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_P )
+                END IF
+                IF( .NOT.WNTUN ) THEN
diff --git a/debian/patches/series b/debian/patches/series
index f6aeddc..ee7a626 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,6 @@ lapacke_no_matgen.patch
 decouple_gcc.diff
 parallel_build.patch
 doxygen-exclude-binary-objects.patch
+cgesvd-zgesvd-stack-corruption.patch
+zstemr-n2.patch
+zlanhf-clanhf-norm.patch
diff --git a/debian/patches/zlanhf-clanhf-norm.patch b/debian/patches/zlanhf-clanhf-norm.patch
new file mode 100644
index 0000000..3ffc34a
--- /dev/null
+++ b/debian/patches/zlanhf-clanhf-norm.patch
@@ -0,0 +1,29 @@
+Description: Fix ZLANHF and CLANHF Norm Calculation (upstream bug #118)
+Origin: upstream, commit: r1483
+Bug: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4558
+Reviewed-by: Sébastien Villemot <sebastien at debian.org>
+Last-Update: 2014-08-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/clanhf.f
++++ b/src/clanhf.f
+@@ -286,7 +286,7 @@
+          CLANHF = ZERO
+          RETURN
+       ELSE IF( N.EQ.1 ) THEN
+-         CLANHF = ABS( A(0) )
++         CLANHF = ABS(REAL(A(0)))
+          RETURN
+       END IF
+ *
+--- a/src/zlanhf.f
++++ b/src/zlanhf.f
+@@ -286,7 +286,7 @@
+          ZLANHF = ZERO
+          RETURN
+       ELSE IF( N.EQ.1 ) THEN
+-         ZLANHF = ABS( A(0) )
++         ZLANHF = ABS(DBLE(A(0)))
+          RETURN
+       END IF
+ *
diff --git a/debian/patches/zstemr-n2.patch b/debian/patches/zstemr-n2.patch
new file mode 100644
index 0000000..d4eb9fd
--- /dev/null
+++ b/debian/patches/zstemr-n2.patch
@@ -0,0 +1,35 @@
+Description: Fix bug in ZSTEMR for N=2 (upstream bug #117)
+Origin: other, https://github.com/xianyi/OpenBLAS/commit/dc6b809f15fe297e40a73ec65833fa60ac954884
+Bug: http://icl.utk.edu/lapack-forum/viewtopic.php?f=2&t=4331
+Reviewed-by: Sébastien Villemot <sebastien at debian.org>
+Last-Update: 2014-08-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/zstemr.f
++++ b/src/zstemr.f
+@@ -526,10 +526,10 @@
+                IF (SN.NE.ZERO) THEN
+                   IF (CS.NE.ZERO) THEN
+                      ISUPPZ(2*M-1) = 1
+-                     ISUPPZ(2*M-1) = 2
++                     ISUPPZ(2*M) = 2
+                   ELSE
+                      ISUPPZ(2*M-1) = 1
+-                     ISUPPZ(2*M-1) = 1
++                     ISUPPZ(2*M) = 1
+                   END IF
+                ELSE
+                   ISUPPZ(2*M-1) = 2
+@@ -550,10 +550,10 @@
+                IF (SN.NE.ZERO) THEN
+                   IF (CS.NE.ZERO) THEN
+                      ISUPPZ(2*M-1) = 1
+-                     ISUPPZ(2*M-1) = 2
++                     ISUPPZ(2*M) = 2
+                   ELSE
+                      ISUPPZ(2*M-1) = 1
+-                     ISUPPZ(2*M-1) = 1
++                     ISUPPZ(2*M) = 1
+                   END IF
+                ELSE
+                   ISUPPZ(2*M-1) = 2

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lapack.git



More information about the debian-science-commits mailing list