Sync from SUSE:ALP:Source:Standard:1.0 lapack revision e411786594fd711815538b51c4ac3b71

This commit is contained in:
Adrian Schröter 2024-10-14 14:40:41 +02:00
commit 1a5078b39e
14 changed files with 2409 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,981 @@
From ea2a102d3827a9de90fce729c9d7f132d4c96f4f Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Sat, 27 Apr 2019 23:06:12 +0200
Subject: [PATCH 1/2] Avoid out-of-bounds accesses in complex EIG tests
fixes #333
---
TESTING/EIG/chet21.f | 34 ++++++++++++++++------------------
TESTING/EIG/chpt21.f | 37 ++++++++++++++++---------------------
TESTING/EIG/zhet21.f | 34 ++++++++++++++++------------------
TESTING/EIG/zhpt21.f | 38 +++++++++++++++++---------------------
4 files changed, 65 insertions(+), 78 deletions(-)
diff --git a/TESTING/EIG/chet21.f b/TESTING/EIG/chet21.f
index e5bf027c2..5aff64904 100644
--- a/TESTING/EIG/chet21.f
+++ b/TESTING/EIG/chet21.f
@@ -29,9 +29,8 @@
*>
*> CHET21 generally checks a decomposition of the form
*>
-*> A = U S U**H
-*>
-*> where **H means conjugate transpose, A is hermitian, U is unitary, and
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian, U is unitary, and
*> S is diagonal (if KBAND=0) or (real) symmetric tridiagonal (if
*> KBAND=1).
*>
@@ -43,19 +42,18 @@
*>
*> Specifically, if ITYPE=1, then:
*>
-*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
-*> RESULT(2) = | I - U U**H | / ( n ulp )
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
*>
*> If ITYPE=2, then:
*>
-*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
*>
*> If ITYPE=3, then:
*>
-*> RESULT(1) = | I - U V**H | / ( n ulp )
+*> RESULT(1) = | I - UV* | / ( n ulp )
*>
*> For ITYPE > 1, the transformation U is expressed as a product
-*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)**H and each
+*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)C> and each
*> vector v(j) has its first j elements 0 and the remaining n-j elements
*> stored in V(j+1:n,j).
*> \endverbatim
@@ -68,15 +66,14 @@
*> ITYPE is INTEGER
*> Specifies the type of tests to be performed.
*> 1: U expressed as a dense unitary matrix:
-*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
-*> RESULT(2) = | I - U U**H | / ( n ulp )
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
*>
*> 2: U expressed as a product V of Housholder transformations:
-*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
*>
*> 3: U expressed both as a dense unitary matrix and
*> as a product of Housholder transformations:
-*> RESULT(1) = | I - U V**H | / ( n ulp )
+*> RESULT(1) = | I - UV* | / ( n ulp )
*> \endverbatim
*>
*> \param[in] UPLO
@@ -174,7 +171,7 @@
*> \verbatim
*> TAU is COMPLEX array, dimension (N)
*> If ITYPE >= 2, then TAU(j) is the scalar factor of
-*> v(j) v(j)**H in the Householder transformation H(j) of
+*> v(j) v(j)* in the Householder transformation H(j) of
*> the product U = H(1)...H(n-2)
*> If ITYPE < 2, then TAU is not referenced.
*> \endverbatim
@@ -297,7 +294,7 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
IF( ITYPE.EQ.1 ) THEN
*
-* ITYPE=1: error = A - U S U**H
+* ITYPE=1: error = A - U S U*
*
CALL CLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
CALL CLACPY( CUPLO, N, N, A, LDA, WORK, N )
@@ -307,7 +304,8 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
10 CONTINUE
*
IF( N.GT.1 .AND. KBAND.EQ.1 ) THEN
- DO 20 J = 1, N - 1
+CMK DO 20 J = 1, N - 1
+ DO 20 J = 2, N - 1
CALL CHER2( CUPLO, N, -CMPLX( E( J ) ), U( 1, J ), 1,
$ U( 1, J-1 ), 1, WORK, N )
20 CONTINUE
@@ -316,7 +314,7 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
ELSE IF( ITYPE.EQ.2 ) THEN
*
-* ITYPE=2: error = V S V**H - A
+* ITYPE=2: error = V S V* - A
*
CALL CLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
*
@@ -373,7 +371,7 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
ELSE IF( ITYPE.EQ.3 ) THEN
*
-* ITYPE=3: error = U V**H - I
+* ITYPE=3: error = U V* - I
*
IF( N.LT.2 )
$ RETURN
@@ -409,7 +407,7 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
* Do Test 2
*
-* Compute U U**H - I
+* Compute UU* - I
*
IF( ITYPE.EQ.1 ) THEN
CALL CGEMM( 'N', 'C', N, N, N, CONE, U, LDU, U, LDU, CZERO,
diff --git a/TESTING/EIG/chpt21.f b/TESTING/EIG/chpt21.f
index 458079614..e151a8bd8 100644
--- a/TESTING/EIG/chpt21.f
+++ b/TESTING/EIG/chpt21.f
@@ -29,9 +29,8 @@
*>
*> CHPT21 generally checks a decomposition of the form
*>
-*> A = U S U**H
-*>
-*> where **H means conjugate transpose, A is hermitian, U is
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian, U is
*> unitary, and S is diagonal (if KBAND=0) or (real) symmetric
*> tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as
*> a dense matrix, otherwise the U is expressed as a product of
@@ -42,16 +41,15 @@
*>
*> Specifically, if ITYPE=1, then:
*>
-*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
-*> RESULT(2) = | I - U U**H | / ( n ulp )
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
*>
*> If ITYPE=2, then:
*>
-*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
*>
*> If ITYPE=3, then:
*>
-*> RESULT(1) = | I - U V**H | / ( n ulp )
+*> RESULT(1) = | I - UV* | / ( n ulp )
*>
*> Packed storage means that, for example, if UPLO='U', then the columns
*> of the upper triangle of A are stored one after another, so that
@@ -72,16 +70,14 @@
*>
*> If UPLO='U', then V = H(n-1)...H(1), where
*>
-*> H(j) = I - tau(j) v(j) v(j)**H
-*>
+*> H(j) = I - tau(j) v(j) v(j)C>
*> and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
*> (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
*> the j-th element is 1, and the last n-j elements are 0.
*>
*> If UPLO='L', then V = H(1)...H(n-1), where
*>
-*> H(j) = I - tau(j) v(j) v(j)**H
-*>
+*> H(j) = I - tau(j) v(j) v(j)C>
*> and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
*> (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
*> in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
@@ -95,15 +91,14 @@
*> ITYPE is INTEGER
*> Specifies the type of tests to be performed.
*> 1: U expressed as a dense unitary matrix:
-*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
-*> RESULT(2) = | I - U U**H | / ( n ulp )
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
*>
*> 2: U expressed as a product V of Housholder transformations:
-*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
*>
*> 3: U expressed both as a dense unitary matrix and
*> as a product of Housholder transformations:
-*> RESULT(1) = | I - U V**H | / ( n ulp )
+*> RESULT(1) = | I - UV* | / ( n ulp )
*> \endverbatim
*>
*> \param[in] UPLO
@@ -186,7 +181,7 @@
*> \verbatim
*> TAU is COMPLEX array, dimension (N)
*> If ITYPE >= 2, then TAU(j) is the scalar factor of
-*> v(j) v(j)**H in the Householder transformation H(j) of
+*> v(j) v(j)* in the Householder transformation H(j) of
*> the product U = H(1)...H(n-2)
*> If ITYPE < 2, then TAU is not referenced.
*> \endverbatim
@@ -318,7 +313,7 @@ SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
IF( ITYPE.EQ.1 ) THEN
*
-* ITYPE=1: error = A - U S U**H
+* ITYPE=1: error = A - U S U*
*
CALL CLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
CALL CCOPY( LAP, AP, 1, WORK, 1 )
@@ -328,7 +323,7 @@ SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
10 CONTINUE
*
IF( N.GT.1 .AND. KBAND.EQ.1 ) THEN
- DO 20 J = 1, N - 1
+ DO 20 J = 2, N - 1
CALL CHPR2( CUPLO, N, -CMPLX( E( J ) ), U( 1, J ), 1,
$ U( 1, J-1 ), 1, WORK )
20 CONTINUE
@@ -337,7 +332,7 @@ SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
ELSE IF( ITYPE.EQ.2 ) THEN
*
-* ITYPE=2: error = V S V**H - A
+* ITYPE=2: error = V S V* - A
*
CALL CLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
*
@@ -405,7 +400,7 @@ SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
ELSE IF( ITYPE.EQ.3 ) THEN
*
-* ITYPE=3: error = U V**H - I
+* ITYPE=3: error = U V* - I
*
IF( N.LT.2 )
$ RETURN
@@ -436,7 +431,7 @@ SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
* Do Test 2
*
-* Compute U U**H - I
+* Compute UU* - I
*
IF( ITYPE.EQ.1 ) THEN
CALL CGEMM( 'N', 'C', N, N, N, CONE, U, LDU, U, LDU, CZERO,
diff --git a/TESTING/EIG/zhet21.f b/TESTING/EIG/zhet21.f
index 11f94c63b..f6cb2d70a 100644
--- a/TESTING/EIG/zhet21.f
+++ b/TESTING/EIG/zhet21.f
@@ -29,9 +29,8 @@
*>
*> ZHET21 generally checks a decomposition of the form
*>
-*> A = U S U**H
-*>
-*> where **H means conjugate transpose, A is hermitian, U is unitary, and
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian, U is unitary, and
*> S is diagonal (if KBAND=0) or (real) symmetric tridiagonal (if
*> KBAND=1).
*>
@@ -43,19 +42,18 @@
*>
*> Specifically, if ITYPE=1, then:
*>
-*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
-*> RESULT(2) = | I - U U**H | / ( n ulp )
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
*>
*> If ITYPE=2, then:
*>
-*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
*>
*> If ITYPE=3, then:
*>
-*> RESULT(1) = | I - U V**H | / ( n ulp )
+*> RESULT(1) = | I - UV* | / ( n ulp )
*>
*> For ITYPE > 1, the transformation U is expressed as a product
-*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)**H and each
+*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)C> and each
*> vector v(j) has its first j elements 0 and the remaining n-j elements
*> stored in V(j+1:n,j).
*> \endverbatim
@@ -68,15 +66,14 @@
*> ITYPE is INTEGER
*> Specifies the type of tests to be performed.
*> 1: U expressed as a dense unitary matrix:
-*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
-*> RESULT(2) = | I - U U**H | / ( n ulp )
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
*>
*> 2: U expressed as a product V of Housholder transformations:
-*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
*>
*> 3: U expressed both as a dense unitary matrix and
*> as a product of Housholder transformations:
-*> RESULT(1) = | I - U V**H | / ( n ulp )
+*> RESULT(1) = | I - UV* | / ( n ulp )
*> \endverbatim
*>
*> \param[in] UPLO
@@ -174,7 +171,7 @@
*> \verbatim
*> TAU is COMPLEX*16 array, dimension (N)
*> If ITYPE >= 2, then TAU(j) is the scalar factor of
-*> v(j) v(j)**H in the Householder transformation H(j) of
+*> v(j) v(j)* in the Householder transformation H(j) of
*> the product U = H(1)...H(n-2)
*> If ITYPE < 2, then TAU is not referenced.
*> \endverbatim
@@ -297,7 +294,7 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
IF( ITYPE.EQ.1 ) THEN
*
-* ITYPE=1: error = A - U S U**H
+* ITYPE=1: error = A - U S U*
*
CALL ZLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
CALL ZLACPY( CUPLO, N, N, A, LDA, WORK, N )
@@ -307,7 +304,8 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
10 CONTINUE
*
IF( N.GT.1 .AND. KBAND.EQ.1 ) THEN
- DO 20 J = 1, N - 1
+CMK DO 20 J = 1, N - 1
+ DO 20 J = 2, N - 1
CALL ZHER2( CUPLO, N, -DCMPLX( E( J ) ), U( 1, J ), 1,
$ U( 1, J-1 ), 1, WORK, N )
20 CONTINUE
@@ -316,7 +314,7 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
ELSE IF( ITYPE.EQ.2 ) THEN
*
-* ITYPE=2: error = V S V**H - A
+* ITYPE=2: error = V S V* - A
*
CALL ZLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
*
@@ -373,7 +371,7 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
ELSE IF( ITYPE.EQ.3 ) THEN
*
-* ITYPE=3: error = U V**H - I
+* ITYPE=3: error = U V* - I
*
IF( N.LT.2 )
$ RETURN
@@ -409,7 +407,7 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
* Do Test 2
*
-* Compute U U**H - I
+* Compute UU* - I
*
IF( ITYPE.EQ.1 ) THEN
CALL ZGEMM( 'N', 'C', N, N, N, CONE, U, LDU, U, LDU, CZERO,
diff --git a/TESTING/EIG/zhpt21.f b/TESTING/EIG/zhpt21.f
index 909ec8a02..ef9e4418d 100644
--- a/TESTING/EIG/zhpt21.f
+++ b/TESTING/EIG/zhpt21.f
@@ -29,9 +29,8 @@
*>
*> ZHPT21 generally checks a decomposition of the form
*>
-*> A = U S U**H
-*>
-*> where **H means conjugate transpose, A is hermitian, U is
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian, U is
*> unitary, and S is diagonal (if KBAND=0) or (real) symmetric
*> tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as
*> a dense matrix, otherwise the U is expressed as a product of
@@ -42,16 +41,15 @@
*>
*> Specifically, if ITYPE=1, then:
*>
-*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
-*> RESULT(2) = | I - U U**H | / ( n ulp )
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
*>
*> If ITYPE=2, then:
*>
-*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
*>
*> If ITYPE=3, then:
*>
-*> RESULT(1) = | I - U V**H | / ( n ulp )
+*> RESULT(1) = | I - UV* | / ( n ulp )
*>
*> Packed storage means that, for example, if UPLO='U', then the columns
*> of the upper triangle of A are stored one after another, so that
@@ -72,16 +70,14 @@
*>
*> If UPLO='U', then V = H(n-1)...H(1), where
*>
-*> H(j) = I - tau(j) v(j) v(j)**H
-*>
+*> H(j) = I - tau(j) v(j) v(j)C>
*> and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
*> (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
*> the j-th element is 1, and the last n-j elements are 0.
*>
*> If UPLO='L', then V = H(1)...H(n-1), where
*>
-*> H(j) = I - tau(j) v(j) v(j)**H
-*>
+*> H(j) = I - tau(j) v(j) v(j)C>
*> and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
*> (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
*> in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
@@ -95,15 +91,14 @@
*> ITYPE is INTEGER
*> Specifies the type of tests to be performed.
*> 1: U expressed as a dense unitary matrix:
-*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
-*> RESULT(2) = | I - U U**H | / ( n ulp )
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
*>
*> 2: U expressed as a product V of Housholder transformations:
-*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
*>
*> 3: U expressed both as a dense unitary matrix and
*> as a product of Housholder transformations:
-*> RESULT(1) = | I - U V**H | / ( n ulp )
+*> RESULT(1) = | I - UV* | / ( n ulp )
*> \endverbatim
*>
*> \param[in] UPLO
@@ -186,7 +181,7 @@
*> \verbatim
*> TAU is COMPLEX*16 array, dimension (N)
*> If ITYPE >= 2, then TAU(j) is the scalar factor of
-*> v(j) v(j)**H in the Householder transformation H(j) of
+*> v(j) v(j)* in the Householder transformation H(j) of
*> the product U = H(1)...H(n-2)
*> If ITYPE < 2, then TAU is not referenced.
*> \endverbatim
@@ -318,7 +313,7 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
IF( ITYPE.EQ.1 ) THEN
*
-* ITYPE=1: error = A - U S U**H
+* ITYPE=1: error = A - U S U*
*
CALL ZLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
CALL ZCOPY( LAP, AP, 1, WORK, 1 )
@@ -328,7 +323,8 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
10 CONTINUE
*
IF( N.GT.1 .AND. KBAND.EQ.1 ) THEN
- DO 20 J = 1, N - 1
+CMK DO 20 J = 1, N - 1
+ DO 20 J = 2, N - 1
CALL ZHPR2( CUPLO, N, -DCMPLX( E( J ) ), U( 1, J ), 1,
$ U( 1, J-1 ), 1, WORK )
20 CONTINUE
@@ -337,7 +333,7 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
ELSE IF( ITYPE.EQ.2 ) THEN
*
-* ITYPE=2: error = V S V**H - A
+* ITYPE=2: error = V S V* - A
*
CALL ZLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
*
@@ -405,7 +401,7 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
ELSE IF( ITYPE.EQ.3 ) THEN
*
-* ITYPE=3: error = U V**H - I
+* ITYPE=3: error = U V* - I
*
IF( N.LT.2 )
$ RETURN
@@ -436,7 +432,7 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
* Do Test 2
*
-* Compute U U**H - I
+* Compute UU* - I
*
IF( ITYPE.EQ.1 ) THEN
CALL ZGEMM( 'N', 'C', N, N, N, CONE, U, LDU, U, LDU, CZERO,
From d7be8c7220273c827813e9394f5e681b1e32d7a8 Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Tue, 31 Dec 2019 13:40:06 +0100
Subject: [PATCH 2/2] Rebase on 3.9.0
---
TESTING/EIG/chet21.f | 32 +++++++++++++++++---------------
TESTING/EIG/chpt21.f | 35 ++++++++++++++++++++---------------
TESTING/EIG/zhet21.f | 32 +++++++++++++++++---------------
TESTING/EIG/zhpt21.f | 36 ++++++++++++++++++++----------------
4 files changed, 74 insertions(+), 61 deletions(-)
diff --git a/TESTING/EIG/chet21.f b/TESTING/EIG/chet21.f
index 5aff64904..d5c4f1348 100644
--- a/TESTING/EIG/chet21.f
+++ b/TESTING/EIG/chet21.f
@@ -29,8 +29,9 @@
*>
*> CHET21 generally checks a decomposition of the form
*>
-*> A = U S UC>
-*> where * means conjugate transpose, A is hermitian, U is unitary, and
+*> A = U S U**H
+*>
+*> where **H means conjugate transpose, A is hermitian, U is unitary, and
*> S is diagonal (if KBAND=0) or (real) symmetric tridiagonal (if
*> KBAND=1).
*>
@@ -42,18 +43,19 @@
*>
*> Specifically, if ITYPE=1, then:
*>
-*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
+*> RESULT(2) = | I - U U**H | / ( n ulp )
*>
*> If ITYPE=2, then:
*>
-*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
*>
*> If ITYPE=3, then:
*>
-*> RESULT(1) = | I - UV* | / ( n ulp )
+*> RESULT(1) = | I - U V**H | / ( n ulp )
*>
*> For ITYPE > 1, the transformation U is expressed as a product
-*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)C> and each
+*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)**H and each
*> vector v(j) has its first j elements 0 and the remaining n-j elements
*> stored in V(j+1:n,j).
*> \endverbatim
@@ -66,14 +68,15 @@
*> ITYPE is INTEGER
*> Specifies the type of tests to be performed.
*> 1: U expressed as a dense unitary matrix:
-*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
+*> RESULT(2) = | I - U U**H | / ( n ulp )
*>
*> 2: U expressed as a product V of Housholder transformations:
-*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
*>
*> 3: U expressed both as a dense unitary matrix and
*> as a product of Housholder transformations:
-*> RESULT(1) = | I - UV* | / ( n ulp )
+*> RESULT(1) = | I - U V**H | / ( n ulp )
*> \endverbatim
*>
*> \param[in] UPLO
@@ -171,7 +174,7 @@
*> \verbatim
*> TAU is COMPLEX array, dimension (N)
*> If ITYPE >= 2, then TAU(j) is the scalar factor of
-*> v(j) v(j)* in the Householder transformation H(j) of
+*> v(j) v(j)**H in the Householder transformation H(j) of
*> the product U = H(1)...H(n-2)
*> If ITYPE < 2, then TAU is not referenced.
*> \endverbatim
@@ -294,7 +297,7 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
IF( ITYPE.EQ.1 ) THEN
*
-* ITYPE=1: error = A - U S U*
+* ITYPE=1: error = A - U S U**H
*
CALL CLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
CALL CLACPY( CUPLO, N, N, A, LDA, WORK, N )
@@ -304,7 +307,6 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
10 CONTINUE
*
IF( N.GT.1 .AND. KBAND.EQ.1 ) THEN
-CMK DO 20 J = 1, N - 1
DO 20 J = 2, N - 1
CALL CHER2( CUPLO, N, -CMPLX( E( J ) ), U( 1, J ), 1,
$ U( 1, J-1 ), 1, WORK, N )
@@ -314,7 +316,7 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
ELSE IF( ITYPE.EQ.2 ) THEN
*
-* ITYPE=2: error = V S V* - A
+* ITYPE=2: error = V S V**H - A
*
CALL CLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
*
@@ -371,7 +373,7 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
ELSE IF( ITYPE.EQ.3 ) THEN
*
-* ITYPE=3: error = U V* - I
+* ITYPE=3: error = U V**H - I
*
IF( N.LT.2 )
$ RETURN
@@ -407,7 +409,7 @@ SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
* Do Test 2
*
-* Compute UU* - I
+* Compute U U**H - I
*
IF( ITYPE.EQ.1 ) THEN
CALL CGEMM( 'N', 'C', N, N, N, CONE, U, LDU, U, LDU, CZERO,
diff --git a/TESTING/EIG/chpt21.f b/TESTING/EIG/chpt21.f
index e151a8bd8..f20921bd9 100644
--- a/TESTING/EIG/chpt21.f
+++ b/TESTING/EIG/chpt21.f
@@ -29,8 +29,9 @@
*>
*> CHPT21 generally checks a decomposition of the form
*>
-*> A = U S UC>
-*> where * means conjugate transpose, A is hermitian, U is
+*> A = U S U**H
+*>
+*> where **H means conjugate transpose, A is hermitian, U is
*> unitary, and S is diagonal (if KBAND=0) or (real) symmetric
*> tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as
*> a dense matrix, otherwise the U is expressed as a product of
@@ -41,15 +42,16 @@
*>
*> Specifically, if ITYPE=1, then:
*>
-*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
+*> RESULT(2) = | I - U U**H | / ( n ulp )
*>
*> If ITYPE=2, then:
*>
-*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
*>
*> If ITYPE=3, then:
*>
-*> RESULT(1) = | I - UV* | / ( n ulp )
+*> RESULT(1) = | I - U V**H | / ( n ulp )
*>
*> Packed storage means that, for example, if UPLO='U', then the columns
*> of the upper triangle of A are stored one after another, so that
@@ -70,14 +72,16 @@
*>
*> If UPLO='U', then V = H(n-1)...H(1), where
*>
-*> H(j) = I - tau(j) v(j) v(j)C>
+*> H(j) = I - tau(j) v(j) v(j)**H
+*>
*> and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
*> (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
*> the j-th element is 1, and the last n-j elements are 0.
*>
*> If UPLO='L', then V = H(1)...H(n-1), where
*>
-*> H(j) = I - tau(j) v(j) v(j)C>
+*> H(j) = I - tau(j) v(j) v(j)**H
+*>
*> and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
*> (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
*> in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
@@ -91,14 +95,15 @@
*> ITYPE is INTEGER
*> Specifies the type of tests to be performed.
*> 1: U expressed as a dense unitary matrix:
-*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
+*> RESULT(2) = | I - U U**H | / ( n ulp )
*>
*> 2: U expressed as a product V of Housholder transformations:
-*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
*>
*> 3: U expressed both as a dense unitary matrix and
*> as a product of Housholder transformations:
-*> RESULT(1) = | I - UV* | / ( n ulp )
+*> RESULT(1) = | I - U V**H | / ( n ulp )
*> \endverbatim
*>
*> \param[in] UPLO
@@ -181,7 +186,7 @@
*> \verbatim
*> TAU is COMPLEX array, dimension (N)
*> If ITYPE >= 2, then TAU(j) is the scalar factor of
-*> v(j) v(j)* in the Householder transformation H(j) of
+*> v(j) v(j)**H in the Householder transformation H(j) of
*> the product U = H(1)...H(n-2)
*> If ITYPE < 2, then TAU is not referenced.
*> \endverbatim
@@ -313,7 +318,7 @@ SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
IF( ITYPE.EQ.1 ) THEN
*
-* ITYPE=1: error = A - U S U*
+* ITYPE=1: error = A - U S U**H
*
CALL CLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
CALL CCOPY( LAP, AP, 1, WORK, 1 )
@@ -332,7 +337,7 @@ SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
ELSE IF( ITYPE.EQ.2 ) THEN
*
-* ITYPE=2: error = V S V* - A
+* ITYPE=2: error = V S V**H - A
*
CALL CLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
*
@@ -400,7 +405,7 @@ SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
ELSE IF( ITYPE.EQ.3 ) THEN
*
-* ITYPE=3: error = U V* - I
+* ITYPE=3: error = U V**H - I
*
IF( N.LT.2 )
$ RETURN
@@ -431,7 +436,7 @@ SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
* Do Test 2
*
-* Compute UU* - I
+* Compute U U**H - I
*
IF( ITYPE.EQ.1 ) THEN
CALL CGEMM( 'N', 'C', N, N, N, CONE, U, LDU, U, LDU, CZERO,
diff --git a/TESTING/EIG/zhet21.f b/TESTING/EIG/zhet21.f
index f6cb2d70a..cb854a850 100644
--- a/TESTING/EIG/zhet21.f
+++ b/TESTING/EIG/zhet21.f
@@ -29,8 +29,9 @@
*>
*> ZHET21 generally checks a decomposition of the form
*>
-*> A = U S UC>
-*> where * means conjugate transpose, A is hermitian, U is unitary, and
+*> A = U S U**H
+*>
+*> where **H means conjugate transpose, A is hermitian, U is unitary, and
*> S is diagonal (if KBAND=0) or (real) symmetric tridiagonal (if
*> KBAND=1).
*>
@@ -42,18 +43,19 @@
*>
*> Specifically, if ITYPE=1, then:
*>
-*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
+*> RESULT(2) = | I - U U**H | / ( n ulp )
*>
*> If ITYPE=2, then:
*>
-*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
*>
*> If ITYPE=3, then:
*>
-*> RESULT(1) = | I - UV* | / ( n ulp )
+*> RESULT(1) = | I - U V**H | / ( n ulp )
*>
*> For ITYPE > 1, the transformation U is expressed as a product
-*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)C> and each
+*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)**H and each
*> vector v(j) has its first j elements 0 and the remaining n-j elements
*> stored in V(j+1:n,j).
*> \endverbatim
@@ -66,14 +68,15 @@
*> ITYPE is INTEGER
*> Specifies the type of tests to be performed.
*> 1: U expressed as a dense unitary matrix:
-*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
+*> RESULT(2) = | I - U U**H | / ( n ulp )
*>
*> 2: U expressed as a product V of Housholder transformations:
-*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
*>
*> 3: U expressed both as a dense unitary matrix and
*> as a product of Housholder transformations:
-*> RESULT(1) = | I - UV* | / ( n ulp )
+*> RESULT(1) = | I - U V**H | / ( n ulp )
*> \endverbatim
*>
*> \param[in] UPLO
@@ -171,7 +174,7 @@
*> \verbatim
*> TAU is COMPLEX*16 array, dimension (N)
*> If ITYPE >= 2, then TAU(j) is the scalar factor of
-*> v(j) v(j)* in the Householder transformation H(j) of
+*> v(j) v(j)**H in the Householder transformation H(j) of
*> the product U = H(1)...H(n-2)
*> If ITYPE < 2, then TAU is not referenced.
*> \endverbatim
@@ -294,7 +297,7 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
IF( ITYPE.EQ.1 ) THEN
*
-* ITYPE=1: error = A - U S U*
+* ITYPE=1: error = A - U S U**H
*
CALL ZLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
CALL ZLACPY( CUPLO, N, N, A, LDA, WORK, N )
@@ -304,7 +307,6 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
10 CONTINUE
*
IF( N.GT.1 .AND. KBAND.EQ.1 ) THEN
-CMK DO 20 J = 1, N - 1
DO 20 J = 2, N - 1
CALL ZHER2( CUPLO, N, -DCMPLX( E( J ) ), U( 1, J ), 1,
$ U( 1, J-1 ), 1, WORK, N )
@@ -314,7 +316,7 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
ELSE IF( ITYPE.EQ.2 ) THEN
*
-* ITYPE=2: error = V S V* - A
+* ITYPE=2: error = V S V**H - A
*
CALL ZLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
*
@@ -371,7 +373,7 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
ELSE IF( ITYPE.EQ.3 ) THEN
*
-* ITYPE=3: error = U V* - I
+* ITYPE=3: error = U V**H - I
*
IF( N.LT.2 )
$ RETURN
@@ -407,7 +409,7 @@ SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
*
* Do Test 2
*
-* Compute UU* - I
+* Compute U U**H - I
*
IF( ITYPE.EQ.1 ) THEN
CALL ZGEMM( 'N', 'C', N, N, N, CONE, U, LDU, U, LDU, CZERO,
diff --git a/TESTING/EIG/zhpt21.f b/TESTING/EIG/zhpt21.f
index ef9e4418d..825d387c7 100644
--- a/TESTING/EIG/zhpt21.f
+++ b/TESTING/EIG/zhpt21.f
@@ -29,8 +29,9 @@
*>
*> ZHPT21 generally checks a decomposition of the form
*>
-*> A = U S UC>
-*> where * means conjugate transpose, A is hermitian, U is
+*> A = U S U**H
+*>
+*> where **H means conjugate transpose, A is hermitian, U is
*> unitary, and S is diagonal (if KBAND=0) or (real) symmetric
*> tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as
*> a dense matrix, otherwise the U is expressed as a product of
@@ -41,15 +42,16 @@
*>
*> Specifically, if ITYPE=1, then:
*>
-*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
+*> RESULT(2) = | I - U U**H | / ( n ulp )
*>
*> If ITYPE=2, then:
*>
-*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
*>
*> If ITYPE=3, then:
*>
-*> RESULT(1) = | I - UV* | / ( n ulp )
+*> RESULT(1) = | I - U V**H | / ( n ulp )
*>
*> Packed storage means that, for example, if UPLO='U', then the columns
*> of the upper triangle of A are stored one after another, so that
@@ -70,14 +72,16 @@
*>
*> If UPLO='U', then V = H(n-1)...H(1), where
*>
-*> H(j) = I - tau(j) v(j) v(j)C>
+*> H(j) = I - tau(j) v(j) v(j)**H
+*>
*> and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
*> (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
*> the j-th element is 1, and the last n-j elements are 0.
*>
*> If UPLO='L', then V = H(1)...H(n-1), where
*>
-*> H(j) = I - tau(j) v(j) v(j)C>
+*> H(j) = I - tau(j) v(j) v(j)**H
+*>
*> and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
*> (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
*> in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
@@ -91,14 +95,15 @@
*> ITYPE is INTEGER
*> Specifies the type of tests to be performed.
*> 1: U expressed as a dense unitary matrix:
-*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> RESULT(1) = | A - U S U**H | / ( |A| n ulp ) and
+*> RESULT(2) = | I - U U**H | / ( n ulp )
*>
*> 2: U expressed as a product V of Housholder transformations:
-*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> RESULT(1) = | A - V S V**H | / ( |A| n ulp )
*>
*> 3: U expressed both as a dense unitary matrix and
*> as a product of Housholder transformations:
-*> RESULT(1) = | I - UV* | / ( n ulp )
+*> RESULT(1) = | I - U V**H | / ( n ulp )
*> \endverbatim
*>
*> \param[in] UPLO
@@ -181,7 +186,7 @@
*> \verbatim
*> TAU is COMPLEX*16 array, dimension (N)
*> If ITYPE >= 2, then TAU(j) is the scalar factor of
-*> v(j) v(j)* in the Householder transformation H(j) of
+*> v(j) v(j)**H in the Householder transformation H(j) of
*> the product U = H(1)...H(n-2)
*> If ITYPE < 2, then TAU is not referenced.
*> \endverbatim
@@ -313,7 +318,7 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
IF( ITYPE.EQ.1 ) THEN
*
-* ITYPE=1: error = A - U S U*
+* ITYPE=1: error = A - U S U**H
*
CALL ZLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
CALL ZCOPY( LAP, AP, 1, WORK, 1 )
@@ -323,7 +328,6 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
10 CONTINUE
*
IF( N.GT.1 .AND. KBAND.EQ.1 ) THEN
-CMK DO 20 J = 1, N - 1
DO 20 J = 2, N - 1
CALL ZHPR2( CUPLO, N, -DCMPLX( E( J ) ), U( 1, J ), 1,
$ U( 1, J-1 ), 1, WORK )
@@ -333,7 +337,7 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
ELSE IF( ITYPE.EQ.2 ) THEN
*
-* ITYPE=2: error = V S V* - A
+* ITYPE=2: error = V S V**H - A
*
CALL ZLASET( 'Full', N, N, CZERO, CZERO, WORK, N )
*
@@ -401,7 +405,7 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
ELSE IF( ITYPE.EQ.3 ) THEN
*
-* ITYPE=3: error = U V* - I
+* ITYPE=3: error = U V**H - I
*
IF( N.LT.2 )
$ RETURN
@@ -432,7 +436,7 @@ SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
*
* Do Test 2
*
-* Compute UU* - I
+* Compute U U**H - I
*
IF( ITYPE.EQ.1 ) THEN
CALL ZGEMM( 'N', 'C', N, N, N, CONE, U, LDU, U, LDU, CZERO,

View File

@ -0,0 +1,39 @@
From 489a2884c22e8593ec47bfe7c84ab451b0c0d3d9 Mon Sep 17 00:00:00 2001
From: Julien Schueller <schueller@phimeca.com>
Date: Mon, 25 Nov 2019 19:41:16 +0100
Subject: [PATCH] Fix MinGW build error
With MinGW the build fails for some LAPACKE xgesvd routines with:
lapacke_cgesvdq.c:74:5: error: aggregate value used where an integer was expected
Seems the C2INT macro is useful there.
---
LAPACKE/src/lapacke_cgesvdq.c | 2 +-
LAPACKE/src/lapacke_zgesvdq.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/LAPACKE/src/lapacke_cgesvdq.c b/LAPACKE/src/lapacke_cgesvdq.c
index 801569453..6ecd06962 100644
--- a/LAPACKE/src/lapacke_cgesvdq.c
+++ b/LAPACKE/src/lapacke_cgesvdq.c
@@ -71,7 +71,7 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp,
goto exit_level_0;
}
liwork = (lapack_int)iwork_query;
- lcwork = (lapack_int)cwork_query;
+ lcwork = LAPACK_C2INT(cwork_query);
lrwork = (lapack_int)rwork_query;
/* Allocate memory for work arrays */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
diff --git a/LAPACKE/src/lapacke_zgesvdq.c b/LAPACKE/src/lapacke_zgesvdq.c
index 7c205dab3..1674138fc 100644
--- a/LAPACKE/src/lapacke_zgesvdq.c
+++ b/LAPACKE/src/lapacke_zgesvdq.c
@@ -71,7 +71,7 @@ lapack_int LAPACKE_zgesvdq( int matrix_layout, char joba, char jobp,
goto exit_level_0;
}
liwork = (lapack_int)iwork_query;
- lcwork = (lapack_int)cwork_query;
+ lcwork = LAPACK_C2INT(cwork_query);
lrwork = (lapack_int)rwork_query;
/* Allocate memory for work arrays */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );

View File

@ -0,0 +1,81 @@
From 0631b6beaed60ba118b0b027c0f8d35397bf5df0 Mon Sep 17 00:00:00 2001
From: Keno Fischer <keno@juliacomputing.com>
Date: Thu, 30 Sep 2021 03:51:23 -0400
Subject: [PATCH] Fix out of bounds read in slarrv
This was originally reported as https://github.com/JuliaLang/julia/issues/42415.
I've tracked this down to an our of bounds read on the following line:
https://github.com/Reference-LAPACK/lapack/blob/44ecb6a5ff821b1cbb39f8cc2166cb098e060b4d/SRC/slarrv.f#L423
In the crashing example, `M` is `0`, causing `slarrv` to read uninitialized
memory from the work array. I believe the `0` for `M` is correct and indeed,
the documentation above supports that `M` may be zero:
https://github.com/Reference-LAPACK/lapack/blob/44ecb6a5ff821b1cbb39f8cc2166cb098e060b4d/SRC/slarrv.f#L113-L116
I believe it may be sufficient to early-out this function as suggested
in this PR. However, I have limited context for the full routine here,
so I would appreciate a sanity check.
---
SRC/clarrv.f | 2 +-
SRC/dlarrv.f | 2 +-
SRC/slarrv.f | 2 +-
SRC/zlarrv.f | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/SRC/clarrv.f b/SRC/clarrv.f
index 1f09e4da6..42f710757 100644
--- a/SRC/clarrv.f
+++ b/SRC/clarrv.f
@@ -348,7 +348,7 @@
*
* Quick return if possible
*
- IF( N.LE.0 ) THEN
+ IF( (N.LE.0).OR.(M.LE.0) ) THEN
RETURN
END IF
*
diff --git a/SRC/dlarrv.f b/SRC/dlarrv.f
index b036c1e66..299430361 100644
--- a/SRC/dlarrv.f
+++ b/SRC/dlarrv.f
@@ -350,7 +350,7 @@
*
* Quick return if possible
*
- IF( N.LE.0 ) THEN
+ IF( (N.LE.0).OR.(M.LE.0) ) THEN
RETURN
END IF
*
diff --git a/SRC/slarrv.f b/SRC/slarrv.f
index 9d72b339a..95f94fd1b 100644
--- a/SRC/slarrv.f
+++ b/SRC/slarrv.f
@@ -350,7 +350,7 @@
*
* Quick return if possible
*
- IF( N.LE.0 ) THEN
+ IF( (N.LE.0).OR.(M.LE.0) ) THEN
RETURN
END IF
*
diff --git a/SRC/zlarrv.f b/SRC/zlarrv.f
index 51ec558f5..e4be63e0d 100644
--- a/SRC/zlarrv.f
+++ b/SRC/zlarrv.f
@@ -348,7 +348,7 @@
*
* Quick return if possible
*
- IF( N.LE.0 ) THEN
+ IF( (N.LE.0).OR.(M.LE.0) ) THEN
RETURN
END IF
*
--
2.31.1

View File

@ -0,0 +1,55 @@
From d168b4d2ae678904fb659b3caf27bce668f544e4 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sun, 26 Apr 2020 00:57:37 +0200
Subject: [PATCH] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq
For LAPACKE_cgesvdq, align datatype of `rwork` with lapacke.h and callsite
in LAPACKE_cgesvdq_work; both of the latter use `float* rwork`, so there's
no need to calculate with doubles that only get downcast anyway.
Similarly, make the signature of lapacke_zgesvdq_work consistent across
lapack.h (modified here), the fortran side and lapacke_zgesvdq_work, see:
https://github.com/Reference-LAPACK/lapack/blob/v3.9.0/LAPACKE/src/lapacke_zgesvdq_work.c#L42
https://github.com/Reference-LAPACK/lapack/blob/v3.9.0/SRC/zgesvdq.f#L422
---
LAPACKE/include/lapack.h | 2 +-
LAPACKE/src/lapacke_cgesvdq.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/LAPACKE/include/lapack.h b/LAPACKE/include/lapack.h
index 4f48b7c87..c045892df 100644
--- a/LAPACKE/include/lapack.h
+++ b/LAPACKE/include/lapack.h
@@ -2513,7 +2513,7 @@ void LAPACK_zgesvdq(
lapack_complex_double* U, lapack_int const* ldu,
lapack_complex_double* V, lapack_int const* ldv, lapack_int* numrank,
lapack_int* iwork, lapack_int const* liwork,
- lapack_complex_float* cwork, lapack_int* lcwork,
+ lapack_complex_double* cwork, lapack_int* lcwork,
double* rwork, lapack_int const* lrwork,
lapack_int* info );
diff --git a/LAPACKE/src/lapacke_cgesvdq.c b/LAPACKE/src/lapacke_cgesvdq.c
index 91458136c..c5eca535e 100644
--- a/LAPACKE/src/lapacke_cgesvdq.c
+++ b/LAPACKE/src/lapacke_cgesvdq.c
@@ -47,8 +47,8 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp,
lapack_complex_float* cwork = NULL;
lapack_complex_float cwork_query;
lapack_int lrwork = -1;
- double* rwork = NULL;
- double rwork_query;
+ float* rwork = NULL;
+ float rwork_query;
lapack_int i;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgesvdq", -1 );
@@ -84,7 +84,7 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp,
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
- rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
+ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;

View File

@ -0,0 +1,138 @@
From 87536aa3c8bb0af00f66088fb6ac05d87509e011 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@debian.org>
Date: Sat, 23 Nov 2019 12:22:20 +0100
Subject: [PATCH] Restore missing prototypes for deprecated LAPACK functions
Some LAPACK functions prototypes were inadvertedly dropped in 3.9.0. As a
consequence, LAPACKE has several unresolved symbols.
Closes #365
---
LAPACKE/include/lapack.h | 100 +++++++++++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+)
diff --git a/LAPACKE/include/lapack.h b/LAPACKE/include/lapack.h
index 3f425325f..5c131d844 100644
--- a/LAPACKE/include/lapack.h
+++ b/LAPACKE/include/lapack.h
@@ -1842,6 +1842,28 @@ void LAPACK_zgeqlf(
lapack_complex_double* work, lapack_int const* lwork,
lapack_int* info );
+#define LAPACK_sgeqpf LAPACK_GLOBAL(sgeqpf,SGEQPF)
+void LAPACK_sgeqpf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,
+ lapack_int* jpvt, float* tau, float* work,
+ lapack_int *info );
+
+#define LAPACK_dgeqpf LAPACK_GLOBAL(dgeqpf,DGEQPF)
+void LAPACK_dgeqpf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda,
+ lapack_int* jpvt, double* tau, double* work,
+ lapack_int *info );
+
+#define LAPACK_cgeqpf LAPACK_GLOBAL(cgeqpf,CGEQPF)
+void LAPACK_cgeqpf( lapack_int* m, lapack_int* n, lapack_complex_float* a,
+ lapack_int* lda, lapack_int* jpvt,
+ lapack_complex_float* tau, lapack_complex_float* work,
+ float* rwork, lapack_int *info );
+
+#define LAPACK_zgeqpf LAPACK_GLOBAL(zgeqpf,ZGEQPF)
+void LAPACK_zgeqpf( lapack_int* m, lapack_int* n, lapack_complex_double* a,
+ lapack_int* lda, lapack_int* jpvt,
+ lapack_complex_double* tau, lapack_complex_double* work,
+ double* rwork, lapack_int *info );
+
#define LAPACK_cgeqp3 LAPACK_GLOBAL(cgeqp3,CGEQP3)
void LAPACK_cgeqp3(
lapack_int const* m, lapack_int const* n,
@@ -3617,6 +3639,47 @@ void LAPACK_zggrqf(
lapack_complex_double* work, lapack_int const* lwork,
lapack_int* info );
+#define LAPACK_sggsvd LAPACK_GLOBAL(sggsvd,SGGSVD)
+lapack_int LAPACKE_sggsvd( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int n, lapack_int p,
+ lapack_int* k, lapack_int* l, float* a,
+ lapack_int lda, float* b, lapack_int ldb,
+ float* alpha, float* beta, float* u, lapack_int ldu,
+ float* v, lapack_int ldv, float* q, lapack_int ldq,
+ lapack_int* iwork );
+
+#define LAPACK_dggsvd LAPACK_GLOBAL(dggsvd,DGGSVD)
+lapack_int LAPACKE_dggsvd( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int n, lapack_int p,
+ lapack_int* k, lapack_int* l, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double* alpha, double* beta, double* u,
+ lapack_int ldu, double* v, lapack_int ldv, double* q,
+ lapack_int ldq, lapack_int* iwork );
+
+#define LAPACK_cggsvd LAPACK_GLOBAL(cggsvd,CGGSVD)
+lapack_int LAPACKE_cggsvd( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int n, lapack_int p,
+ lapack_int* k, lapack_int* l,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb,
+ float* alpha, float* beta, lapack_complex_float* u,
+ lapack_int ldu, lapack_complex_float* v,
+ lapack_int ldv, lapack_complex_float* q,
+ lapack_int ldq, lapack_int* iwork );
+
+#define LAPACK_zggsvd LAPACK_GLOBAL(zggsvd,ZGGSVD)
+lapack_int LAPACKE_zggsvd( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int n, lapack_int p,
+ lapack_int* k, lapack_int* l,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ double* alpha, double* beta,
+ lapack_complex_double* u, lapack_int ldu,
+ lapack_complex_double* v, lapack_int ldv,
+ lapack_complex_double* q, lapack_int ldq,
+ lapack_int* iwork );
+
#define LAPACK_cggsvd3 LAPACK_GLOBAL(cggsvd3,CGGSVD3)
void LAPACK_cggsvd3(
char const* jobu, char const* jobv, char const* jobq,
@@ -3679,6 +3742,43 @@ void LAPACK_zggsvd3(
lapack_int* iwork,
lapack_int* info );
+#define LAPACK_sggsvp LAPACK_GLOBAL(sggsvp,SGGSVP)
+lapack_int LAPACKE_sggsvp( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n, float* a,
+ lapack_int lda, float* b, lapack_int ldb, float tola,
+ float tolb, lapack_int* k, lapack_int* l, float* u,
+ lapack_int ldu, float* v, lapack_int ldv, float* q,
+ lapack_int ldq );
+
+#define LAPACK_dggsvp LAPACK_GLOBAL(dggsvp,DGGSVP)
+lapack_int LAPACKE_dggsvp( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n, double* a,
+ lapack_int lda, double* b, lapack_int ldb,
+ double tola, double tolb, lapack_int* k,
+ lapack_int* l, double* u, lapack_int ldu, double* v,
+ lapack_int ldv, double* q, lapack_int ldq );
+
+#define LAPACK_cggsvp LAPACK_GLOBAL(cggsvp,CGGSVP)
+lapack_int LAPACKE_cggsvp( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_complex_float* b, lapack_int ldb, float tola,
+ float tolb, lapack_int* k, lapack_int* l,
+ lapack_complex_float* u, lapack_int ldu,
+ lapack_complex_float* v, lapack_int ldv,
+ lapack_complex_float* q, lapack_int ldq );
+
+#define LAPACK_zggsvp LAPACK_GLOBAL(zggsvp,ZGGSVP)
+lapack_int LAPACKE_zggsvp( int matrix_layout, char jobu, char jobv, char jobq,
+ lapack_int m, lapack_int p, lapack_int n,
+ lapack_complex_double* a, lapack_int lda,
+ lapack_complex_double* b, lapack_int ldb,
+ double tola, double tolb, lapack_int* k,
+ lapack_int* l, lapack_complex_double* u,
+ lapack_int ldu, lapack_complex_double* v,
+ lapack_int ldv, lapack_complex_double* q,
+ lapack_int ldq );
+
#define LAPACK_cggsvp3 LAPACK_GLOBAL(cggsvp3,CGGSVP3)
void LAPACK_cggsvp3(
char const* jobu, char const* jobv, char const* jobq,

4
_multibuild Normal file
View File

@ -0,0 +1,4 @@
<multibuild>
<package>lapack-man</package>
</multibuild>

16
baselibs.conf Normal file
View File

@ -0,0 +1,16 @@
liblapack3
libblas3
libcblas3
liblapacke3
lapack-devel
requires -lapack-<targettype>
requires "liblapack3-<targettype> = <version>"
blas-devel
requires -blas-<targettype>
requires "libblas3-<targettype> = <version>"
cblas-devel
requires -cblas-<targettype>
requires "libcblas3-<targettype> = <version>"
lapacke-devel
requires -lapacke-<targettype>
requires "liblapacke3-<targettype> = <version>"

10
lapack-3.2.2.patch Normal file
View File

@ -0,0 +1,10 @@
Index: BLAS/SRC/Makefile
===================================================================
--- a/BLAS/SRC/Makefile.orig
+++ b/BLAS/SRC/Makefile
@@ -170,2 +170,5 @@ cleanobj:
cleanlib:
#rm -f $(BLASLIB) # May point to a system lib, e.g. -lblas
+
+dcabs1.o: dcabs1.f
+ $(FC) $(FFLAGS_NOOPT) -c $< -o $@

BIN
lapack-3.9.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

66
lapack-man.spec Normal file
View File

@ -0,0 +1,66 @@
#
# spec file for package lapack-man
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: lapack-man
%define _name lapack
Version: 3.9.0
Release: 0
Summary: Manpages for LAPACK and BLAS
License: BSD-3-Clause
Group: Documentation/Other
URL: http://www.netlib.org/lapack/
Source0: https://github.com/Reference-LAPACK/lapack/archive/v%{version}.tar.gz#/lapack-%{version}.tar.gz
BuildRequires: doxygen >= 1.7
BuildRequires: fdupes
# Merged blas-man into lapack-man with 3.8.0 update
Provides: blas-man = %{version}
Obsoletes: blas-man < %{version}
BuildArch: noarch
%description
The lapack-man package contains documentation for LAPACK
(Linear Algebra PACKage) and BLAS (Basic Linear Algebra
Subprograms) routines, in the form of man pages.
%prep
%setup -q -n %{_name}-%{version}
%build
cp make.inc.example make.inc
make man %{?_smp_mflags}
# Remove some intermediate files
rm -f DOCS/man/man3/_*_.3
rm -f DOCS/man/man3/{BLAS_,}SRC_xerbla{_array,}.f.3
# rename conflicting man pages
pushd DOCS/man/man3
mv MAX.3 lapack-MAX.3
mv MIN.3 lapack-MIN.3
popd
%install
install -d %{buildroot}%{_mandir}/man3
install -m 0644 DOCS/man/man3/*.3 %{buildroot}%{_mandir}/man3/
%fdupes %{buildroot}/%{_mandir}/man3/
%files
%doc %{_mandir}/man3/*.3%{?ext_man}
%changelog

545
lapack.changes Normal file
View File

@ -0,0 +1,545 @@
-------------------------------------------------------------------
Thu May 4 11:11:20 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
- Add _multibuild to define 2nd spec file as additional flavor.
Eliminates the need for source package links in OBS.
-------------------------------------------------------------------
Thu Feb 23 16:58:25 UTC 2023 - Egbert Eich <eich@suse.com>
- Set -mfpmath=sse for the entire build for ix86 platforms
on SLE/Leap. Since we build for x86_64, we know that sse
is available.
This helps to avoid effects from excess precision that
can be seen in the test suite.
On Factory we leave -ffloat-store for the test suite
only as this option comes at a performance penalty.
We may see precision related issues in the test suite
with future compilers regardless.
-------------------------------------------------------------------
Wed Feb 15 08:51:06 UTC 2023 - Egbert Eich <eich@suse.com>
- As a configurable option add tmglib code to the LAPACK librarly
and enable TMG in LAPACKE as the header files provide its API
(boo#1207989 & bsc#1087426).
- Fix update-alternatives for lapacke (bsc#1207358).
- Restore generic link for update-alternatives. This is usually
set by the update-alternatives and it is '%ghost'ed but rpmlint
complains.
- Move update-alternatives --remove to %%postun to stop rpmlint
from complaining.
- Removed useless - because never executed - %%postrans scriptlets.
- Added missing _%%{_arch} to update-alternative names.
- rpmlint complains anyway - this time about alternative-link-missing
- as it does not understand the _%%{_arch} endings: muffle with
rpmlintrc.
- Make arch-dependent generic names conditional.
-------------------------------------------------------------------
Fri Feb 10 00:32:30 UTC 2023 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Fix missing symbols for deprecated functions in LAPACK, add
Restore_missing_deprecated_prototypes.patch
- Add -Wl,--no-undefined when creating shared libraries,
to catch missing symbols during build
- Test fixes:
* Build test binaries during %build, run in %check
* Fix incorrect path for test output, to actually catch
any test failures
- Spec file cleanup:
* Do not rename blaslib, it is used for test binaries
* Use same commands for building lapacke as for other libs
* Remove unused FFLAGS_NOOP for test binaries
-------------------------------------------------------------------
Sun Feb 5 19:59:26 UTC 2023 - Egbert Eich <eich@suse.com>
- Remove unneeded links. These will be taken care of by the
update-alternatives. This will bring this package in sync
with openblas.
-------------------------------------------------------------------
Thu Feb 2 13:16:02 UTC 2023 - Richard Biener <rguenther@suse.com>
- Build deprecated functions again to avoid breaking the ABI.
(boo#1207989)
-------------------------------------------------------------------
Wed Jan 25 20:47:53 UTC 2023 - Egbert Eich <eich@suse.com>
- Make library links in the alternatives directory arch dependent.
This avoids conflicts when both 32-bit and 64-bit versions are
installed (boo#1207563).
-------------------------------------------------------------------
Tue Mar 15 14:20:50 UTC 2022 - Egbert Eich <eich@suse.com>
- Consolidate dummy links for update-alternatives bringing them
in sync with openblas. Add alternatives for lapacke.
-------------------------------------------------------------------
Mon Jan 3 08:34:37 UTC 2022 - Richard Biener <rguenther@suse.com>
- Add Fix-out-of-bounds-read.patch to fix out of bound reads when
user input is not validated properly. (bsc#1193562, CVE-2021-4048)
-------------------------------------------------------------------
Mon Jul 19 08:24:18 UTC 2021 - Ismail Dönmez <ismail@i10z.com>
- Rename conflicting MIN.3 and MAX.3 manpages into lapack-{MAX,MIN}.3
-------------------------------------------------------------------
Wed Jul 14 11:12:25 UTC 2021 - Dominique Leuenberger <dimstar@opensuse.org>
- Do not create the dummy files in /etc/alternatives during
%install: managed by update-alternatives and packaged as ghost.
-------------------------------------------------------------------
Mon May 10 14:25:33 UTC 2021 - Dirk Müller <dmueller@suse.com>
- stop owning directories provided by filesystem (bsc#1184786)
-------------------------------------------------------------------
Mon Oct 12 16:48:38 UTC 2020 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Update to version 3.9.0:
* LAPACK QR-preconditioned QR SVD method - xGESVDQ routines
* LAPACK Householder Reconstruction
- Add Avoid-out-of-bounds-accesses-in-complex-EIG-tests.patch
- Rebase lapack-3.2.2.patch
- Drop -std=legacy from fortran flags:
* add Fix-MinGW-build-error.patch
* add Fix-some-minor-inconsistencies-in-LAPACKE_czgesvdq.patch
- Remove pre_checkin.sh, remove lapack-man.changes copy
-------------------------------------------------------------------
Fri Oct 9 21:00:30 UTC 2020 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Build CBLAS from lapack package
* update baselibs.conf
- Clean up spec file:
* remove useless make cleanlib
* remove ineffective duplicated 'make ..lib' calls with deviating
opts, as the object files are not removed (fortuanately) the
existing PIC files are used for the static libraries
* remove fortran-only -std=legacy opt from CFLAGS
-------------------------------------------------------------------
Fri Oct 9 17:28:03 UTC 2020 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- lapack-man:
* Build manpages from same sources as the binaries (3.8.0) instead
of old 3.5.0.
* Merge blas-man package into lapack-man package. Avoids tedious
splitting of the two.
* Use fdupes macro instead of trying to deduplicate man pages
manually.
- Cleanup lapack spec:
* Remove conditionals for obsolete distro versions
* Only use python3-base instead of python3
* Drop old copy of lapack_testing.py as separate source
-------------------------------------------------------------------
Fri Mar 13 14:58:33 UTC 2020 - Martin Liška <mliska@suse.cz>
- Add -std=legacy in order to fix boo#1166619.
-------------------------------------------------------------------
Fri Aug 2 07:03:54 UTC 2019 - Martin Liška <mliska@suse.cz>
- Use FAT LTO objects in order to provide proper static library.
-------------------------------------------------------------------
Thu Mar 29 13:11:32 UTC 2018 - badshah400@gmail.com
- Update to version 3.8.0:
* Symmetric-indefinite Factorization: Aasens tridiagonalization
2 stage.
* LAPACKE interfaces.
- Static -pic libraries are no longer built.
-------------------------------------------------------------------
Fri Jan 12 14:29:36 UTC 2018 - rguenther@suse.com
- Package lapack_testing.py from lapack 3.8.0 with adjusted interpreter
and adjust BuildRequires to python3. [bnc#1075766]
-------------------------------------------------------------------
Wed May 31 21:39:51 UTC 2017 - jengelh@inai.de
- Correct RPM groups
-------------------------------------------------------------------
Wed May 17 22:59:46 UTC 2017 - dimstar@opensuse.org
- Build the man pages in a separate .spec file (lapack-man). The
resulting rpm names are kept identical. This allows us to drop
doxygen out of lapack's main package buildroot, thus eliminating
a build cycle.
-------------------------------------------------------------------
Fri May 8 20:20:52 UTC 2015 - dmitry_r@opensuse.org
- Fix static libraries list
-------------------------------------------------------------------
Wed Jul 16 08:39:20 UTC 2014 - idonmez@suse.com
- Add baselibs.conf to sources
-------------------------------------------------------------------
Mon Jul 14 16:38:58 UTC 2014 - toddrme2178@gmail.com
- Include update-alternatives dependency in subpackages that use it
to guarantee it will be available.
-------------------------------------------------------------------
Wed Jun 18 08:15:19 UTC 2014 - dmitry_r@opensuse.org
- Move blas and lapack libraries to subdirectories for fixing
update-alternatives [bnc#861081]
- Add %posttrans scripts for fixing migration problems.
-------------------------------------------------------------------
Thu Nov 21 20:52:18 UTC 2013 - burnus@net-b.de
- Update to 3.5.0
* Added Hermitian LDLT factorization routines with rook pivoting
algorithm
* 2-by-1 CSD to be used for tall and skinny matrix with orthonormal
columns
* New stopping criteria for balancing
* New complex division algorithm
* Various improvements
- No longer removing files due to license reasons as one file is
no longer part of Lapack and the others have been replaced by
new ones under the normal LAPACK license
-------------------------------------------------------------------
Tue Oct 29 12:53:29 UTC 2013 - lnt-sysadmin@lists.lrz.de
- packaged symlinks created by update-alternative as %ghost files
- removed quotes from update-alternative command to silence rpmlint warning
-------------------------------------------------------------------
Fri Mar 15 18:53:22 UTC 2013 - dmitry_r@opensuse.org
- Split devel packages into devel and devel-static
-------------------------------------------------------------------
Sun Jan 13 00:04:56 UTC 2013 - scorot@free.fr
- add update-alternative support to allow user to easily switch
between several blas and lapack libraries
-------------------------------------------------------------------
Tue Nov 6 10:10:53 UTC 2012 - burnus@net-b.de
- Update to 3.4.2
* Bug fixes
-------------------------------------------------------------------
Wed Jul 25 14:30:36 UTC 2012 - idonmez@suse.com
- Fix bnc#772628
-------------------------------------------------------------------
Thu Jul 19 20:44:04 UTC 2012 - scorot@free.fr
- update baselibs.conf
-------------------------------------------------------------------
Sun Jul 15 18:47:19 UTC 2012 - scorot@free.fr
- build the c interface lapacke
-------------------------------------------------------------------
Thu May 31 13:52:43 CEST 2012 - kukuk@suse.de
- doxygen >= 1.7 is required for building docu
-------------------------------------------------------------------
Mon May 21 14:40:18 UTC 2012 - saschpe@suse.de
- Change obsoletes '<=' for lapack and blas back to '<', there was a
version update in between
- Remove psfig.tex (bnc#757332)
-------------------------------------------------------------------
Wed May 9 13:04:08 UTC 2012 - coolo@suse.com
- fixing dependencies for devel-32bit
-------------------------------------------------------------------
Fri May 4 13:44:58 UTC 2012 - burnus@net-b.de
- Update to 3.4.1
* Bug fixes
-------------------------------------------------------------------
Mon Apr 2 11:47:20 UTC 2012 - rguenther@suse.com
- Undo spec file obfuscation
-------------------------------------------------------------------
Fri Mar 30 14:11:58 UTC 2012 - toddrme2178@gmail.com
- Fixed building on openSUSE 11.4 by fixing defattr
- Made the package groups consistent: Development/Libraries/Parallel
- Cleaned up spec file formatting
- Made all requires use the new package naming
-------------------------------------------------------------------
Wed Mar 14 12:31:13 UTC 2012 - saschpe@suse.de
- Adhere to shared library policy, packages containing *.so or *.h
files have to be named $FOO-devel, packages containing *.a files either
have to be named $FOO-devel-static or provide this name
- Set license to 'BSD-3-Clause', according to the file LICENSE and the
description on http://www.netlib.org/lapack/ it's not public domain
- Package README and LICENSE in library packages
- Removed rpmlint filters
- Use upstream tarball URL
-------------------------------------------------------------------
Mon Feb 13 10:48:17 UTC 2012 - coolo@suse.com
- patch license to follow spdx.org standard
-------------------------------------------------------------------
Wed Nov 23 14:04:54 UTC 2011 - jengelh@medozas.de
- Remove redundant/unwanted tags/section (cf. specfile guidelines)
- Use %_smp_mflags for parallel building
-------------------------------------------------------------------
Wed Nov 16 21:03:58 UTC 2011 - burnus@net-b.de
- Update to 3.4.0
* xGEQRT: QR factorization (improved interface)
* xGEQRT3: recursive QR factorization.
* xTPQRT: Communication-Avoiding QR sequential kernels.
* Bug fixes.
* Changes see http://www.netlib.org/lapack/lapack-3.4.0.html
-------------------------------------------------------------------
Fri Sep 9 13:58:10 UTC 2011 - burnus@net-b.de
- Run BLAS and LAPACK testsuite when building
-------------------------------------------------------------------
Thu May 12 07:12:55 UTC 2011 - burnus@net-b.de
- Update to 3.3.1 [bnc#654560]
* New procedures to compute the complete CS decomposition of a
partitioned unitary matrix
* Level-3 BLAS symmetric indefinite solve (xSYTRS) and symmetric
indefinite inversion (xSYTRI)
* Bug fixes
* Changes see at http://www.netlib.org/lapack/lapack-3.3.1.html
and http://www.netlib.org/lapack/lapack-3.3.0.html
-------------------------------------------------------------------
Thu Aug 12 13:52:25 UTC 2010 - rguenther@novell.com
- Add baselibs. [bnc#630656]
-------------------------------------------------------------------
Thu Jul 8 14:36:20 UTC 2010 - burnus@net-b.de
- Update to version 3.2.2
* Bug fix release
* Changes see at http://www.netlib.org/lapack/lapack-3.2.2.html
-------------------------------------------------------------------
Tue Feb 9 18:56:59 CET 2010 - prusnak@suse.cz
- package man and blas-man as noarch
-------------------------------------------------------------------
Wed Jan 13 13:15:58 CET 2010 - rguenther@suse.de
- Drop -O3 -funroll-all-loops compiler flags, build dcabs1.f with -O0.
[bnc#569978]
-------------------------------------------------------------------
Mon May 18 15:26:56 CEST 2009 - dominique-obs@leuenberger.net
- Update to version 3.2.1 [bnc#504669]
* Changes see at http://www.netlib.org/lapack/lapack-3.2.1.html
-------------------------------------------------------------------
Wed Jan 28 13:22:03 CET 2009 - rguenther@suse.de
- Update to version 3.2.0. [bnc#456384]
* Extra Precise Iterative Refinement
* XBLAS
* Non-Negative Diagonals from Householder QR
* High Performance QR and Householder Reflections on Low-Profile Matrices
* New fast and accurate Jacobi SVD
* Routines for Rectangular Full Packed format
* Pivoted Cholesky
* Mixed precision iterative refinement
* Some new variants added for the one sided factorization
* More robust DQDS algorithm
-------------------------------------------------------------------
Sun May 11 14:21:24 CEST 2008 - lrupp@suse.de
- use versioned requires/obsoletes
- %run_ldconfig is deprecated
- prefix the patch with the packagename
-------------------------------------------------------------------
Fri Apr 27 14:17:41 CEST 2007 - rguenther@suse.de
- Update to version 3.1.1. [#265999]
- Integrates 3.1.0 errata and missing blas routines.
- Provides better gfortran SECOND integration.
- Split shared libraries into their own versioned subpackage.
-------------------------------------------------------------------
Fri Jan 19 11:35:01 CET 2007 - rguenther@suse.de
- Include fixes for the 3.1.0 errata.
- Add missing CSROT, DROTM, DROTMG, DSDOT, SDSDOT, SROTM, SROTMG
and ZDROT from blas distribution. [#228824]
-------------------------------------------------------------------
Thu Dec 14 12:57:12 CET 2006 - rguenther@suse.de
- Restore missing so symlinks.
-------------------------------------------------------------------
Tue Nov 14 17:26:52 CET 2006 - rguenther@suse.de
- Update to version 3.1.0.
- Rename blasman to blas-man.
- Rename lapack-manpages to lapack-man.
-------------------------------------------------------------------
Tue Oct 31 15:48:05 CET 2006 - rguenther@suse.de
- Trim BuildRequires.
- Build and package -fPIC static library variants. [#205310]
- Fix installing of the libblas.so symlink.
- Do not package the matrix testing setup library libtmglib.
- Do not package useless README file.
-------------------------------------------------------------------
Wed Jan 25 21:37:18 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Sat Jan 14 13:26:51 CET 2006 - kukuk@suse.de
- Add gmp-devel to nfb
-------------------------------------------------------------------
Fri Apr 22 10:40:54 CEST 2005 - meissner@suse.de
- fixed all other instances of -fno-f2c, and g77 -> gfortran use.
-------------------------------------------------------------------
Thu Apr 21 17:33:58 CEST 2005 - meissner@suse.de
- g77 -> gfortran, -fno-f2c is no more.
-------------------------------------------------------------------
Sat Jan 29 22:25:13 CET 2005 - nashif@suse.de
- Updated manpages (#48784)
-------------------------------------------------------------------
Thu Jan 20 01:22:36 CET 2005 - ro@suse.de
- remove BuildPrereq, BuildRequires is generated
-------------------------------------------------------------------
Thu Mar 18 05:17:48 CET 2004 - nashif@suse.de
- Fixed permission for manpages (#36340)
-------------------------------------------------------------------
Sat Jan 10 10:04:03 CET 2004 - adrian@suse.de
- add %run_ldconfig
-------------------------------------------------------------------
Mon Feb 3 14:10:13 CET 2003 - meissner@suse.de
- Use $RPM_OPT_FLAGS, so it builds on ppc64.
-------------------------------------------------------------------
Mon Aug 26 19:26:23 CEST 2002 - nashif@suse.de
- Fixed manpage conflict
- correct library version
-------------------------------------------------------------------
Mon Jul 1 11:02:05 CEST 2002 - ro@suse.de
- use -fPIC for all shared objects
- link liblapack with shared libblas (same reason)
-------------------------------------------------------------------
Thu May 2 15:16:43 CEST 2002 - sf@suse.de
- fixed %{_lib}-problems for x86_64
-------------------------------------------------------------------
Mon Sep 17 17:08:04 CEST 2001 - nashif@suse.de
- Fixed bug #9925, adding blas to required packages.
-------------------------------------------------------------------
Tue May 8 12:53:04 CEST 2001 - nashif@suse.de
- Fixed bug #6803
-------------------------------------------------------------------
Thu Feb 8 12:12:06 CET 2001 - sf@suse.de
- compile with '-01' for IA64 due to 'internal compiler error' in g77
-------------------------------------------------------------------
Mon Nov 6 06:36:15 MET 2000 - nashif@suse.de
- Fixed bug of missing objects (#4028)
-------------------------------------------------------------------
Sat Apr 22 01:22:23 CEST 2000 - nashif@suse.de
- Applied new patches
- Modified group, url and files in spec
-------------------------------------------------------------------
Mon Feb 21 13:55:15 CET 2000 - nashif@suse.de
- Applied new patches
-------------------------------------------------------------------
Tue Jan 18 23:22:56 CET 2000 - nashif@suse.de
- Applied new patched
- Moved manpages to /usr/share/man
-------------------------------------------------------------------
Thu Dec 23 19:37:04 CET 1999 - nashif@suse.de
- Update to latest version
- Package split lapack + blas
-------------------------------------------------------------------
Thu Oct 7 11:17:15 CEST 1999 - nashif@suse.de
- Package split: man pages + libraries
-------------------------------------------------------------------
Wed Sep 22 21:21:06 CEST 1999 - nashif@suse.de
- New package: LAPACK
Linear Algebra Package (LAPACK)

3
lapack.rpmlintrc Normal file
View File

@ -0,0 +1,3 @@
# rpmlint get update-alternatives generic names wrong consistently
# as it doesn't understand the _%{_arch} extensions.
addFilter(".* alternative-link-missing.*")

445
lapack.spec Normal file
View File

@ -0,0 +1,445 @@
#
# spec file for package lapack
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without tmg
%if 0%{?suse_version} > 1500
%define a_x _%{_arch}
%endif
Name: lapack
Version: 3.9.0
Release: 0
Summary: Linear Algebra Package
License: BSD-3-Clause
Group: Development/Libraries/Parallel
URL: https://www.netlib.org/lapack/
Source0: https://github.com/Reference-LAPACK/lapack/archive/v%{version}.tar.gz#/lapack-%{version}.tar.gz
Source98: lapack.rpmlintrc
Source99: baselibs.conf
Patch1: lapack-3.2.2.patch
# PATCH-FIX-UPSTREAM -- https://github.com/Reference-LAPACK/lapack/commit/489a2884c22e.patch
Patch2: Fix-MinGW-build-error.patch
# PATCH-FIX-UPSTREAM -- https://github.com/Reference-LAPACK/lapack/commit/d168b4d2ae67.patch
Patch3: Fix-some-minor-inconsistencies-in-LAPACKE_czgesvdq.patch
# PATCH-FIX-UPSTREAM -- https://github.com/Reference-LAPACK/lapack/commit/ea2a102d3827.patch
Patch4: Avoid-out-of-bounds-accesses-in-complex-EIG-tests.patch
# PATCH-FIX-UPSTREAM -- https://github.com/Reference-LAPACK/lapack/commit/38f3eeee3108b18158409ca2a100e6fe03754781
Patch5: Fix-out-of-bounds-read.patch
# PATCH-FIX-UPSTREAM
Patch6: https://github.com/Reference-LAPACK/lapack/commit/87536aa3c8bb.patch#/Restore_missing_deprecated_prototypes.patch
BuildRequires: gcc-fortran
BuildRequires: python3-base
BuildRequires: update-alternatives
Requires(pre): update-alternatives
%description
LAPACK provides routines for solving systems of simultaneous linear
equations, least-squares solutions of linear systems of equations,
eigenvalue problems, and singular value problems. The associated matrix
factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are
also provided, as are related computations such as reordering of the
Schur factorizations and estimating condition numbers. Dense and banded
matrices are handled, but not general sparse matrices. In all areas,
similar functionality is provided for real and complex matrices, in
both single and double precision.
%package -n liblapack3
Summary: LAPACK Shared Library
Group: Development/Libraries/Parallel
Requires(pre): update-alternatives
%description -n liblapack3
LAPACK provides routines for solving systems of simultaneous linear
equations, least-squares solutions of linear systems of equations,
eigenvalue problems, and singular value problems. The associated matrix
factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are
also provided, as are related computations such as reordering of the
Schur factorizations and estimating condition numbers. Dense and banded
matrices are handled, but not general sparse matrices. In all areas,
similar functionality is provided for real and complex matrices, in
both single and double precision.
%package -n libblas3
Summary: BLAS Shared Library
Group: Development/Libraries/Parallel
Requires(pre): update-alternatives
%description -n libblas3
BLAS (Basic Linear Algebra Subprograms) is a standard library for
numerical algebra. BLAS provides a number of basic algorithms for
linear algebra.
%package devel
Summary: Linear Algebra Package
Group: Development/Libraries/Parallel
Requires: blas-devel = %{version}
Requires: liblapack3 = %{version}
Provides: lapack = %{version}
Obsoletes: lapack < %{version}
%description devel
LAPACK provides routines for solving systems of simultaneous linear
equations, least-squares solutions of linear systems of equations,
eigenvalue problems, and singular value problems. The associated matrix
factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are
also provided, as are related computations such as reordering of the
Schur factorizations and estimating condition numbers. Dense and banded
matrices are handled, but not general sparse matrices. In all areas,
similar functionality is provided for real and complex matrices, in
both single and double precision.
%package devel-static
Summary: Linear Algebra Package - static libraries
Group: Development/Libraries/Parallel
Requires: lapack-devel = %{version}
%description devel-static
LAPACK provides routines for solving systems of simultaneous linear
equations, least-squares solutions of linear systems of equations,
eigenvalue problems, and singular value problems. The associated matrix
factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are
also provided, as are related computations such as reordering of the
Schur factorizations and estimating condition numbers. Dense and banded
matrices are handled, but not general sparse matrices. In all areas,
similar functionality is provided for real and complex matrices, in
both single and double precision.
%package -n blas-devel
Summary: Basic Linear Algebra Subprograms
Group: Development/Libraries/Parallel
Requires: libblas3 = %{version}
Provides: blas = %{version}
Obsoletes: blas < %{version}
%description -n blas-devel
BLAS (Basic Linear Algebra Subprograms) is a standard library for
numerical algebra. BLAS provides a number of basic algorithms for
linear algebra. BLAS is fast and well-tested, was written in FORTRAN 77
and built with gfortran. BLAS manual pages are available in the
blas-man package.
%package -n blas-devel-static
Summary: Basic Linear Algebra Subprograms
Group: Development/Libraries/Parallel
Requires: blas-devel = %{version}
%description -n blas-devel-static
BLAS (Basic Linear Algebra Subprograms) is a standard library for
numerical algebra. BLAS provides a number of basic algorithms for
linear algebra. BLAS is fast and well-tested, was written in FORTRAN 77
and built with gfortran. BLAS manual pages are available in the
blas-man package.
%package -n liblapacke3
Summary: LAPACKE development files
Group: Development/Libraries/C and C++
Requires(pre): update-alternatives
%description -n liblapacke3
This library provides a native C interface to LAPACK routines available
at www.netlib.org/lapack to facilitate usage of LAPACK functionality
for C programmers.
This implementation introduces:
- row-major and column-major matrix layout controlled by the first function
parameter;
- an implementation with working arrays (middle-level interface) as well as
without working arrays (high-level interface);
- input scalars passed by value;
- error code as a return value instead of the INFO parameter.
%package -n lapacke-devel
Summary: LAPACKE development files
Group: Development/Libraries/C and C++
Requires: liblapacke3 = %{version}
Provides: lapacke = %{version}
%description -n lapacke-devel
LAPACKE headers and development files.
%package -n lapacke-devel-static
Summary: LAPACKE static libraries
Group: Development/Libraries/C and C++
Requires: lapacke-devel = %{version}
%description -n lapacke-devel-static
LAPACKE development files - static libraries.
%package -n libcblas3
Summary: CBLAS Shared Library
Group: Development/Libraries/C and C++
Requires(pre): update-alternatives
# Only version ever packaged separately
Obsoletes: libcblas3 == 20110120
%description -n libcblas3
This library provides a native C interface to BLAS routines available
at www.netlib.org/blas to facilitate usage of BLAS functionality
for C programmers.
%package -n cblas-devel
Summary: CBLAS development files
Group: Development/Libraries/C and C++
Requires: libcblas3 = %{version}
Provides: cblas = %{version}
%description -n cblas-devel
cblas headers and development files.
%package -n cblas-devel-static
Summary: CBLAS - static libraries
Group: Development/Libraries/C and C++
Requires: cblas-devel = %{version}
%description -n cblas-devel-static
The cblas-devel-static package contains the CBLAS static libraries
for -static linking. You do not need these, unless you link
statically, which is highly discouraged.
%ifarch %{ix86}
%if 0%{?sle_version:%sle_version} >= 150000
%global precflags "-mfpmath=sse"
%global test_precflags %precflags
%else
%global test_precflags "-ffloat-store"
%endif
%endif
%prep
%setup -q
%autopatch -p1
sed -i -e '1 s@env python@python3@' lapack_testing.py
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%global optflags_f %{optflags}
cp make.inc.example make.inc
# for ABI compatibility we need to build the deprecated interfaces
echo 'BUILD_DEPRECATED = Yes' >> make.inc
%{?with_tmg:echo 'LAPACKE_WITH_TMG = Yes' >> make.inc}
%make_build cleanlib
%make_build blaslib \
FFLAGS="%{optflags_f} %{?precflags} -fPIC"
mkdir tmp
( cd tmp; ar x ../librefblas.a )
gfortran -shared -Wl,-soname=libblas.so.3 -o libblas.so.%{version} -Wl,--no-undefined tmp/*.o
ln -s libblas.so.%{version} libblas.so
rm -rf tmp
%make_build cblaslib \
CFLAGS="%{optflags} %{?precflags} -fPIC -DADD_ "
mkdir tmp
( cd tmp; ar x ../libcblas.a )
gfortran -shared -Wl,-soname=libcblas.so.3 -o libcblas.so.%{version} -Wl,--no-undefined tmp/*.o -L. -lblas
ln -s libcblas.so.%{version} libcblas.so
rm -rf tmp
# May need to be included in liblapack
%make_build -C TESTING/MATGEN FFLAGS="%{optflags_f} %{?test_precflags} %{?with_tmg:-fPIC}"
%make_build lapacklib \
FFLAGS="%{optflags_f} %{?precflags} -fPIC"
mkdir tmp
( cd tmp; ar x ../liblapack.a; %{?with_tmg: ar x ../libtmglib.a; ar cr ../liblapack.a *.o; ranlib ../liblapack.a })
gfortran -shared -Wl,-soname=liblapack.so.3 -o liblapack.so.%{version} -Wl,--no-undefined tmp/*.o -L. -lblas
ln -s liblapack.so.%{version} liblapack.so
rm -rf tmp
make %{?_smp_mflags} lapackelib \
CFLAGS="%{optflags} %{?precflags} -fPIC -DADD_ -DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE"
mkdir tmp
( cd tmp; ar x ../liblapacke.a )
gfortran -shared -Wl,-soname=liblapacke.so.3 -o liblapacke.so.%{version} -Wl,--no-undefined tmp/*.o -L. -llapack
ln -s liblapacke.so.%{version} liblapacke.so
rm -rf tmp
# Build test binaries - blas
%make_build -C BLAS/TESTING FFLAGS="%{optflags_f} %{?test_precflags}"
# Build test binaries - cblas
%make_build -C CBLAS/testing FFLAGS="%{optflags_f} %{?test_precflags}"
# Build test binaries - lapack
%make_build -C TESTING/LIN FFLAGS="%{optflags_f} %{?test_precflags}"
%make_build -C TESTING/EIG FFLAGS="%{optflags_f} %{?test_precflags}"
%check
# Increase stack size, required for xeigtstz, see
# https://github.com/Reference-LAPACK/lapack/issues/335
# Remove for lapack > 3.9
ulimit -s 16384
%make_build blas_testing FFLAGS="%{optflags_f} %{?test_precflags}"
if grep -B15 -A15 FAIL BLAS/TESTING/*.out; then
echo
echo "blas_testing FAILED"
false
fi
%make_build cblas_testing CFLAGS="%{optflags} -fPIC"
grep -B15 -A15 FAIL CBLAS/testing/*.out && false
%make_build lapack_testing FFLAGS="%{optflags_f} %{?test_precflags}"
if grep -B15 -A15 FAIL TESTING/*.out; then
echo
echo "lapack_testing FAILED"
false
fi
%install
install -d %{buildroot}/%{_libdir}
install -d %{buildroot}/%{_sysconfdir}/alternatives
install -d %{buildroot}/%{_includedir}
## BLAS
install -d %{buildroot}/%{_libdir}/blas
install -m 644 librefblas.a %{buildroot}/%{_libdir}/libblas.a
install -m 755 libblas.so.%{version} %{buildroot}/%{_libdir}/blas
ln -s libblas.so.%{version} %{buildroot}/%{_libdir}/blas/libblas.so.3
ln -s blas/libblas.so.%{version} %{buildroot}/%{_libdir}/libblas.so
ln -s %{_sysconfdir}/alternatives/libblas.so.3%{?a_x} %{buildroot}/%{_libdir}/libblas.so.3
## CBLAS
install -m 644 CBLAS/include/*.h %{buildroot}/%{_includedir}
install -m 644 libcblas.a %{buildroot}/%{_libdir}
install -m 755 libcblas.so.%{version} %{buildroot}/%{_libdir}/blas
ln -s libcblas.so.%{version} %{buildroot}/%{_libdir}/blas/libcblas.so.3
ln -s blas/libcblas.so.%{version} %{buildroot}/%{_libdir}/libcblas.so
ln -s %{_sysconfdir}/alternatives/libcblas.so.3%{?a_x} %{buildroot}/%{_libdir}/libcblas.so.3
## LAPACK
install -d %{buildroot}/%{_libdir}/lapack
install -m 644 liblapack.a %{buildroot}/%{_libdir}
install -m 755 liblapack.so.%{version} %{buildroot}/%{_libdir}/lapack
ln -s liblapack.so.%{version} %{buildroot}/%{_libdir}/lapack/liblapack.so.3
ln -s lapack/liblapack.so.%{version} %{buildroot}/%{_libdir}/liblapack.so
ln -s %{_sysconfdir}/alternatives/liblapack.so.3%{?a_x} %{buildroot}/%{_libdir}/liblapack.so.3
## LAPACKE
install -m 644 LAPACKE/include/*.h %{buildroot}/%{_includedir}
install -m 644 liblapacke.a %{buildroot}/%{_libdir}
install -m 755 liblapacke.so.%{version} %{buildroot}/%{_libdir}/lapack
ln -s liblapacke.so.%{version} %{buildroot}/%{_libdir}/lapack/liblapacke.so.3
ln -s lapack/liblapacke.so.%{version} %{buildroot}/%{_libdir}/liblapacke.so
ln -s %{_sysconfdir}/alternatives/liblapacke.so.3%{?a_x} %{buildroot}/%{_libdir}/liblapacke.so.3
%post -n libblas3
%{_sbindir}/update-alternatives --install \
%{_libdir}/libblas.so.3 libblas.so.3%{?a_x} %{_libdir}/blas/libblas.so.3 50
/sbin/ldconfig
%postun -n libblas3
/sbin/ldconfig
if [ ! %{_libdir}/blas/libblas.so.3 ] ; then
%{_sbindir}/update-alternatives --remove libblas.so.3%{?a_x} %{_libdir}/blas/libblas.so.3
fi
%post -n liblapack3
%{_sbindir}/update-alternatives --install \
%{_libdir}/liblapack.so.3 liblapack.so.3%{?a_x} %{_libdir}/lapack/liblapack.so.3 50
/sbin/ldconfig
%postun -n liblapack3
/sbin/ldconfig
if [ ! -f %{_libdir}/lapack/liblapack.so.3 ] ; then
%{_sbindir}/update-alternatives --remove liblapack.so.3%{?a_x} %{_libdir}/lapack/liblapack.so.3
fi
%post -n libcblas3
%{_sbindir}/update-alternatives --install \
%{_libdir}/libcblas.so.3 libcblas.so.3%{?a_x} %{_libdir}/blas/libcblas.so.3 50
/sbin/ldconfig
%postun -n libcblas3
/sbin/ldconfig
if [ ! -f %{_libdir}/blas/libcblas.so.3 ] ; then
%{_sbindir}/update-alternatives --remove libcblas.so.3%{?a_x} %{_libdir}/blas/libcblas.so.3
fi
%post -n liblapacke3
%{_sbindir}/update-alternatives --install \
%{_libdir}/liblapacke.so.3 liblapacke.so.3%{?a_x} %{_libdir}/lapack/liblapacke.so.3 50
/sbin/ldconfig
%postun -n liblapacke3
/sbin/ldconfig
if [ ! -f %{_libdir}/lapack/liblapacke.so.3 ] ; then
%{_sbindir}/update-alternatives --remove liblapacke.so.3%{?a_x} %{_libdir}/lapack/liblapacke.so.3
fi
%files -n liblapack3
%doc README.md
%license LICENSE
%dir %{_libdir}/lapack
%{_libdir}/lapack/liblapack.so.%{version}
%{_libdir}/lapack/liblapack.so.3
%ghost %{_libdir}/liblapack.so.3
%ghost %{_sysconfdir}/alternatives/liblapack.so.3%{?a_x}
%files -n libblas3
%doc README.md
%license LICENSE
%dir %{_libdir}/blas
%{_libdir}/blas/libblas.so.%{version}
%{_libdir}/blas/libblas.so.3
%ghost %{_libdir}/libblas.so.3
%ghost %{_sysconfdir}/alternatives/libblas.so.3%{?a_x}
%files devel
%{_libdir}/liblapack.so
%files devel-static
%{_libdir}/liblapack.a
%files -n blas-devel
%{_libdir}/libblas.so
%files -n blas-devel-static
%{_libdir}/libblas.a
%files -n liblapacke3
%{_libdir}/lapack/liblapacke.so.%{version}
%{_libdir}/lapack/liblapacke.so.3
%ghost %{_libdir}/liblapacke.so.3
%ghost %{_sysconfdir}/alternatives/liblapacke.so.3%{?a_x}
%files -n lapacke-devel
%doc LAPACKE/README
%license LAPACKE/LICENSE
%{_libdir}/liblapacke.so
%{_includedir}/lapack*.h
%files -n lapacke-devel-static
%{_libdir}/liblapacke.a
%files -n libcblas3
%doc README.md
%license LICENSE
%dir %{_libdir}/blas
%{_libdir}/blas/libcblas.so.%{version}
%{_libdir}/blas/libcblas.so.3
%ghost %{_libdir}/libcblas.so.3
%ghost %{_sysconfdir}/alternatives/libcblas.so.3%{?a_x}
%files -n cblas-devel
%doc CBLAS/README
%{_libdir}/libcblas.so
%{_includedir}/cblas*.h
%files -n cblas-devel-static
%{_libdir}/libcblas.a
%changelog