summaryrefslogtreecommitdiff
path: root/TESTING/LIN
diff options
context:
space:
mode:
authorIchitaro Yamazaki <iyamazak@bunsen.icl.utk.edu>2016-11-17 16:26:41 -0500
committerIchitaro Yamazaki <iyamazak@bunsen.icl.utk.edu>2016-11-17 16:26:41 -0500
commit9a72444a62069e351b3c0279f32abfcb5ab2d111 (patch)
tree6a6d55ca742ca994571b75a77120c322f49da969 /TESTING/LIN
parent8b4f3fd9a349567fb71ed8decb1c83a090b9e6b2 (diff)
downloadlapack-9a72444a62069e351b3c0279f32abfcb5ab2d111.tar.gz
lapack-9a72444a62069e351b3c0279f32abfcb5ab2d111.tar.bz2
lapack-9a72444a62069e351b3c0279f32abfcb5ab2d111.zip
insert argument check for Aasen's complex symmetric, and also check for
lwork > 0.
Diffstat (limited to 'TESTING/LIN')
-rw-r--r--TESTING/LIN/cchkhe_aa.f6
-rw-r--r--TESTING/LIN/cchksy_aa.f4
-rw-r--r--TESTING/LIN/cerrhe.f12
-rw-r--r--TESTING/LIN/cerrsy.f50
-rw-r--r--TESTING/LIN/dchksy_aa.f4
-rw-r--r--TESTING/LIN/derrsy.f12
-rw-r--r--TESTING/LIN/schksy_aa.f4
-rw-r--r--TESTING/LIN/serrsy.f15
-rw-r--r--TESTING/LIN/zchkhe_aa.f4
-rw-r--r--TESTING/LIN/zchksy_aa.f4
-rw-r--r--TESTING/LIN/zerrhe.f15
-rw-r--r--TESTING/LIN/zerrsy.f44
12 files changed, 159 insertions, 15 deletions
diff --git a/TESTING/LIN/cchkhe_aa.f b/TESTING/LIN/cchkhe_aa.f
index 5982c619..9910deaa 100644
--- a/TESTING/LIN/cchkhe_aa.f
+++ b/TESTING/LIN/cchkhe_aa.f
@@ -211,7 +211,7 @@
INTEGER I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
$ IUPLO, IZERO, J, K, KL, KU, LDA, LWORK, MODE,
$ N, NB, NERRS, NFAIL, NIMAT, NRHS, NRUN, NT
- REAL ANORM, CNDNUM, RCOND, RCONDC
+ REAL ANORM, CNDNUM, RCONDC
* ..
* .. Local Arrays ..
CHARACTER UPLOS( 2 )
@@ -431,7 +431,7 @@
* the block structure of D. AINV is a work array for
* block factorization, LWORK is the length of AINV.
*
- LWORK = ( NB+1 )*LDA
+ LWORK = MAX( 1, ( NB+1 )*LDA )
SRNAMT = 'CHETRF_AA'
CALL CHETRF_AA( UPLO, N, AFAC, LDA, IWORK, AINV,
$ LWORK, INFO )
@@ -519,7 +519,7 @@
CALL CLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
*
SRNAMT = 'CHETRS_AA'
- LWORK = 3*N-2
+ LWORK = MAX( 1, 3*N-2 )
CALL CHETRS_AA( UPLO, N, NRHS, AFAC, LDA, IWORK,
$ X, LDA, WORK, LWORK, INFO )
*
diff --git a/TESTING/LIN/cchksy_aa.f b/TESTING/LIN/cchksy_aa.f
index 68952347..b7cd47f6 100644
--- a/TESTING/LIN/cchksy_aa.f
+++ b/TESTING/LIN/cchksy_aa.f
@@ -433,7 +433,7 @@
* block factorization, LWORK is the length of AINV.
*
SRNAMT = 'CSYTRF_AA'
- LWORK = N*NB + N
+ LWORK = MAX( 1, N*NB + N )
CALL CSYTRF_AA( UPLO, N, AFAC, LDA, IWORK, AINV,
$ LWORK, INFO )
*
@@ -520,7 +520,7 @@
CALL CLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
*
SRNAMT = 'CSYTRS_AA'
- LWORK = 3*N-2
+ LWORK = MAX( 1, 3*N-2 )
CALL CSYTRS_AA( UPLO, N, NRHS, AFAC, LDA,
$ IWORK, X, LDA, WORK, LWORK,
$ INFO )
diff --git a/TESTING/LIN/cerrhe.f b/TESTING/LIN/cerrhe.f
index 3711b8e3..2bc50c0d 100644
--- a/TESTING/LIN/cerrhe.f
+++ b/TESTING/LIN/cerrhe.f
@@ -488,6 +488,12 @@
INFOT = 4
CALL CHETRF_AA( 'U', 2, A, 1, IP, W, 4, INFO )
CALL CHKXER( 'CHETRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL CHETRF_AA( 'U', 0, A, 1, IP, W, 0, INFO )
+ CALL CHKXER( 'CHETRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL CHETRF_AA( 'U', 0, A, 1, IP, W, -2, INFO )
+ CALL CHKXER( 'CHETRF_AA', INFOT, NOUT, LERR, OK )
*
* CHETRS_AA
*
@@ -507,6 +513,12 @@
INFOT = 8
CALL CHETRS_AA( 'U', 2, 1, A, 2, IP, B, 1, W, 1, INFO )
CALL CHKXER( 'CHETRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL CHETRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, 0, INFO )
+ CALL CHKXER( 'CHETRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL CHETRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, -2, INFO )
+ CALL CHKXER( 'CHETRS_AA', INFOT, NOUT, LERR, OK )
*
* Test error exits of the routines that use factorization
* of a Hermitian indefinite packed matrix with patrial
diff --git a/TESTING/LIN/cerrsy.f b/TESTING/LIN/cerrsy.f
index c7613bd6..e4bdc1dd 100644
--- a/TESTING/LIN/cerrsy.f
+++ b/TESTING/LIN/cerrsy.f
@@ -547,6 +547,56 @@
INFOT = 5
CALL CSPCON( 'U', 1, A, IP, -ANRM, RCOND, W, INFO )
CALL CHKXER( 'CSPCON', INFOT, NOUT, LERR, OK )
+*
+ ELSE IF( LSAMEN( 2, C2, 'SA' ) ) THEN
+*
+* Test error exits of the routines that use factorization
+* of a symmetric indefinite matrix with Aasen's algorithm
+*
+* CSYTRF_AA
+*
+ SRNAMT = 'CSYTRF_AA'
+ INFOT = 1
+ CALL CSYTRF_AA( '/', 0, A, 1, IP, W, 1, INFO )
+ CALL CHKXER( 'CSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL CSYTRF_AA( 'U', -1, A, 1, IP, W, 1, INFO )
+ CALL CHKXER( 'CSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL CSYTRF_AA( 'U', 2, A, 1, IP, W, 4, INFO )
+ CALL CHKXER( 'CSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL CSYTRF_AA( 'U', 0, A, 1, IP, W, 0, INFO )
+ CALL CHKXER( 'CSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL CSYTRF_AA( 'U', 0, A, 1, IP, W, -2, INFO )
+ CALL CHKXER( 'CSYTRF_AA', INFOT, NOUT, LERR, OK )
+*
+* CSYTRS_AA
+*
+ SRNAMT = 'CSYTRS_AA'
+ INFOT = 1
+ CALL CSYTRS_AA( '/', 0, 0, A, 1, IP, B, 1, W, 1, INFO )
+ CALL CHKXER( 'CSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL CSYTRS_AA( 'U', -1, 0, A, 1, IP, B, 1, W, 1, INFO )
+ CALL CHKXER( 'CSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL CSYTRS_AA( 'U', 0, -1, A, 1, IP, B, 1, W, 1, INFO )
+ CALL CHKXER( 'CSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL CSYTRS_AA( 'U', 2, 1, A, 1, IP, B, 2, W, 1, INFO )
+ CALL CHKXER( 'CSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL CSYTRS_AA( 'U', 2, 1, A, 2, IP, B, 1, W, 1, INFO )
+ CALL CHKXER( 'CSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL CSYTRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, 0, INFO )
+ CALL CHKXER( 'CSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL CSYTRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, -2, INFO )
+ CALL CHKXER( 'CSYTRS_AA', INFOT, NOUT, LERR, OK )
+*
END IF
*
* Print a summary line.
diff --git a/TESTING/LIN/dchksy_aa.f b/TESTING/LIN/dchksy_aa.f
index bc622e4a..a5c0594c 100644
--- a/TESTING/LIN/dchksy_aa.f
+++ b/TESTING/LIN/dchksy_aa.f
@@ -430,7 +430,7 @@
* block factorization, LWORK is the length of AINV.
*
SRNAMT = 'DSYTRF_AA'
- LWORK = N*NB + N
+ LWORK = MAX( 1, N*NB + N )
CALL DSYTRF_AA( UPLO, N, AFAC, LDA, IWORK, AINV,
$ LWORK, INFO )
*
@@ -517,7 +517,7 @@
CALL DLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
*
SRNAMT = 'DSYTRS_AA'
- LWORK = 3*N-2
+ LWORK = MAX( 1, 3*N-2 )
CALL DSYTRS_AA( UPLO, N, NRHS, AFAC, LDA,
$ IWORK, X, LDA, WORK, LWORK,
$ INFO )
diff --git a/TESTING/LIN/derrsy.f b/TESTING/LIN/derrsy.f
index 056e931b..7fe74de3 100644
--- a/TESTING/LIN/derrsy.f
+++ b/TESTING/LIN/derrsy.f
@@ -493,6 +493,12 @@
INFOT = 4
CALL DSYTRF_AA( 'U', 2, A, 1, IP, W, 4, INFO )
CALL CHKXER( 'DSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL DSYTRF_AA( 'U', 0, A, 1, IP, W, 0, INFO )
+ CALL CHKXER( 'DSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL DSYTRF_AA( 'U', 0, A, 1, IP, W, -2, INFO )
+ CALL CHKXER( 'DSYTRF_AA', INFOT, NOUT, LERR, OK )
*
* DSYTRS_AA
*
@@ -512,6 +518,12 @@
INFOT = 8
CALL DSYTRS_AA( 'U', 2, 1, A, 2, IP, B, 1, W, 1, INFO )
CALL CHKXER( 'DSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL DSYTRS_AA( 'U', 0, 1, A, 2, IP, B, 1, W, 0, INFO )
+ CALL CHKXER( 'DSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL DSYTRS_AA( 'U', 0, 1, A, 2, IP, B, 1, W, -2, INFO )
+ CALL CHKXER( 'DSYTRS_AA', INFOT, NOUT, LERR, OK )
*
ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
*
diff --git a/TESTING/LIN/schksy_aa.f b/TESTING/LIN/schksy_aa.f
index 6b820f70..128664b2 100644
--- a/TESTING/LIN/schksy_aa.f
+++ b/TESTING/LIN/schksy_aa.f
@@ -431,7 +431,7 @@
* block factorization, LWORK is the length of AINV.
*
SRNAMT = 'SSYTRF_AA'
- LWORK = N*NB + N
+ LWORK = MAX( 1, N*NB + N )
CALL SSYTRF_AA( UPLO, N, AFAC, LDA, IWORK, AINV,
$ LWORK, INFO )
*
@@ -518,7 +518,7 @@
CALL SLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
*
SRNAMT = 'SSYTRS_AA'
- LWORK = 3*N-2
+ LWORK = MAX( 1, 3*N-2 )
CALL SSYTRS_AA( UPLO, N, NRHS, AFAC, LDA,
$ IWORK, X, LDA, WORK, LWORK,
$ INFO )
diff --git a/TESTING/LIN/serrsy.f b/TESTING/LIN/serrsy.f
index bf69893a..25309611 100644
--- a/TESTING/LIN/serrsy.f
+++ b/TESTING/LIN/serrsy.f
@@ -92,7 +92,8 @@
$ SSYTF2_RK, SSYTF2_ROOK, SSYTRF, SSYTRF_RK,
$ SSYTRF_ROOK, SSYTRI, SSYTF2, SSYTRI_3,
$ SSYTRI_3X, SSYTRI_ROOK, SSYTRF_AA, SSYTRI2,
- $ SYTRI2X, SSYTRS, SSYTRS_3, SSYTRS_ROOK, SSYTRS_AA
+ $ SYTRI2X, SSYTRS, SSYTRS_3, SSYTRS_ROOK,
+ $ SSYTRS_AA
* ..
* .. Scalars in Common ..
LOGICAL LERR, OK
@@ -492,6 +493,12 @@
INFOT = 4
CALL SSYTRF_AA( 'U', 2, A, 1, IP, W, 4, INFO )
CALL CHKXER( 'SSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL SSYTRF_AA( 'U', 0, A, 1, IP, W, 0, INFO )
+ CALL CHKXER( 'SSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL SSYTRF_AA( 'U', 0, A, 1, IP, W, -2, INFO )
+ CALL CHKXER( 'SSYTRF_AA', INFOT, NOUT, LERR, OK )
*
* SSYTRS_AA
*
@@ -511,6 +518,12 @@
INFOT = 8
CALL SSYTRS_AA( 'U', 2, 1, A, 2, IP, B, 1, W, 1, INFO )
CALL CHKXER( 'SSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL SSYTRS_AA( 'U', 0, 1, A, 2, IP, B, 1, W, 0, INFO )
+ CALL CHKXER( 'SSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL SSYTRS_AA( 'U', 0, 1, A, 2, IP, B, 1, W, -2, INFO )
+ CALL CHKXER( 'SSYTRS_AA', INFOT, NOUT, LERR, OK )
*
ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
*
diff --git a/TESTING/LIN/zchkhe_aa.f b/TESTING/LIN/zchkhe_aa.f
index c68be161..1559c88a 100644
--- a/TESTING/LIN/zchkhe_aa.f
+++ b/TESTING/LIN/zchkhe_aa.f
@@ -430,7 +430,7 @@
* the block structure of D. AINV is a work array for
* block factorization, LWORK is the length of AINV.
*
- LWORK = ( NB+1 )*LDA
+ LWORK = MAX( 1, ( NB+1 )*LDA )
SRNAMT = 'ZHETRF_AA'
CALL ZHETRF_AA( UPLO, N, AFAC, LDA, IWORK, AINV,
$ LWORK, INFO )
@@ -518,7 +518,7 @@
CALL ZLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
*
SRNAMT = 'ZHETRS_AA'
- LWORK = 3*N-2
+ LWORK = MAX( 1, 3*N-2 )
CALL ZHETRS_AA( UPLO, N, NRHS, AFAC, LDA, IWORK,
$ X, LDA, WORK, LWORK, INFO )
*
diff --git a/TESTING/LIN/zchksy_aa.f b/TESTING/LIN/zchksy_aa.f
index f38b4771..d231746f 100644
--- a/TESTING/LIN/zchksy_aa.f
+++ b/TESTING/LIN/zchksy_aa.f
@@ -433,7 +433,7 @@
* block factorization, LWORK is the length of AINV.
*
SRNAMT = 'ZSYTRF_AA'
- LWORK = N*NB + N
+ LWORK = MAX( 1, N*NB + N )
CALL ZSYTRF_AA( UPLO, N, AFAC, LDA, IWORK, AINV,
$ LWORK, INFO )
*
@@ -520,7 +520,7 @@
CALL ZLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
*
SRNAMT = 'ZSYTRS_AA'
- LWORK = 3*N-2
+ LWORK = MAX( 1, 3*N-2 )
CALL ZSYTRS_AA( UPLO, N, NRHS, AFAC, LDA,
$ IWORK, X, LDA, WORK, LWORK,
$ INFO )
diff --git a/TESTING/LIN/zerrhe.f b/TESTING/LIN/zerrhe.f
index b6304b1c..d15b2cf4 100644
--- a/TESTING/LIN/zerrhe.f
+++ b/TESTING/LIN/zerrhe.f
@@ -93,7 +93,8 @@
$ ZHETRF_RK, ZHETRF_ROOK, ZHETRF_AA, ZHETRI,
$ ZHETRI_3, ZHETRI_3X, ZHETRI_ROOK, ZHETRI2,
$ ZHETRI2X, ZHETRS, ZHETRS_3, ZHETRS_ROOK,
- $ ZHETRS_AA, ZHPCON, ZHPRFS, ZHPTRF, ZHPTRI, ZHPTRS
+ $ ZHETRS_AA, ZHPCON, ZHPRFS, ZHPTRF, ZHPTRI,
+ $ ZHPTRS
* ..
* .. Scalars in Common ..
LOGICAL LERR, OK
@@ -489,6 +490,12 @@
INFOT = 4
CALL ZHETRF_AA( 'U', 2, A, 1, IP, W, 4, INFO )
CALL CHKXER( 'ZHETRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL ZHETRF_AA( 'U', 0, A, 1, IP, W, 0, INFO )
+ CALL CHKXER( 'ZHETRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL ZHETRF_AA( 'U', 0, A, 1, IP, W, -2, INFO )
+ CALL CHKXER( 'ZHETRF_AA', INFOT, NOUT, LERR, OK )
*
* ZHETRS_AA
*
@@ -508,6 +515,12 @@
INFOT = 8
CALL ZHETRS_AA( 'U', 2, 1, A, 2, IP, B, 1, W, 1, INFO )
CALL CHKXER( 'ZHETRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL ZHETRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, 0, INFO )
+ CALL CHKXER( 'ZHETRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL ZHETRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, -2, INFO )
+ CALL CHKXER( 'ZHETRS_AA', INFOT, NOUT, LERR, OK )
*
ELSE IF( LSAMEN( 2, C2, 'HP' ) ) THEN
*
diff --git a/TESTING/LIN/zerrsy.f b/TESTING/LIN/zerrsy.f
index 45e5f0c0..eb8bb628 100644
--- a/TESTING/LIN/zerrsy.f
+++ b/TESTING/LIN/zerrsy.f
@@ -549,6 +549,50 @@
INFOT = 5
CALL ZSPCON( 'U', 1, A, IP, -ANRM, RCOND, W, INFO )
CALL CHKXER( 'ZSPCON', INFOT, NOUT, LERR, OK )
+*
+ ELSE IF( LSAMEN( 2, C2, 'SA' ) ) THEN
+*
+* Test error exits of the routines that use factorization
+* of a symmetric indefinite matrix with Aasen's algorithm.
+*
+* ZSYTRF_AA
+*
+ SRNAMT = 'ZSYTRF_AA'
+ INFOT = 1
+ CALL ZSYTRF_AA( '/', 0, A, 1, IP, W, 1, INFO )
+ CALL CHKXER( 'ZSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL ZSYTRF_AA( 'U', -1, A, 1, IP, W, 1, INFO )
+ CALL CHKXER( 'ZSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL ZSYTRF_AA( 'U', 2, A, 1, IP, W, 4, INFO )
+ CALL CHKXER( 'ZSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL ZSYTRF_AA( 'U', 0, A, 1, IP, W, 0, INFO )
+ CALL CHKXER( 'ZSYTRF_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL ZSYTRF_AA( 'U', 0, A, 1, IP, W, -2, INFO )
+ CALL CHKXER( 'ZSYTRF_AA', INFOT, NOUT, LERR, OK )
+*
+* ZSYTRS_AA
+*
+ SRNAMT = 'ZSYTRS_AA'
+ INFOT = 1
+ CALL ZSYTRS_AA( '/', 0, 0, A, 1, IP, B, 1, W, 1, INFO )
+ CALL CHKXER( 'ZSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL ZSYTRS_AA( 'U', -1, 0, A, 1, IP, B, 1, W, 1, INFO )
+ CALL CHKXER( 'ZSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL ZSYTRS_AA( 'U', 0, -1, A, 1, IP, B, 1, W, 1, INFO )
+ CALL CHKXER( 'ZSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL ZSYTRS_AA( 'U', 2, 1, A, 1, IP, B, 2, W, 1, INFO )
+ CALL CHKXER( 'ZSYTRS_AA', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL ZSYTRS_AA( 'U', 2, 1, A, 2, IP, B, 1, W, 1, INFO )
+ CALL CHKXER( 'ZSYTRS_AA', INFOT, NOUT, LERR, OK )
+*
END IF
*
* Print a summary line.