summaryrefslogtreecommitdiff
path: root/TESTING/LIN
diff options
context:
space:
mode:
authorjames <james@8a072113-8704-0410-8d35-dd094bca7971>2012-01-18 22:38:18 +0000
committerjames <james@8a072113-8704-0410-8d35-dd094bca7971>2012-01-18 22:38:18 +0000
commiteb4f5ca43b87c2be5236318d1fe72b3c1ed83b91 (patch)
tree7818e8707352a5cc189fb2c90bd4fefcc8fb834e /TESTING/LIN
parent30231be484be0a9b73ca9c9204218e9d65d6c229 (diff)
downloadlapack-eb4f5ca43b87c2be5236318d1fe72b3c1ed83b91.tar.gz
lapack-eb4f5ca43b87c2be5236318d1fe72b3c1ed83b91.tar.bz2
lapack-eb4f5ca43b87c2be5236318d1fe72b3c1ed83b91.zip
Fixed QRT routine testing
Diffstat (limited to 'TESTING/LIN')
-rw-r--r--TESTING/LIN/Makefile13
-rw-r--r--TESTING/LIN/alahd.f46
-rw-r--r--TESTING/LIN/cchkaa.f30
-rw-r--r--TESTING/LIN/cchkqrt.f212
-rw-r--r--TESTING/LIN/cchkqrtp.f216
-rw-r--r--TESTING/LIN/cerrqrt.f213
-rw-r--r--TESTING/LIN/cerrqrtp.f229
-rw-r--r--TESTING/LIN/cqrt04.f1
-rw-r--r--TESTING/LIN/cqrt05.f39
-rw-r--r--TESTING/LIN/dchkaa.f28
-rw-r--r--TESTING/LIN/dchkqrt.f210
-rw-r--r--TESTING/LIN/dchkqrtp.f215
-rw-r--r--TESTING/LIN/derrqrt.f213
-rw-r--r--TESTING/LIN/derrqrtp.f229
-rw-r--r--TESTING/LIN/dqrt04.f1
-rw-r--r--TESTING/LIN/dqrt05.f39
-rw-r--r--TESTING/LIN/schkaa.f28
-rw-r--r--TESTING/LIN/schkqrt.f207
-rw-r--r--TESTING/LIN/schkqrtp.f215
-rw-r--r--TESTING/LIN/serrqrt.f213
-rw-r--r--TESTING/LIN/serrqrtp.f229
-rw-r--r--TESTING/LIN/sqrt04.f1
-rw-r--r--TESTING/LIN/sqrt05.f41
-rw-r--r--TESTING/LIN/zchkaa.f30
-rw-r--r--TESTING/LIN/zchkqrt.f209
-rw-r--r--TESTING/LIN/zchkqrtp.f215
-rw-r--r--TESTING/LIN/zerrqrt.f213
-rw-r--r--TESTING/LIN/zerrqrtp.f229
-rw-r--r--TESTING/LIN/zqrt04.f1
-rw-r--r--TESTING/LIN/zqrt05.f39
30 files changed, 3741 insertions, 63 deletions
diff --git a/TESTING/LIN/Makefile b/TESTING/LIN/Makefile
index 595b8e39..dc19eb15 100644
--- a/TESTING/LIN/Makefile
+++ b/TESTING/LIN/Makefile
@@ -74,7 +74,7 @@ SLINTST = schkaa.o \
stbt02.o stbt03.o stbt05.o stbt06.o stpt01.o \
stpt02.o stpt03.o stpt05.o stpt06.o strt01.o \
strt02.o strt03.o strt05.o strt06.o \
- stzt01.o stzt02.o sgennd.o
+ stzt01.o stzt02.o sgennd.o sqrt04.o sqrt05.o schkqrt.o serrqrt.o schkqrtp.o serrqrtp.o
ifdef USEXBLAS
SLINTST += serrvxx.o sdrvgex.o sdrvsyx.o serrgex.o sdrvgbx.o sdrvpox.o \
@@ -114,7 +114,8 @@ CLINTST = cchkaa.o \
ctbt02.o ctbt03.o ctbt05.o ctbt06.o ctpt01.o \
ctpt02.o ctpt03.o ctpt05.o ctpt06.o ctrt01.o \
ctrt02.o ctrt03.o ctrt05.o ctrt06.o \
- ctzt01.o ctzt02.o sget06.o cgennd.o
+ ctzt01.o ctzt02.o sget06.o cgennd.o \
+ cqrt04.o cqrt05.o cchkqrt.o cerrqrt.o cchkqrtp.o cerrqrtp.o
ifdef USEXBLAS
CLINTST += cerrvxx.o cdrvgex.o cdrvsyx.o cdrvgbx.o cerrgex.o cdrvpox.o cdrvhex.o \
@@ -151,7 +152,8 @@ DLINTST = dchkaa.o \
dtbt02.o dtbt03.o dtbt05.o dtbt06.o dtpt01.o \
dtpt02.o dtpt03.o dtpt05.o dtpt06.o dtrt01.o \
dtrt02.o dtrt03.o dtrt05.o dtrt06.o \
- dtzt01.o dtzt02.o dgennd.o
+ dtzt01.o dtzt02.o dgennd.o \
+ dqrt04.o dqrt05.o dchkqrt.o derrqrt.o dchkqrtp.o derrqrtp.o
ifdef USEXBLAS
DLINTST += derrvxx.o ddrvgex.o ddrvsyx.o ddrvgbx.o derrgex.o ddrvpox.o derrpox.o \
@@ -191,7 +193,8 @@ ZLINTST = zchkaa.o \
ztbt02.o ztbt03.o ztbt05.o ztbt06.o ztpt01.o \
ztpt02.o ztpt03.o ztpt05.o ztpt06.o ztrt01.o \
ztrt02.o ztrt03.o ztrt05.o ztrt06.o \
- ztzt01.o ztzt02.o dget06.o zgennd.o
+ ztzt01.o ztzt02.o dget06.o zgennd.o \
+ zqrt04.o zqrt05.o zchkqrt.o zerrqrt.o zchkqrtp.o zerrqrtp.o
ifdef USEXBLAS
ZLINTST += zerrvxx.o zdrvgex.o zdrvsyx.o zdrvgbx.o zerrgex.o zdrvpox.o zdrvhex.o \
@@ -232,7 +235,7 @@ ZLINTSTRFP = zchkrfp.o zdrvrfp.o zdrvrf1.o zdrvrf2.o zdrvrf3.o zdrvrf4.o zerrrfp
all: single double complex complex16 proto-single proto-double proto-complex proto-complex16
single: ../xlintsts
-double: ../xlintstd
+double: ../xlintstd
complex: ../xlintstc
complex16: ../xlintstz
diff --git a/TESTING/LIN/alahd.f b/TESTING/LIN/alahd.f
index c6a0a380..5c55406d 100644
--- a/TESTING/LIN/alahd.f
+++ b/TESTING/LIN/alahd.f
@@ -70,6 +70,8 @@
*> _LU: LU variants
*> _CH: Cholesky variants
*> _QS: QR variants
+*> _QT: QRT (general matrices)
+*> _QX: QRT (triangular-pentagonal matrices)
*> The first character must be one of S, D, C, or Z (C or Z only
*> if complex).
*> \endverbatim
@@ -591,6 +593,32 @@
WRITE( IOUNIT, FMT = 9970 )
WRITE( IOUNIT, FMT = '( '' Test ratios:'' )' )
*
+ ELSE IF( LSAMEN( 2, P2, 'QT' ) ) THEN
+*
+* QRT (general matrices)
+*
+ WRITE( IOUNIT, FMT = 8000 ) PATH
+ WRITE( IOUNIT, FMT = '( '' Test ratios:'' )' )
+ WRITE( IOUNIT, FMT = 8011 ) 1
+ WRITE( IOUNIT, FMT = 8012 ) 2
+ WRITE( IOUNIT, FMT = 8013 ) 3
+ WRITE( IOUNIT, FMT = 8014 ) 4
+ WRITE( IOUNIT, FMT = 8015 ) 5
+ WRITE( IOUNIT, FMT = 8016 ) 6
+*
+ ELSE IF( LSAMEN( 2, P2, 'QX' ) ) THEN
+*
+* QRT (triangular-pentagonal)
+*
+ WRITE( IOUNIT, FMT = 8001 ) PATH
+ WRITE( IOUNIT, FMT = '( '' Test ratios:'' )' )
+ WRITE( IOUNIT, FMT = 8017 ) 1
+ WRITE( IOUNIT, FMT = 8018 ) 2
+ WRITE( IOUNIT, FMT = 8019 ) 3
+ WRITE( IOUNIT, FMT = 8020 ) 4
+ WRITE( IOUNIT, FMT = 8021 ) 5
+ WRITE( IOUNIT, FMT = 8022 ) 6
+*
ELSE
*
* Print error message if no header is available.
@@ -628,6 +656,10 @@
9982 FORMAT( / 1X, A3, ': Cholesky factorization variants' )
9981 FORMAT( / 1X, A3, ': QR factorization variants' )
9980 FORMAT( / 1X, A3, ': No header available' )
+ 8000 FORMAT( / 1X, A3, ': QRT factorization for general matrices' )
+ 8001 FORMAT( / 1X, A3, ': QRT factorization for ',
+ $ 'triangular-pentagonal matrices' )
+
*
* GE matrix types
*
@@ -909,6 +941,20 @@
$ ' - ( 1 / ( 1 - ALPHA ) ) + THRESH' )
9926 FORMAT( 3X, I2, ': Largest 2-Norm of 2-by-2 pivots', / 12X,
$ ' - ( ( 1 + ALPHA ) / ( 1 - ALPHA ) ) + THRESH' )
+ 8011 FORMAT(3X,I2,': norm( R - Q''*A ) / ( M * norm(A) * EPS )' )
+ 8012 FORMAT(3X,I2,': norm( I - Q''*Q ) / ( M * EPS )' )
+ 8013 FORMAT(3X,I2,': norm( Q*C - Q*C ) / ( M * norm(C) * EPS )' )
+ 8014 FORMAT(3X,I2,': norm( Q''*C - Q''*C ) / ( M * norm(C) * EPS )')
+ 8015 FORMAT(3X,I2,': norm( C*Q - C*Q ) / ( M * norm(C) * EPS )' )
+ 8016 FORMAT(3X,I2,': norm( C*Q'' - C*Q'' ) / ( M * norm(C) * EPS )')
+ 8017 FORMAT(3X,I2,': norm( R - Q''*A ) / ( (M+N) * norm(A) * EPS )' )
+ 8018 FORMAT(3X,I2,': norm( I - Q''*Q ) / ( (M+N) * EPS )' )
+ 8019 FORMAT(3X,I2,': norm( Q*C - Q*C ) / ( (M+N) * norm(C) * EPS )' )
+ 8020 FORMAT(3X,I2,
+ $ ': norm( Q''*C - Q''*C ) / ( (M+N) * norm(C) * EPS )')
+ 8021 FORMAT(3X,I2,': norm( C*Q - C*Q ) / ( (M+N) * norm(C) * EPS )' )
+ 8022 FORMAT(3X,I2,
+ $ ': norm( C*Q'' - C*Q'' ) / ( (M+N) * norm(C) * EPS )')
*
RETURN
*
diff --git a/TESTING/LIN/cchkaa.f b/TESTING/LIN/cchkaa.f
index 200bee4a..aea61488 100644
--- a/TESTING/LIN/cchkaa.f
+++ b/TESTING/LIN/cchkaa.f
@@ -24,7 +24,7 @@
*> and program options using list-directed input. The remaining lines
*> specify the LAPACK test paths and the number of matrix types to use
*> in testing. An annotated example of a data file can be obtained by
-*> deleting the first 3 characters from the following 40 lines:
+*> deleting the first 3 characters from the following 42 lines:
*> Data file for testing COMPLEX LAPACK linear equation routines
*> 7 Number of values of M
*> 0 1 2 3 5 10 16 Values of M (row dimension)
@@ -65,6 +65,8 @@
*> CTZ 3 List types on next line if 0 < NTYPES < 3
*> CLS 6 List types on next line if 0 < NTYPES < 6
*> CEQ
+*> CQT
+*> CQX
*> \endverbatim
*
* Parameters:
@@ -161,7 +163,8 @@
$ CCHKSP, CCHKSY, CCHKSY_ROOK, CCHKTB, CCHKTP,
$ CCHKTR, CCHKTZ, CDRVGB, CDRVGE, CDRVGT, CDRVHE,
$ CDRVHP, CDRVLS, CDRVPB, CDRVPO, CDRVPP, CDRVPT,
- $ CDRVSP, CDRVSY, CDRVSY_ROOK, ILAVER
+ $ CDRVSP, CDRVSY, CDRVSY_ROOK, ILAVER, CCHKQRT,
+ $ CCHKQRTP
* ..
* .. Scalars in Common ..
LOGICAL LERR, OK
@@ -915,11 +918,32 @@
WRITE( NOUT, FMT = 9989 )PATH
END IF
*
+ ELSE IF( LSAMEN( 2, C2, 'QT' ) ) THEN
+*
+* QT: QRT routines for general matrices
+*
+ IF( TSTCHK ) THEN
+ CALL CCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ ELSE
+ WRITE( NOUT, FMT = 9989 )PATH
+ END IF
+*
+ ELSE IF( LSAMEN( 2, C2, 'QX' ) ) THEN
+*
+* QX: QRT routines for triangular-pentagonal matrices
+*
+ IF( TSTCHK ) THEN
+ CALL CCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ ELSE
+ WRITE( NOUT, FMT = 9989 )PATH
+ END IF
+*
ELSE
*
WRITE( NOUT, FMT = 9990 )PATH
END IF
-
*
* Go back to get another input line.
*
diff --git a/TESTING/LIN/cchkqrt.f b/TESTING/LIN/cchkqrt.f
new file mode 100644
index 00000000..83008e8a
--- /dev/null
+++ b/TESTING/LIN/cchkqrt.f
@@ -0,0 +1,212 @@
+*> \brief \b CCHKQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE CCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+* NBVAL, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> CCHKQRT tests CGEQRT and CGEMQRT.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NM, NN, NNB, NOUT
+ REAL THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NTESTS
+ PARAMETER ( NTESTS = 6 )
+* ..
+* .. Local Scalars ..
+ CHARACTER*3 PATH
+ INTEGER I, J, K, T, M, N, NB, NFAIL, NERRS, NRUN,
+ $ MINMN
+* ..
+* .. Local Arrays ..
+ REAL RESULT( NTESTS )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAERH, ALAHD, ALASUM, DERRQR, DGEQRS, DGET02,
+ $ DLACPY, DLARHS, DLATB4, DLATMS, DQRT01,
+ $ DQRT01P, DQRT02, DQRT03, XLAENV
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NUNIT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NUNIT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Executable Statements ..
+*
+* Initialize constants
+*
+ PATH( 1: 1 ) = 'C'
+ PATH( 2: 3 ) = 'QT'
+ NRUN = 0
+ NFAIL = 0
+ NERRS = 0
+*
+* Test the error exits
+*
+ IF( TSTERR ) CALL CERRQRT( PATH, NOUT )
+ INFOT = 0
+*
+* Do for each value of M in MVAL.
+*
+ DO I = 1, NM
+ M = MVAL( I )
+*
+* Do for each value of N in NVAL.
+*
+ DO J = 1, NN
+ N = NVAL( J )
+*
+* Do for each possible value of NB
+*
+ MINMN = MIN( M, N )
+ DO K = 1, NNB
+ NB = NBVAL( K )
+*
+* Test CGEQRT and CGEMQRT
+*
+ IF( (NB.LE.MINMN).AND.(NB.GT.0) ) THEN
+ CALL CQRT04( M, N, NB, RESULT )
+*
+* Print information about the tests that did not
+* pass the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 )M, N, NB,
+ $ T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+ NRUN = NRUN + NTESTS
+ END IF
+ END DO
+ END DO
+ END DO
+*
+* Print a summary of the results.
+*
+ CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' M=', I5, ', N=', I5, ', NB=', I4,
+ $ ' test(', I2, ')=', G12.5 )
+ RETURN
+*
+* End of CCHKQRT
+*
+ END
diff --git a/TESTING/LIN/cchkqrtp.f b/TESTING/LIN/cchkqrtp.f
new file mode 100644
index 00000000..fe4d0eb5
--- /dev/null
+++ b/TESTING/LIN/cchkqrtp.f
@@ -0,0 +1,216 @@
+*> \brief \b CCHKQRTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE CCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+* NBVAL, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> CCHKQRTP tests CTPQRT and CTPMQRT.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NM, NN, NNB, NOUT
+ REAL THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NTESTS
+ PARAMETER ( NTESTS = 6 )
+* ..
+* .. Local Scalars ..
+ CHARACTER*3 PATH
+ INTEGER I, J, K, T, L, M, N, NB, NFAIL, NERRS, NRUN,
+ $ MINMN
+* ..
+* .. Local Arrays ..
+ REAL RESULT( NTESTS )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAERH, ALAHD, ALASUM, SERRQR, SQRT04
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NUNIT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NUNIT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Executable Statements ..
+*
+* Initialize constants
+*
+ PATH( 1: 1 ) = 'C'
+ PATH( 2: 3 ) = 'QX'
+ NRUN = 0
+ NFAIL = 0
+ NERRS = 0
+*
+* Test the error exits
+*
+ IF( TSTERR ) CALL CERRQRTP( PATH, NOUT )
+ INFOT = 0
+*
+* Do for each value of M
+*
+ DO I = 1, NM
+ M = MVAL( I )
+*
+* Do for each value of N
+*
+ DO J = 1, NN
+ N = NVAL( J )
+*
+* Do for each value of L
+*
+ MINMN = MIN( M, N )
+ DO L = 0, MINMN, MAX( MINMN, 1 )
+*
+* Do for each possible value of NB
+*
+
+ DO K = 1, NNB
+ NB = NBVAL( K )
+*
+* Test CTPQRT and CTPMQRT
+*
+ IF( (NB.LE.N).AND.(NB.GT.0) ) THEN
+ CALL CQRT05( M, N, L, NB, RESULT )
+*
+* Print information about the tests that did not
+* pass the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 )M, N, NB,
+ $ T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+ NRUN = NRUN + NTESTS
+ END IF
+ END DO
+ END DO
+ END DO
+ END DO
+*
+* Print a summary of the results.
+*
+ CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' M=', I5, ', N=', I5, ', NB=', I4,
+ $ ' test(', I2, ')=', G12.5 )
+ RETURN
+*
+* End of CCHKQRTP
+*
+ END
diff --git a/TESTING/LIN/cerrqrt.f b/TESTING/LIN/cerrqrt.f
new file mode 100644
index 00000000..d2ebf0c4
--- /dev/null
+++ b/TESTING/LIN/cerrqrt.f
@@ -0,0 +1,213 @@
+*> \brief \b CERRQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE CERRQRT( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> CERRQRT tests the error exits for the COMPLEX routines
+*> that use the QRT decomposition of a general matrix.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRQRT( PATH, NUNIT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NMAX
+ PARAMETER ( NMAX = 2 )
+* ..
+* .. Local Scalars ..
+ INTEGER I, INFO, J
+* ..
+* .. Local Arrays ..
+ COMPLEX A( NMAX, NMAX ), T( NMAX, NMAX ), W( NMAX ),
+ $ C( NMAX, NMAX )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAESM, CHKXER, CGEQRT2, CGEQRT3, CGEQRT,
+ $ CGEMQRT
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NOUT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NOUT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Intrinsic Functions ..
+ INTRINSIC FLOAT, CMPLX
+* ..
+* .. Executable Statements ..
+*
+ NOUT = NUNIT
+ WRITE( NOUT, FMT = * )
+*
+* Set the variables to innocuous values.
+*
+ DO J = 1, NMAX
+ DO I = 1, NMAX
+ A( I, J ) = 1.0 / CMPLX( FLOAT(I+J), 0.0 )
+ C( I, J ) = 1.0 / CMPLX( FLOAT(I+J), 0.0 )
+ T( I, J ) = 1.0 / CMPLX( FLOAT(I+J), 0.0 )
+ END DO
+ W( J ) = 0.0
+ END DO
+ OK = .TRUE.
+*
+* Error exits for QRT factorization
+*
+* CGEQRT
+*
+ SRNAMT = 'CGEQRT'
+ INFOT = 1
+ CALL CGEQRT( -1, 0, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL CGEQRT( 0, -1, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL CGEQRT( 0, 0, 0, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL CGEQRT( 2, 1, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL CGEQRT( 2, 2, 2, A, 2, T, 1, W, INFO )
+ CALL CHKXER( 'CGEQRT', INFOT, NOUT, LERR, OK )
+*
+* CGEQRT2
+*
+ SRNAMT = 'CGEQRT2'
+ INFOT = 1
+ CALL CGEQRT2( -1, 0, A, 1, T, 1, INFO )
+ CALL CHKXER( 'CGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL CGEQRT2( 0, -1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'CGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL CGEQRT2( 2, 1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'CGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL CGEQRT2( 2, 2, A, 2, T, 1, INFO )
+ CALL CHKXER( 'CGEQRT2', INFOT, NOUT, LERR, OK )
+*
+* CGEQRT3
+*
+ SRNAMT = 'CGEQRT3'
+ INFOT = 1
+ CALL CGEQRT3( -1, 0, A, 1, T, 1, INFO )
+ CALL CHKXER( 'CGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL CGEQRT3( 0, -1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'CGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL CGEQRT3( 2, 1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'CGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL CGEQRT3( 2, 2, A, 2, T, 1, INFO )
+ CALL CHKXER( 'CGEQRT3', INFOT, NOUT, LERR, OK )
+*
+* CGEMQRT
+*
+ SRNAMT = 'CGEMQRT'
+ INFOT = 1
+ CALL CGEMQRT( '/', 'N', 0, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL CGEMQRT( 'L', '/', 0, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL CGEMQRT( 'L', 'N', -1, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL CGEMQRT( 'L', 'N', 0, -1, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL CGEMQRT( 'L', 'N', 0, 0, -1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL CGEMQRT( 'R', 'N', 0, 0, -1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL CGEMQRT( 'L', 'N', 0, 0, 0, 0, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL CGEMQRT( 'R', 'N', 1, 2, 1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL CGEMQRT( 'L', 'N', 2, 1, 1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL CGEMQRT( 'R', 'N', 1, 1, 1, 1, A, 1, T, 0, C, 1, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 12
+ CALL CGEMQRT( 'L', 'N', 1, 1, 1, 1, A, 1, T, 1, C, 0, W, INFO )
+ CALL CHKXER( 'CGEMQRT', INFOT, NOUT, LERR, OK )
+*
+* Print a summary line.
+*
+ CALL ALAESM( PATH, OK, NOUT )
+*
+ RETURN
+*
+* End of CERRQRT
+*
+ END
diff --git a/TESTING/LIN/cerrqrtp.f b/TESTING/LIN/cerrqrtp.f
new file mode 100644
index 00000000..7d4c05db
--- /dev/null
+++ b/TESTING/LIN/cerrqrtp.f
@@ -0,0 +1,229 @@
+*> \brief \b CERRQRTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE CERRQRTP( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> CERRQRTP tests the error exits for the REAL routines
+*> that use the QRT decomposition of a triangular-pentagonal matrix.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRQRTP( PATH, NUNIT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NMAX
+ PARAMETER ( NMAX = 2 )
+* ..
+* .. Local Scalars ..
+ INTEGER I, INFO, J
+* ..
+* .. Local Arrays ..
+ COMPLEX A( NMAX, NMAX ), T( NMAX, NMAX ), W( NMAX ),
+ $ B( NMAX, NMAX ), C( NMAX, NMAX )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAESM, CHKXER, CTPQRT2, CTPQRT,
+ $ CTPMQRT
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NOUT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NOUT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Intrinsic Functions ..
+ INTRINSIC FLOAT, CMPLX
+* ..
+* .. Executable Statements ..
+*
+ NOUT = NUNIT
+ WRITE( NOUT, FMT = * )
+*
+* Set the variables to innocuous values.
+*
+ DO J = 1, NMAX
+ DO I = 1, NMAX
+ A( I, J ) = 1.0 / CMPLX(FLOAT( I+J ),0.0)
+ C( I, J ) = 1.0 / CMPLX(FLOAT( I+J ),0.0)
+ T( I, J ) = 1.0 / CMPLX(FLOAT( I+J ),0.0)
+ END DO
+ W( J ) = CMPLX(0.0,0.0)
+ END DO
+ OK = .TRUE.
+*
+* Error exits for TPQRT factorization
+*
+* CTPQRT
+*
+ SRNAMT = 'CTPQRT'
+ INFOT = 1
+ CALL CTPQRT( -1, 1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL CTPQRT( 1, -1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL CTPQRT( 0, 1, -1, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL CTPQRT( 0, 1, 1, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL CTPQRT( 0, 1, 0, 0, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL CTPQRT( 0, 1, 0, 2, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL CTPQRT( 1, 2, 0, 2, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL CTPQRT( 2, 1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'CTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL CTPQRT( 2, 2, 1, 2, A, 2, B, 2, T, 1, W, INFO )
+ CALL CHKXER( 'CTPQRT', INFOT, NOUT, LERR, OK )
+*
+* CTPQRT2
+*
+ SRNAMT = 'CTPQRT2'
+ INFOT = 1
+ CALL CTPQRT2( -1, 0, 0, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'CTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL CTPQRT2( 0, -1, 0, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'CTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL CTPQRT2( 0, 0, -1, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'CTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL CTPQRT2( 2, 2, 0, A, 1, B, 2, T, 2, INFO )
+ CALL CHKXER( 'CTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL CTPQRT2( 2, 2, 0, A, 2, B, 1, T, 2, INFO )
+ CALL CHKXER( 'CTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL CTPQRT2( 2, 2, 0, A, 2, B, 2, T, 1, INFO )
+ CALL CHKXER( 'CTPQRT2', INFOT, NOUT, LERR, OK )
+*
+* CTPMQRT
+*
+ SRNAMT = 'CTPMQRT'
+ INFOT = 1
+ CALL CTPMQRT( '/', 'N', 0, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL CTPMQRT( 'L', '/', 0, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL CTPMQRT( 'L', 'N', -1, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL CTPMQRT( 'L', 'N', 0, -1, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL CTPMQRT( 'L', 'N', 0, 0, -1, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ INFOT = 6
+ CALL CTPMQRT( 'L', 'N', 0, 0, 0, -1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL CTPMQRT( 'L', 'N', 0, 0, 0, 0, 0, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL CTPMQRT( 'R', 'N', 1, 2, 1, 1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL CTPMQRT( 'L', 'N', 2, 1, 1, 1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 11
+ CALL CTPMQRT( 'R', 'N', 1, 1, 1, 1, 1, A, 1, T, 0, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 13
+ CALL CTPMQRT( 'L', 'N', 1, 1, 1, 1, 1, A, 1, T, 1, B, 0, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 15
+ CALL CTPMQRT( 'L', 'N', 1, 1, 1, 1, 1, A, 1, T, 1, B, 1, C, 0,
+ $ W, INFO )
+ CALL CHKXER( 'CTPMQRT', INFOT, NOUT, LERR, OK )
+*
+* Print a summary line.
+*
+ CALL ALAESM( PATH, OK, NOUT )
+*
+ RETURN
+*
+* End of CERRQRT
+*
+ END
diff --git a/TESTING/LIN/cqrt04.f b/TESTING/LIN/cqrt04.f
index b8b890fe..68c9b879 100644
--- a/TESTING/LIN/cqrt04.f
+++ b/TESTING/LIN/cqrt04.f
@@ -72,6 +72,7 @@
*
* =====================================================================
SUBROUTINE CQRT04(M,N,NB,RESULT)
+ IMPLICIT NONE
*
* -- LAPACK test routine (version 3.4.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
diff --git a/TESTING/LIN/cqrt05.f b/TESTING/LIN/cqrt05.f
index 1f92ed12..a83412ad 100644
--- a/TESTING/LIN/cqrt05.f
+++ b/TESTING/LIN/cqrt05.f
@@ -79,6 +79,7 @@
*
* =====================================================================
SUBROUTINE CQRT05(M,N,L,NB,RESULT)
+ IMPLICIT NONE
*
* -- LAPACK test routine (version 3.4.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
@@ -104,7 +105,7 @@
PARAMETER( ZERO = 0.0, ONE = (1.0,0.0), CZERO=(0.0,0.0) )
* ..
* .. Local Scalars ..
- INTEGER INFO, J, K, M2
+ INTEGER INFO, J, K, M2, NP1
REAL ANORM, EPS, RESID, CNORM, DNORM
* ..
* .. Local Arrays ..
@@ -122,6 +123,11 @@
EPS = SLAMCH( 'Epsilon' )
K = N
M2 = M+N
+ IF( M.GT.0 ) THEN
+ NP1 = N+1
+ ELSE
+ NP1 = 1
+ END IF
LWORK = M2*M2*NB
*
* Dynamically allocate all arrays
@@ -134,11 +140,20 @@
*
LDT=NB
CALL CLASET( 'Full', M2, N, CZERO, CZERO, A, M2 )
+ CALL CLASET( 'Full', NB, N, CZERO, CZERO, T, NB )
DO J=1,N
CALL CLARNV( 2, ISEED, J, A( 1, J ) )
- CALL CLARNV( 2, ISEED, M-L, A( MIN(N+M,N+1), J ) )
- CALL CLARNV( 2, ISEED, MIN(J,L), A( MIN(N+M,N+M-L+1), J ) )
END DO
+ IF( M.GT.0 ) THEN
+ DO J=1,N
+ CALL CLARNV( 2, ISEED, M-L, A( MIN(N+M,N+1), J ) )
+ END DO
+ END IF
+ IF( L.GT.0 ) THEN
+ DO J=1,N
+ CALL CLARNV( 2, ISEED, MIN(J,L), A( MIN(N+M,N+M-L+1), J ) )
+ END DO
+ END IF
*
* Copy the matrix A to the array AF.
*
@@ -146,7 +161,7 @@
*
* Factor the matrix A in the array AF.
*
- CALL CTPQRT( M,N,L,NB,AF,M2,AF(N+1,1),M2,T,LDT,WORK,INFO)
+ CALL CTPQRT( M,N,L,NB,AF,M2,AF(NP1,1),M2,T,LDT,WORK,INFO)
*
* Generate the (M+N)-by-(M+N) matrix Q by applying H to I
*
@@ -188,8 +203,8 @@
*
* Apply Q to C as Q*C
*
- CALL CTPMQRT( 'L','N', M,N,K,L,NB,AF(N+1,1),M2,T,LDT,CF,M2,
- $ CF(N+1,1),M2,WORK,INFO)
+ CALL CTPMQRT( 'L','N', M,N,K,L,NB,AF(NP1,1),M2,T,LDT,CF,M2,
+ $ CF(NP1,1),M2,WORK,INFO)
*
* Compute |Q*C - Q*C| / |C|
*
@@ -207,8 +222,8 @@
*
* Apply Q to C as QT*C
*
- CALL CTPMQRT( 'L','C',M,N,K,L,NB,AF(N+1,1),M2,T,LDT,CF,M2,
- $ CF(N+1,1),M2,WORK,INFO)
+ CALL CTPMQRT( 'L','C',M,N,K,L,NB,AF(NP1,1),M2,T,LDT,CF,M2,
+ $ CF(NP1,1),M2,WORK,INFO)
*
* Compute |QT*C - QT*C| / |C|
*
@@ -230,8 +245,8 @@
*
* Apply Q to D as D*Q
*
- CALL CTPMQRT('R','N',N,M,N,L,NB,AF(N+1,1),M2,T,LDT,DF,N,
- $ DF(1,N+1),N,WORK,INFO)
+ CALL CTPMQRT('R','N',N,M,N,L,NB,AF(NP1,1),M2,T,LDT,DF,N,
+ $ DF(1,NP1),N,WORK,INFO)
*
* Compute |D*Q - D*Q| / |D|
*
@@ -249,8 +264,8 @@
*
* Apply Q to D as D*QT
*
- CALL CTPMQRT('R','C',N,M,N,L,NB,AF(N+1,1),M2,T,LDT,DF,N,
- $ DF(1,N+1),N,WORK,INFO)
+ CALL CTPMQRT('R','C',N,M,N,L,NB,AF(NP1,1),M2,T,LDT,DF,N,
+ $ DF(1,NP1),N,WORK,INFO)
*
* Compute |D*QT - D*QT| / |D|
diff --git a/TESTING/LIN/dchkaa.f b/TESTING/LIN/dchkaa.f
index ca37ffc7..23018649 100644
--- a/TESTING/LIN/dchkaa.f
+++ b/TESTING/LIN/dchkaa.f
@@ -24,7 +24,7 @@
*> and program options using list-directed input. The remaining lines
*> specify the LAPACK test paths and the number of matrix types to use
*> in testing. An annotated example of a data file can be obtained by
-*> deleting the first 3 characters from the following 38 lines:
+*> deleting the first 3 characters from the following 40 lines:
*> Data file for testing DOUBLE PRECISION LAPACK linear eqn. routines
*> 7 Number of values of M
*> 0 1 2 3 5 10 16 Values of M (row dimension)
@@ -63,6 +63,8 @@
*> DTZ 3 List types on next line if 0 < NTYPES < 3
*> DLS 6 List types on next line if 0 < NTYPES < 6
*> DEQ
+*> DQT
+*> DQX
*> \endverbatim
*
* Parameters:
@@ -159,7 +161,7 @@
$ DCHKSY_ROOK, DCHKTB, DCHKTP, DCHKTR, DCHKTZ,
$ DDRVGB, DDRVGE, DDRVGT, DDRVLS, DDRVPB, DDRVPO,
$ DDRVPP, DDRVPT, DDRVSP, DDRVSY, DDRVSY_ROOK,
- $ ILAVER
+ $ ILAVER, DCHKQRT, DCHKQRTP
* ..
* .. Scalars in Common ..
LOGICAL LERR, OK
@@ -863,6 +865,28 @@
ELSE
WRITE( NOUT, FMT = 9989 )PATH
END IF
+*
+ ELSE IF( LSAMEN( 2, C2, 'QT' ) ) THEN
+*
+* QT: QRT routines for general matrices
+*
+ IF( TSTCHK ) THEN
+ CALL DCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ ELSE
+ WRITE( NOUT, FMT = 9989 )PATH
+ END IF
+*
+ ELSE IF( LSAMEN( 2, C2, 'QX' ) ) THEN
+*
+* QX: QRT routines for triangular-pentagonal matrices
+*
+ IF( TSTCHK ) THEN
+ CALL DCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ ELSE
+ WRITE( NOUT, FMT = 9989 )PATH
+ END IF
*
ELSE
*
diff --git a/TESTING/LIN/dchkqrt.f b/TESTING/LIN/dchkqrt.f
new file mode 100644
index 00000000..1f333d15
--- /dev/null
+++ b/TESTING/LIN/dchkqrt.f
@@ -0,0 +1,210 @@
+*> \brief \b DCHKQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE DCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+* NBVAL, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> DCHKQRT tests DGEQRT and DGEMQRT.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NM, NN, NNB, NOUT
+ DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NTESTS
+ PARAMETER ( NTESTS = 6 )
+* ..
+* .. Local Scalars ..
+ CHARACTER*3 PATH
+ INTEGER I, J, K, T, M, N, NB, NFAIL, NERRS, NRUN,
+ $ MINMN
+*
+* .. Local Arrays ..
+ DOUBLE PRECISION RESULT( NTESTS )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAERH, ALAHD, ALASUM, DQRT04
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NUNIT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NUNIT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Executable Statements ..
+*
+* Initialize constants
+*
+ PATH( 1: 1 ) = 'D'
+ PATH( 2: 3 ) = 'QT'
+ NRUN = 0
+ NFAIL = 0
+ NERRS = 0
+*
+* Test the error exits
+*
+ IF( TSTERR ) CALL DERRQRT( PATH, NOUT )
+ INFOT = 0
+*
+* Do for each value of M in MVAL.
+*
+ DO I = 1, NM
+ M = MVAL( I )
+*
+* Do for each value of N in NVAL.
+*
+ DO J = 1, NN
+ N = NVAL( J )
+*
+* Do for each possible value of NB
+*
+ MINMN = MIN( M, N )
+ DO K = 1, NNB
+ NB = NBVAL( K )
+*
+* Test DGEQRT and DGEMQRT
+*
+ IF( (NB.LE.MINMN).AND.(NB.GT.0) ) THEN
+ CALL DQRT04( M, N, NB, RESULT )
+*
+* Print information about the tests that did not
+* pass the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 )M, N, NB,
+ $ T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+ NRUN = NRUN + NTESTS
+ END IF
+ END DO
+ END DO
+ END DO
+*
+* Print a summary of the results.
+*
+ CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' M=', I5, ', N=', I5, ', NB=', I4,
+ $ ' test(', I2, ')=', G12.5 )
+ RETURN
+*
+* End of DCHKQRT
+*
+ END
diff --git a/TESTING/LIN/dchkqrtp.f b/TESTING/LIN/dchkqrtp.f
new file mode 100644
index 00000000..05e3f9e4
--- /dev/null
+++ b/TESTING/LIN/dchkqrtp.f
@@ -0,0 +1,215 @@
+*> \brief \b DCHKQRTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE DCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+* NBVAL, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> DCHKQRTP tests DTPQRT and DTPMQRT.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NM, NN, NNB, NOUT
+ DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NTESTS
+ PARAMETER ( NTESTS = 6 )
+* ..
+* .. Local Scalars ..
+ CHARACTER*3 PATH
+ INTEGER I, J, K, L, T, M, N, NB, NFAIL, NERRS, NRUN,
+ $ MINMN
+* ..
+* .. Local Arrays ..
+ DOUBLE PRECISION RESULT( NTESTS )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAERH, ALAHD, ALASUM, SERRQR, SQRT04
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NUNIT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NUNIT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Executable Statements ..
+*
+* Initialize constants
+*
+ PATH( 1: 1 ) = 'D'
+ PATH( 2: 3 ) = 'QX'
+ NRUN = 0
+ NFAIL = 0
+ NERRS = 0
+*
+* Test the error exits
+*
+ IF( TSTERR ) CALL DERRQRTP( PATH, NOUT )
+ INFOT = 0
+*
+* Do for each value of M
+*
+ DO I = 1, NM
+ M = MVAL( I )
+*
+* Do for each value of N
+*
+ DO J = 1, NN
+ N = NVAL( J )
+*
+* Do for each value of L
+*
+ MINMN = MIN( M, N )
+ DO L = 0, MINMN, MAX( MINMN, 1 )
+*
+* Do for each possible value of NB
+*
+ DO K = 1, NNB
+ NB = NBVAL( K )
+*
+* Test DTPQRT and DTPMQRT
+*
+ IF( (NB.LE.N).AND.(NB.GT.0) ) THEN
+ CALL DQRT05( M, N, L, NB, RESULT )
+*
+* Print information about the tests that did not
+* pass the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 )M, N, NB, L,
+ $ T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+ NRUN = NRUN + NTESTS
+ END IF
+ END DO
+ END DO
+ END DO
+ END DO
+*
+* Print a summary of the results.
+*
+ CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' M=', I5, ', N=', I5, ', NB=', I4,' L=', I4,
+ $ ' test(', I2, ')=', G12.5 )
+ RETURN
+*
+* End of DCHKQRTP
+*
+ END
diff --git a/TESTING/LIN/derrqrt.f b/TESTING/LIN/derrqrt.f
new file mode 100644
index 00000000..d7f30694
--- /dev/null
+++ b/TESTING/LIN/derrqrt.f
@@ -0,0 +1,213 @@
+*> \brief \b DERRQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE DERRQRT( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> DERRQRT tests the error exits for the DOUBLE PRECISION routines
+*> that use the QRT decomposition of a general matrix.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRQRT( PATH, NUNIT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NMAX
+ PARAMETER ( NMAX = 2 )
+* ..
+* .. Local Scalars ..
+ INTEGER I, INFO, J
+* ..
+* .. Local Arrays ..
+ DOUBLE PRECISION A( NMAX, NMAX ), T( NMAX, NMAX ), W( NMAX ),
+ $ C( NMAX, NMAX )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAESM, CHKXER, DGEQRT2, DGEQRT3, DGEQRT,
+ $ DGEMQRT
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NOUT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NOUT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Intrinsic Functions ..
+ INTRINSIC DBLE
+* ..
+* .. Executable Statements ..
+*
+ NOUT = NUNIT
+ WRITE( NOUT, FMT = * )
+*
+* Set the variables to innocuous values.
+*
+ DO J = 1, NMAX
+ DO I = 1, NMAX
+ A( I, J ) = 1.D0 / DBLE( I+J )
+ C( I, J ) = 1.D0 / DBLE( I+J )
+ T( I, J ) = 1.D0 / DBLE( I+J )
+ END DO
+ W( J ) = 0.D0
+ END DO
+ OK = .TRUE.
+*
+* Error exits for QRT factorization
+*
+* DGEQRT
+*
+ SRNAMT = 'DGEQRT'
+ INFOT = 1
+ CALL DGEQRT( -1, 0, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL DGEQRT( 0, -1, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL DGEQRT( 0, 0, 0, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL DGEQRT( 2, 1, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL DGEQRT( 2, 2, 2, A, 2, T, 1, W, INFO )
+ CALL CHKXER( 'DGEQRT', INFOT, NOUT, LERR, OK )
+*
+* DGEQRT2
+*
+ SRNAMT = 'DGEQRT2'
+ INFOT = 1
+ CALL DGEQRT2( -1, 0, A, 1, T, 1, INFO )
+ CALL CHKXER( 'DGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL DGEQRT2( 0, -1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'DGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL DGEQRT2( 2, 1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'DGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL DGEQRT2( 2, 2, A, 2, T, 1, INFO )
+ CALL CHKXER( 'DGEQRT2', INFOT, NOUT, LERR, OK )
+*
+* DGEQRT3
+*
+ SRNAMT = 'DGEQRT3'
+ INFOT = 1
+ CALL DGEQRT3( -1, 0, A, 1, T, 1, INFO )
+ CALL CHKXER( 'DGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL DGEQRT3( 0, -1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'DGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL DGEQRT3( 2, 1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'DGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL DGEQRT3( 2, 2, A, 2, T, 1, INFO )
+ CALL CHKXER( 'DGEQRT3', INFOT, NOUT, LERR, OK )
+*
+* DGEMQRT
+*
+ SRNAMT = 'DGEMQRT'
+ INFOT = 1
+ CALL DGEMQRT( '/', 'N', 0, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL DGEMQRT( 'L', '/', 0, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL DGEMQRT( 'L', 'N', -1, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL DGEMQRT( 'L', 'N', 0, -1, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL DGEMQRT( 'L', 'N', 0, 0, -1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL DGEMQRT( 'R', 'N', 0, 0, -1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL DGEMQRT( 'L', 'N', 0, 0, 0, 0, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL DGEMQRT( 'R', 'N', 1, 2, 1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL DGEMQRT( 'L', 'N', 2, 1, 1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL DGEMQRT( 'R', 'N', 1, 1, 1, 1, A, 1, T, 0, C, 1, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 12
+ CALL DGEMQRT( 'L', 'N', 1, 1, 1, 1, A, 1, T, 1, C, 0, W, INFO )
+ CALL CHKXER( 'DGEMQRT', INFOT, NOUT, LERR, OK )
+*
+* Print a summary line.
+*
+ CALL ALAESM( PATH, OK, NOUT )
+*
+ RETURN
+*
+* End of DERRQRT
+*
+ END
diff --git a/TESTING/LIN/derrqrtp.f b/TESTING/LIN/derrqrtp.f
new file mode 100644
index 00000000..3e74e666
--- /dev/null
+++ b/TESTING/LIN/derrqrtp.f
@@ -0,0 +1,229 @@
+*> \brief \b DERRQRTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE DERRQRTP( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> DERRQRTP tests the error exits for the REAL routines
+*> that use the QRT decomposition of a triangular-pentagonal matrix.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRQRTP( PATH, NUNIT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NMAX
+ PARAMETER ( NMAX = 2 )
+* ..
+* .. Local Scalars ..
+ INTEGER I, INFO, J
+* ..
+* .. Local Arrays ..
+ DOUBLE PRECISION A( NMAX, NMAX ), T( NMAX, NMAX ), W( NMAX ),
+ $ B( NMAX, NMAX ), C( NMAX, NMAX )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAESM, CHKXER, DTPQRT2, DTPQRT,
+ $ DTPMQRT
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NOUT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NOUT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Intrinsic Functions ..
+ INTRINSIC DBLE
+* ..
+* .. Executable Statements ..
+*
+ NOUT = NUNIT
+ WRITE( NOUT, FMT = * )
+*
+* Set the variables to innocuous values.
+*
+ DO J = 1, NMAX
+ DO I = 1, NMAX
+ A( I, J ) = 1.D0 / DBLE( I+J )
+ C( I, J ) = 1.D0 / DBLE( I+J )
+ T( I, J ) = 1.D0 / DBLE( I+J )
+ END DO
+ W( J ) = 0.0
+ END DO
+ OK = .TRUE.
+*
+* Error exits for TPQRT factorization
+*
+* DTPQRT
+*
+ SRNAMT = 'DTPQRT'
+ INFOT = 1
+ CALL DTPQRT( -1, 1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL DTPQRT( 1, -1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL DTPQRT( 0, 1, -1, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL DTPQRT( 0, 1, 1, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL DTPQRT( 0, 1, 0, 0, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL DTPQRT( 0, 1, 0, 2, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL DTPQRT( 1, 2, 0, 2, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL DTPQRT( 2, 1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'DTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL DTPQRT( 2, 2, 1, 2, A, 2, B, 2, T, 1, W, INFO )
+ CALL CHKXER( 'DTPQRT', INFOT, NOUT, LERR, OK )
+*
+* DTPQRT2
+*
+ SRNAMT = 'DTPQRT2'
+ INFOT = 1
+ CALL DTPQRT2( -1, 0, 0, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'DTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL DTPQRT2( 0, -1, 0, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'DTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL DTPQRT2( 0, 0, -1, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'DTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL DTPQRT2( 2, 2, 0, A, 1, B, 2, T, 2, INFO )
+ CALL CHKXER( 'DTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL DTPQRT2( 2, 2, 0, A, 2, B, 1, T, 2, INFO )
+ CALL CHKXER( 'DTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL DTPQRT2( 2, 2, 0, A, 2, B, 2, T, 1, INFO )
+ CALL CHKXER( 'DTPQRT2', INFOT, NOUT, LERR, OK )
+*
+* DTPMQRT
+*
+ SRNAMT = 'DTPMQRT'
+ INFOT = 1
+ CALL DTPMQRT( '/', 'N', 0, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL DTPMQRT( 'L', '/', 0, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL DTPMQRT( 'L', 'N', -1, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL DTPMQRT( 'L', 'N', 0, -1, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL DTPMQRT( 'L', 'N', 0, 0, -1, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ INFOT = 6
+ CALL DTPMQRT( 'L', 'N', 0, 0, 0, -1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL DTPMQRT( 'L', 'N', 0, 0, 0, 0, 0, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL DTPMQRT( 'R', 'N', 1, 2, 1, 1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL DTPMQRT( 'L', 'N', 2, 1, 1, 1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 11
+ CALL DTPMQRT( 'R', 'N', 1, 1, 1, 1, 1, A, 1, T, 0, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 13
+ CALL DTPMQRT( 'L', 'N', 1, 1, 1, 1, 1, A, 1, T, 1, B, 0, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 15
+ CALL DTPMQRT( 'L', 'N', 1, 1, 1, 1, 1, A, 1, T, 1, B, 1, C, 0,
+ $ W, INFO )
+ CALL CHKXER( 'DTPMQRT', INFOT, NOUT, LERR, OK )
+*
+* Print a summary line.
+*
+ CALL ALAESM( PATH, OK, NOUT )
+*
+ RETURN
+*
+* End of DERRQRT
+*
+ END
diff --git a/TESTING/LIN/dqrt04.f b/TESTING/LIN/dqrt04.f
index b8170d5e..48d96d59 100644
--- a/TESTING/LIN/dqrt04.f
+++ b/TESTING/LIN/dqrt04.f
@@ -72,6 +72,7 @@
*
* =====================================================================
SUBROUTINE DQRT04(M,N,NB,RESULT)
+ IMPLICIT NONE
*
* -- LAPACK test routine (version 3.4.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
diff --git a/TESTING/LIN/dqrt05.f b/TESTING/LIN/dqrt05.f
index 3892a4e8..ed30a466 100644
--- a/TESTING/LIN/dqrt05.f
+++ b/TESTING/LIN/dqrt05.f
@@ -79,6 +79,7 @@
*
* =====================================================================
SUBROUTINE DQRT05(M,N,L,NB,RESULT)
+ IMPLICIT NONE
*
* -- LAPACK test routine (version 3.4.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
@@ -103,7 +104,7 @@
PARAMETER( ZERO = 0.0, ONE = 1.0 )
* ..
* .. Local Scalars ..
- INTEGER INFO, J, K, M2
+ INTEGER INFO, J, K, M2, NP1
DOUBLE PRECISION ANORM, EPS, RESID, CNORM, DNORM
* ..
* .. Local Arrays ..
@@ -120,6 +121,11 @@
EPS = DLAMCH( 'Epsilon' )
K = N
M2 = M+N
+ IF( M.GT.0 ) THEN
+ NP1 = N+1
+ ELSE
+ NP1 = 1
+ END IF
LWORK = M2*M2*NB
*
* Dynamically allocate all arrays
@@ -132,11 +138,20 @@
*
LDT=NB
CALL DLASET( 'Full', M2, N, ZERO, ZERO, A, M2 )
+ CALL DLASET( 'Full', NB, N, ZERO, ZERO, T, NB )
DO J=1,N
CALL DLARNV( 2, ISEED, J, A( 1, J ) )
- CALL DLARNV( 2, ISEED, M-L, A( MIN(N+M,N+1), J ) )
- CALL DLARNV( 2, ISEED, MIN(J,L), A( MIN(N+M,N+M-L+1), J ) )
END DO
+ IF( M.GT.0 ) THEN
+ DO J=1,N
+ CALL DLARNV( 2, ISEED, M-L, A( MIN(N+M,N+1), J ) )
+ END DO
+ END IF
+ IF( L.GT.0 ) THEN
+ DO J=1,N
+ CALL DLARNV( 2, ISEED, MIN(J,L), A( MIN(N+M,N+M-L+1), J ) )
+ END DO
+ END IF
*
* Copy the matrix A to the array AF.
*
@@ -144,7 +159,7 @@
*
* Factor the matrix A in the array AF.
*
- CALL DTPQRT( M,N,L,NB,AF,M2,AF(N+1,1),M2,T,LDT,WORK,INFO)
+ CALL DTPQRT( M,N,L,NB,AF,M2,AF(NP1,1),M2,T,LDT,WORK,INFO)
*
* Generate the (M+N)-by-(M+N) matrix Q by applying H to I
*
@@ -185,8 +200,8 @@
*
* Apply Q to C as Q*C
*
- CALL DTPMQRT( 'L','N', M,N,K,L,NB,AF(N+1,1),M2,T,LDT,CF,M2,
- $ CF(N+1,1),M2,WORK,INFO)
+ CALL DTPMQRT( 'L','N', M,N,K,L,NB,AF(NP1,1),M2,T,LDT,CF,M2,
+ $ CF(NP1,1),M2,WORK,INFO)
*
* Compute |Q*C - Q*C| / |C|
*
@@ -204,8 +219,8 @@
*
* Apply Q to C as QT*C
*
- CALL DTPMQRT( 'L','T',M,N,K,L,NB,AF(N+1,1),M2,T,LDT,CF,M2,
- $ CF(N+1,1),M2,WORK,INFO)
+ CALL DTPMQRT( 'L','T',M,N,K,L,NB,AF(NP1,1),M2,T,LDT,CF,M2,
+ $ CF(NP1,1),M2,WORK,INFO)
*
* Compute |QT*C - QT*C| / |C|
*
@@ -227,8 +242,8 @@
*
* Apply Q to D as D*Q
*
- CALL DTPMQRT('R','N',N,M,N,L,NB,AF(N+1,1),M2,T,LDT,DF,N,
- $ DF(1,N+1),N,WORK,INFO)
+ CALL DTPMQRT('R','N',N,M,N,L,NB,AF(NP1,1),M2,T,LDT,DF,N,
+ $ DF(1,NP1),N,WORK,INFO)
*
* Compute |D*Q - D*Q| / |D|
*
@@ -246,8 +261,8 @@
*
* Apply Q to D as D*QT
*
- CALL DTPMQRT('R','T',N,M,N,L,NB,AF(N+1,1),M2,T,LDT,DF,N,
- $ DF(1,N+1),N,WORK,INFO)
+ CALL DTPMQRT('R','T',N,M,N,L,NB,AF(NP1,1),M2,T,LDT,DF,N,
+ $ DF(1,NP1),N,WORK,INFO)
*
* Compute |D*QT - D*QT| / |D|
diff --git a/TESTING/LIN/schkaa.f b/TESTING/LIN/schkaa.f
index 06c460e1..7299c6dd 100644
--- a/TESTING/LIN/schkaa.f
+++ b/TESTING/LIN/schkaa.f
@@ -24,7 +24,7 @@
*> and program options using list-directed input. The remaining lines
*> specify the LAPACK test paths and the number of matrix types to use
*> in testing. An annotated example of a data file can be obtained by
-*> deleting the first 3 characters from the following 38 lines:
+*> deleting the first 3 characters from the following 40 lines:
*> Data file for testing REAL LAPACK linear eqn. routines
*> 7 Number of values of M
*> 0 1 2 3 5 10 16 Values of M (row dimension)
@@ -63,6 +63,8 @@
*> STZ 3 List types on next line if 0 < NTYPES < 3
*> SLS 6 List types on next line if 0 < NTYPES < 6
*> SEQ
+*> SQT
+*> SQX
*> \endverbatim
*
* Parameters:
@@ -159,7 +161,7 @@
$ SCHKSY_ROOK, SCHKTB, SCHKTP, SCHKTR, SCHKTZ,
$ SDRVGB, SDRVGE, SDRVGT, SDRVLS, SDRVPB, SDRVPO,
$ SDRVPP, SDRVPT, SDRVSP, SDRVSY, SDRVSY_ROOK,
- $ ILAVER
+ $ ILAVER, SCHKQRT, SCHKQRTP
* ..
* .. Scalars in Common ..
LOGICAL LERR, OK
@@ -864,6 +866,28 @@
WRITE( NOUT, FMT = 9989 )PATH
END IF
*
+ ELSE IF( LSAMEN( 2, C2, 'QT' ) ) THEN
+*
+* QT: QRT routines for general matrices
+*
+ IF( TSTCHK ) THEN
+ CALL SCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ ELSE
+ WRITE( NOUT, FMT = 9989 )PATH
+ END IF
+*
+ ELSE IF( LSAMEN( 2, C2, 'QX' ) ) THEN
+*
+* QX: QRT routines for triangular-pentagonal matrices
+*
+ IF( TSTCHK ) THEN
+ CALL SCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ ELSE
+ WRITE( NOUT, FMT = 9989 )PATH
+ END IF
+*
ELSE
*
WRITE( NOUT, FMT = 9990 )PATH
diff --git a/TESTING/LIN/schkqrt.f b/TESTING/LIN/schkqrt.f
new file mode 100644
index 00000000..de422d81
--- /dev/null
+++ b/TESTING/LIN/schkqrt.f
@@ -0,0 +1,207 @@
+*> \brief \b SCHKQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE SCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+* NBVAL, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NOUT
+* REAL THRESH
+
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> SCHKQRT tests SGEQRT and SGEMQRT.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NM, NN, NNB, NOUT
+ REAL THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NTESTS
+ PARAMETER ( NTESTS = 6 )
+* ..
+* .. Local Scalars ..
+ CHARACTER*3 PATH
+ INTEGER I, J, K, T, M, N, NB, NFAIL, NERRS, NRUN,
+ $ MINMN
+* ..
+* .. Local Arrays ..
+ REAL RESULT( NTESTS )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAERH, ALAHD, ALASUM, SERRQR, SQRT04
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NUNIT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NUNIT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Executable Statements ..
+*
+* Initialize constants
+*
+ PATH( 1: 1 ) = 'S'
+ PATH( 2: 3 ) = 'QT'
+ NRUN = 0
+ NFAIL = 0
+ NERRS = 0
+*
+* Test the error exits
+*
+ IF( TSTERR ) CALL SERRQRT( PATH, NOUT )
+ INFOT = 0
+*
+* Do for each value of M in MVAL.
+*
+ DO I = 1, NM
+ M = MVAL( I )
+*
+* Do for each value of N in NVAL.
+*
+ DO J = 1, NN
+ N = NVAL( J )
+*
+* Do for each possible value of NB
+*
+ MINMN = MIN( M, N )
+ DO K = 1, NNB
+ NB = NBVAL( K )
+ IF( (NB.LE.MINMN).AND.(NB.GT.0) ) THEN
+*
+* Test SGEQRT and SGEMQRT
+*
+ CALL SQRT04( M, N, NB, RESULT )
+*
+* Print information about the tests that did not
+* pass the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 )M, N, NB,
+ $ T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+ NRUN = NRUN + NTESTS
+ END IF
+ END DO
+ END DO
+ END DO
+*
+* Print a summary of the results.
+*
+ CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' M=', I5, ', N=', I5, ', NB=', I4,
+ $ ' test(', I2, ')=', G12.5 )
+ RETURN
+*
+* End of SCHKQRT
+*
+ END
diff --git a/TESTING/LIN/schkqrtp.f b/TESTING/LIN/schkqrtp.f
new file mode 100644
index 00000000..11e62a4b
--- /dev/null
+++ b/TESTING/LIN/schkqrtp.f
@@ -0,0 +1,215 @@
+*> \brief \b SCHKQRTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE SCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+* NBVAL, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> SCHKQRTP tests STPQRT and STPMQRT.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NM, NN, NNB, NOUT
+ REAL THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NTESTS
+ PARAMETER ( NTESTS = 6 )
+* ..
+* .. Local Scalars ..
+ CHARACTER*3 PATH
+ INTEGER I, J, K, T, L, M, N, NB, NFAIL, NERRS, NRUN,
+ $ MINMN
+* ..
+* .. Local Arrays ..
+ REAL RESULT( NTESTS )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAERH, ALAHD, ALASUM, SERRQR, SQRT04
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NUNIT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NUNIT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Executable Statements ..
+*
+* Initialize constants
+*
+ PATH( 1: 1 ) = 'S'
+ PATH( 2: 3 ) = 'QX'
+ NRUN = 0
+ NFAIL = 0
+ NERRS = 0
+*
+* Test the error exits
+*
+ IF( TSTERR ) CALL SERRQRTP( PATH, NOUT )
+ INFOT = 0
+*
+* Do for each value of M
+*
+ DO I = 1, NM
+ M = MVAL( I )
+*
+* Do for each value of N
+*
+ DO J = 1, NN
+ N = NVAL( J )
+*
+* Do for each value of L
+*
+ MINMN = MIN( M, N )
+ DO L = 0, MINMN, MAX( MINMN, 1 )
+*
+* Do for each possible value of NB
+*
+ DO K = 1, NNB
+ NB = NBVAL( K )
+*
+* Test STPQRT and STPMQRT
+*
+ IF( (NB.LE.N).AND.(NB.GT.0) ) THEN
+ CALL SQRT05( M, N, L, NB, RESULT )
+*
+* Print information about the tests that did not
+* pass the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 )M, N, NB, L,
+ $ T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+ NRUN = NRUN + NTESTS
+ END IF
+ END DO
+ END DO
+ END DO
+ END DO
+*
+* Print a summary of the results.
+*
+ CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' M=', I5, ', N=', I5, ', NB=', I4, ', L=', I4,
+ $ ' test(', I2, ')=', G12.5 )
+ RETURN
+*
+* End of SCHKQRTP
+*
+ END
diff --git a/TESTING/LIN/serrqrt.f b/TESTING/LIN/serrqrt.f
new file mode 100644
index 00000000..c8650d35
--- /dev/null
+++ b/TESTING/LIN/serrqrt.f
@@ -0,0 +1,213 @@
+*> \brief \b SERRQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE SERRQRT( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> SERRQRT tests the error exits for the REAL routines
+*> that use the QRT decomposition of a general matrix.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRQRT( PATH, NUNIT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NMAX
+ PARAMETER ( NMAX = 2 )
+* ..
+* .. Local Scalars ..
+ INTEGER I, INFO, J
+* ..
+* .. Local Arrays ..
+ REAL A( NMAX, NMAX ), T( NMAX, NMAX ), W( NMAX ),
+ $ C( NMAX, NMAX )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAESM, CHKXER, SGEQRT2, SGEQRT3, SGEQRT,
+ $ SGEMQRT
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NOUT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NOUT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Intrinsic Functions ..
+ INTRINSIC FLOAT
+* ..
+* .. Executable Statements ..
+*
+ NOUT = NUNIT
+ WRITE( NOUT, FMT = * )
+*
+* Set the variables to innocuous values.
+*
+ DO J = 1, NMAX
+ DO I = 1, NMAX
+ A( I, J ) = 1.0 / FLOAT( I+J )
+ C( I, J ) = 1.0 / FLOAT( I+J )
+ T( I, J ) = 1.0 / FLOAT( I+J )
+ END DO
+ W( J ) = 0.0
+ END DO
+ OK = .TRUE.
+*
+* Error exits for QRT factorization
+*
+* SGEQRT
+*
+ SRNAMT = 'SGEQRT'
+ INFOT = 1
+ CALL SGEQRT( -1, 0, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'SGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL SGEQRT( 0, -1, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'SGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL SGEQRT( 0, 0, 0, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'SGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL SGEQRT( 2, 1, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'SGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL SGEQRT( 2, 2, 2, A, 2, T, 1, W, INFO )
+ CALL CHKXER( 'SGEQRT', INFOT, NOUT, LERR, OK )
+*
+* SGEQRT2
+*
+ SRNAMT = 'SGEQRT2'
+ INFOT = 1
+ CALL SGEQRT2( -1, 0, A, 1, T, 1, INFO )
+ CALL CHKXER( 'SGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL SGEQRT2( 0, -1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'SGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL SGEQRT2( 2, 1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'SGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL SGEQRT2( 2, 2, A, 2, T, 1, INFO )
+ CALL CHKXER( 'SGEQRT2', INFOT, NOUT, LERR, OK )
+*
+* SGEQRT3
+*
+ SRNAMT = 'SGEQRT3'
+ INFOT = 1
+ CALL SGEQRT3( -1, 0, A, 1, T, 1, INFO )
+ CALL CHKXER( 'SGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL SGEQRT3( 0, -1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'SGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL SGEQRT3( 2, 1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'SGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL SGEQRT3( 2, 2, A, 2, T, 1, INFO )
+ CALL CHKXER( 'SGEQRT3', INFOT, NOUT, LERR, OK )
+*
+* SGEMQRT
+*
+ SRNAMT = 'SGEMQRT'
+ INFOT = 1
+ CALL SGEMQRT( '/', 'N', 0, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL SGEMQRT( 'L', '/', 0, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL SGEMQRT( 'L', 'N', -1, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL SGEMQRT( 'L', 'N', 0, -1, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL SGEMQRT( 'L', 'N', 0, 0, -1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL SGEMQRT( 'R', 'N', 0, 0, -1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL SGEMQRT( 'L', 'N', 0, 0, 0, 0, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL SGEMQRT( 'R', 'N', 1, 2, 1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL SGEMQRT( 'L', 'N', 2, 1, 1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL SGEMQRT( 'R', 'N', 1, 1, 1, 1, A, 1, T, 0, C, 1, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 12
+ CALL SGEMQRT( 'L', 'N', 1, 1, 1, 1, A, 1, T, 1, C, 0, W, INFO )
+ CALL CHKXER( 'SGEMQRT', INFOT, NOUT, LERR, OK )
+*
+* Print a summary line.
+*
+ CALL ALAESM( PATH, OK, NOUT )
+*
+ RETURN
+*
+* End of SERRQRT
+*
+ END
diff --git a/TESTING/LIN/serrqrtp.f b/TESTING/LIN/serrqrtp.f
new file mode 100644
index 00000000..2550cae7
--- /dev/null
+++ b/TESTING/LIN/serrqrtp.f
@@ -0,0 +1,229 @@
+*> \brief \b SERRQRTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE SERRQRTP( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> SERRQRTP tests the error exits for the REAL routines
+*> that use the QRT decomposition of a triangular-pentagonal matrix.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRQRTP( PATH, NUNIT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NMAX
+ PARAMETER ( NMAX = 2 )
+* ..
+* .. Local Scalars ..
+ INTEGER I, INFO, J
+* ..
+* .. Local Arrays ..
+ REAL A( NMAX, NMAX ), T( NMAX, NMAX ), W( NMAX ),
+ $ B( NMAX, NMAX ), C( NMAX, NMAX )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAESM, CHKXER, STPQRT2, STPQRT,
+ $ STPMQRT
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NOUT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NOUT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Intrinsic Functions ..
+ INTRINSIC FLOAT
+* ..
+* .. Executable Statements ..
+*
+ NOUT = NUNIT
+ WRITE( NOUT, FMT = * )
+*
+* Set the variables to innocuous values.
+*
+ DO J = 1, NMAX
+ DO I = 1, NMAX
+ A( I, J ) = 1.0 / FLOAT( I+J )
+ C( I, J ) = 1.0 / FLOAT( I+J )
+ T( I, J ) = 1.0 / FLOAT( I+J )
+ END DO
+ W( J ) = 0.0
+ END DO
+ OK = .TRUE.
+*
+* Error exits for TPQRT factorization
+*
+* STPQRT
+*
+ SRNAMT = 'STPQRT'
+ INFOT = 1
+ CALL STPQRT( -1, 1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'STPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL STPQRT( 1, -1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'STPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL STPQRT( 0, 1, -1, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'STPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL STPQRT( 0, 1, 1, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'STPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL STPQRT( 0, 1, 0, 0, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'STPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL STPQRT( 0, 1, 0, 2, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'STPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL STPQRT( 1, 2, 0, 2, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'STPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL STPQRT( 2, 1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'STPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL STPQRT( 2, 2, 1, 2, A, 2, B, 2, T, 1, W, INFO )
+ CALL CHKXER( 'STPQRT', INFOT, NOUT, LERR, OK )
+*
+* STPQRT2
+*
+ SRNAMT = 'STPQRT2'
+ INFOT = 1
+ CALL STPQRT2( -1, 0, 0, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'STPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL STPQRT2( 0, -1, 0, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'STPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL STPQRT2( 0, 0, -1, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'STPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL STPQRT2( 2, 2, 0, A, 1, B, 2, T, 2, INFO )
+ CALL CHKXER( 'STPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL STPQRT2( 2, 2, 0, A, 2, B, 1, T, 2, INFO )
+ CALL CHKXER( 'STPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL STPQRT2( 2, 2, 0, A, 2, B, 2, T, 1, INFO )
+ CALL CHKXER( 'STPQRT2', INFOT, NOUT, LERR, OK )
+*
+* STPMQRT
+*
+ SRNAMT = 'STPMQRT'
+ INFOT = 1
+ CALL STPMQRT( '/', 'N', 0, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL STPMQRT( 'L', '/', 0, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL STPMQRT( 'L', 'N', -1, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL STPMQRT( 'L', 'N', 0, -1, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL STPMQRT( 'L', 'N', 0, 0, -1, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ INFOT = 6
+ CALL STPMQRT( 'L', 'N', 0, 0, 0, -1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL STPMQRT( 'L', 'N', 0, 0, 0, 0, 0, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL STPMQRT( 'R', 'N', 1, 2, 1, 1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL STPMQRT( 'L', 'N', 2, 1, 1, 1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 11
+ CALL STPMQRT( 'R', 'N', 1, 1, 1, 1, 1, A, 1, T, 0, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 13
+ CALL STPMQRT( 'L', 'N', 1, 1, 1, 1, 1, A, 1, T, 1, B, 0, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 15
+ CALL STPMQRT( 'L', 'N', 1, 1, 1, 1, 1, A, 1, T, 1, B, 1, C, 0,
+ $ W, INFO )
+ CALL CHKXER( 'STPMQRT', INFOT, NOUT, LERR, OK )
+*
+* Print a summary line.
+*
+ CALL ALAESM( PATH, OK, NOUT )
+*
+ RETURN
+*
+* End of SERRQRT
+*
+ END
diff --git a/TESTING/LIN/sqrt04.f b/TESTING/LIN/sqrt04.f
index 1e596ae5..ac1841e6 100644
--- a/TESTING/LIN/sqrt04.f
+++ b/TESTING/LIN/sqrt04.f
@@ -72,6 +72,7 @@
*
* =====================================================================
SUBROUTINE SQRT04(M,N,NB,RESULT)
+ IMPLICIT NONE
*
* -- LAPACK test routine (version 3.4.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
diff --git a/TESTING/LIN/sqrt05.f b/TESTING/LIN/sqrt05.f
index 5440f640..c2cdc102 100644
--- a/TESTING/LIN/sqrt05.f
+++ b/TESTING/LIN/sqrt05.f
@@ -79,6 +79,7 @@
*
* =====================================================================
SUBROUTINE SQRT05(M,N,L,NB,RESULT)
+ IMPLICIT NONE
*
* -- LAPACK test routine (version 3.4.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
@@ -103,7 +104,7 @@
PARAMETER( ZERO = 0.0, ONE = 1.0 )
* ..
* .. Local Scalars ..
- INTEGER INFO, J, K, M2
+ INTEGER INFO, J, K, M2, NP1
REAL ANORM, EPS, RESID, CNORM, DNORM
* ..
* .. Local Arrays ..
@@ -121,6 +122,11 @@
EPS = SLAMCH( 'Epsilon' )
K = N
M2 = M+N
+ IF( M.GT.0 ) THEN
+ NP1 = N+1
+ ELSE
+ NP1 = 1
+ END IF
LWORK = M2*M2*NB
*
* Dynamically allocate all arrays
@@ -133,11 +139,20 @@
*
LDT=NB
CALL SLASET( 'Full', M2, N, ZERO, ZERO, A, M2 )
+ CALL SLASET( 'Full', NB, N, ZERO, ZERO, T, NB )
DO J=1,N
CALL SLARNV( 2, ISEED, J, A( 1, J ) )
- CALL SLARNV( 2, ISEED, M-L, A( MIN(N+M,N+1), J ) )
- CALL SLARNV( 2, ISEED, MIN(J,L), A( MIN(N+M,N+M-L+1), J ) )
END DO
+ IF( M.GT.0 ) THEN
+ DO J=1,N
+ CALL SLARNV( 2, ISEED, M-L, A( N+1, J ) )
+ END DO
+ END IF
+ IF( L.GT.0 ) THEN
+ DO J=1,N
+ CALL SLARNV( 2, ISEED, MIN(J,L), A( N+M-L+1, J ) )
+ END DO
+ END IF
*
* Copy the matrix A to the array AF.
*
@@ -145,7 +160,7 @@
*
* Factor the matrix A in the array AF.
*
- CALL STPQRT( M,N,L,NB,AF,M2,AF(N+1,1),M2,T,LDT,WORK,INFO)
+ CALL STPQRT( M,N,L,NB,AF,M2,AF(NP1,1),M2,T,LDT,WORK,INFO)
*
* Generate the (M+N)-by-(M+N) matrix Q by applying H to I
*
@@ -187,12 +202,12 @@
*
* Apply Q to C as Q*C
*
- CALL STPMQRT( 'L','N', M,N,K,L,NB,AF(N+1,1),M2,T,LDT,CF,M2,
- $ CF(N+1,1),M2,WORK,INFO)
+ CALL STPMQRT( 'L','N', M,N,K,L,NB,AF(NP1,1),M2,T,LDT,CF,
+ $ M2,CF(NP1,1),M2,WORK,INFO)
*
* Compute |Q*C - Q*C| / |C|
*
- CALL SGEMM( 'N', 'N', M2, N, M2, -ONE, Q, M2, C, M2, ONE, CF, M2 )
+ CALL SGEMM( 'N', 'N', M2, N, M2, -ONE, Q,M2,C,M2,ONE,CF,M2)
RESID = SLANGE( '1', M2, N, CF, M2, RWORK )
IF( CNORM.GT.ZERO ) THEN
RESULT( 3 ) = RESID / (EPS*MAX(1,M2)*CNORM)
@@ -206,8 +221,8 @@
*
* Apply Q to C as QT*C
*
- CALL STPMQRT( 'L','T',M,N,K,L,NB,AF(N+1,1),M2,T,LDT,CF,M2,
- $ CF(N+1,1),M2,WORK,INFO)
+ CALL STPMQRT('L','T',M,N,K,L,NB,AF(NP1,1),M2,T,LDT,CF,M2,
+ $ CF(NP1,1),M2,WORK,INFO)
*
* Compute |QT*C - QT*C| / |C|
*
@@ -229,8 +244,8 @@
*
* Apply Q to D as D*Q
*
- CALL STPMQRT('R','N',N,M,N,L,NB,AF(N+1,1),M2,T,LDT,DF,N,
- $ DF(1,N+1),N,WORK,INFO)
+ CALL STPMQRT('R','N',N,M,N,L,NB,AF(NP1,1),M2,T,LDT,DF,N,
+ $ DF(1,NP1),N,WORK,INFO)
*
* Compute |D*Q - D*Q| / |D|
*
@@ -248,8 +263,8 @@
*
* Apply Q to D as D*QT
*
- CALL STPMQRT('R','T',N,M,N,L,NB,AF(N+1,1),M2,T,LDT,DF,N,
- $ DF(1,N+1),N,WORK,INFO)
+ CALL STPMQRT('R','T',N,M,N,L,NB,AF(NP1,1),M2,T,LDT,DF,N,
+ $ DF(1,NP1),N,WORK,INFO)
*
* Compute |D*QT - D*QT| / |D|
diff --git a/TESTING/LIN/zchkaa.f b/TESTING/LIN/zchkaa.f
index 01e5213d..41acd3e1 100644
--- a/TESTING/LIN/zchkaa.f
+++ b/TESTING/LIN/zchkaa.f
@@ -24,7 +24,7 @@
*> and program options using list-directed input. The remaining lines
*> specify the LAPACK test paths and the number of matrix types to use
*> in testing. An annotated example of a data file can be obtained by
-*> deleting the first 3 characters from the following 40 lines:
+*> deleting the first 3 characters from the following 42 lines:
*> Data file for testing COMPLEX*16 LAPACK linear equation routines
*> 7 Number of values of M
*> 0 1 2 3 5 10 16 Values of M (row dimension)
@@ -65,6 +65,8 @@
*> ZTZ 3 List types on next line if 0 < NTYPES < 3
*> ZLS 6 List types on next line if 0 < NTYPES < 6
*> ZEQ
+*> ZQT
+*> ZQX
*> \endverbatim
*
* Parameters:
@@ -161,7 +163,8 @@
$ ZCHKSP, ZCHKSY, ZCHKSY_ROOK, ZCHKTB, ZCHKTP,
$ ZCHKTR, ZCHKTZ, ZDRVGB, ZDRVGE, ZDRVGT, ZDRVHE,
$ ZDRVHP, ZDRVLS, ZDRVPB, ZDRVPO, ZDRVPP, ZDRVPT,
- $ ZDRVSP, ZDRVSY, ZDRVSY_ROOK, ILAVER
+ $ ZDRVSP, ZDRVSY, ZDRVSY_ROOK, ILAVER, ZCHKQRT,
+ $ ZCHKQRTP
* ..
* .. Scalars in Common ..
LOGICAL LERR, OK
@@ -914,6 +917,29 @@
WRITE( NOUT, FMT = 9989 )PATH
END IF
*
+*
+ ELSE IF( LSAMEN( 2, C2, 'QT' ) ) THEN
+*
+* QT: QRT routines for general matrices
+*
+ IF( TSTCHK ) THEN
+ CALL ZCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ ELSE
+ WRITE( NOUT, FMT = 9989 )PATH
+ END IF
+*
+ ELSE IF( LSAMEN( 2, C2, 'QX' ) ) THEN
+*
+* QX: QRT routines for triangular-pentagonal matrices
+*
+ IF( TSTCHK ) THEN
+ CALL ZCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ ELSE
+ WRITE( NOUT, FMT = 9989 )PATH
+ END IF
+*
ELSE
*
WRITE( NOUT, FMT = 9990 )PATH
diff --git a/TESTING/LIN/zchkqrt.f b/TESTING/LIN/zchkqrt.f
new file mode 100644
index 00000000..e13fcc89
--- /dev/null
+++ b/TESTING/LIN/zchkqrt.f
@@ -0,0 +1,209 @@
+*> \brief \b ZCHKQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE ZCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+* NBVAL, NOUT )
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> ZCHKQRT tests ZGEQRT and ZGEMQRT.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZCHKQRT( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NM, NN, NNB, NOUT
+ DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NTESTS
+ PARAMETER ( NTESTS = 6 )
+* ..
+* .. Local Scalars ..
+ CHARACTER*3 PATH
+ INTEGER I, J, K, T, M, N, NB, NFAIL, NERRS, NRUN,
+ $ MINMN
+* ..
+* .. Local Arrays ..
+ DOUBLE PRECISION RESULT( NTESTS )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAERH, ALAHD, ALASUM, ZQRT04
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NUNIT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NUNIT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Executable Statements ..
+*
+* Initialize constants
+*
+ PATH( 1: 1 ) = 'Z'
+ PATH( 2: 3 ) = 'QT'
+ NRUN = 0
+ NFAIL = 0
+ NERRS = 0
+*
+* Test the error exits
+*
+ IF( TSTERR ) CALL ZERRQRT( PATH, NOUT )
+ INFOT = 0
+*
+* Do for each value of M in MVAL.
+*
+ DO I = 1, NM
+ M = MVAL( I )
+*
+* Do for each value of N in NVAL.
+*
+ DO J = 1, NN
+ N = NVAL( J )
+*
+* Do for each possible value of NB
+*
+ MINMN = MIN( M, N )
+ DO K = 1, NNB
+ NB = NBVAL( K )
+*
+* Test ZGEQRT and ZGEMQRT
+*
+ IF( (NB.LE.MINMN).AND.(NB.GT.0) ) THEN
+ CALL ZQRT04( M, N, NB, RESULT )
+*
+* Print information about the tests that did not
+* pass the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 )M, N, NB,
+ $ T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+ NRUN = NRUN + NTESTS
+ END IF
+ END DO
+ END DO
+ END DO
+*
+* Print a summary of the results.
+*
+ CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' M=', I5, ', N=', I5, ', NB=', I4,
+ $ ' test(', I2, ')=', G12.5 )
+ RETURN
+*
+* End of ZCHKQRT
+*
+ END
diff --git a/TESTING/LIN/zchkqrtp.f b/TESTING/LIN/zchkqrtp.f
new file mode 100644
index 00000000..0268f19e
--- /dev/null
+++ b/TESTING/LIN/zchkqrtp.f
@@ -0,0 +1,215 @@
+*> \brief \b ZCHKQRTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE ZCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+* NBVAL, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> ZCHKQRTP tests ZTPQRT and ZTPMQRT.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZCHKQRTP( THRESH, TSTERR, NM, MVAL, NN, NVAL, NNB,
+ $ NBVAL, NOUT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NM, NN, NNB, NOUT
+ DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER MVAL( * ), NBVAL( * ), NVAL( * )
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NTESTS
+ PARAMETER ( NTESTS = 6 )
+* ..
+* .. Local Scalars ..
+ CHARACTER*3 PATH
+ INTEGER I, J, K, T, L, M, N, NB, NFAIL, NERRS, NRUN,
+ $ MINMN
+* ..
+* .. Local Arrays ..
+ DOUBLE PRECISION RESULT( NTESTS )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAERH, ALAHD, ALASUM, SERRQR, SQRT04
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NUNIT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NUNIT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Executable Statements ..
+*
+* Initialize constants
+*
+ PATH( 1: 1 ) = 'Z'
+ PATH( 2: 3 ) = 'QX'
+ NRUN = 0
+ NFAIL = 0
+ NERRS = 0
+*
+* Test the error exits
+*
+ IF( TSTERR ) CALL ZERRQRTP( PATH, NOUT )
+ INFOT = 0
+*
+* Do for each value of M
+*
+ DO I = 1, NM
+ M = MVAL( I )
+*
+* Do for each value of N
+*
+ DO J = 1, NN
+ N = NVAL( J )
+*
+* Do for each value of L
+*
+ MINMN = MIN( M, N )
+ DO L = 0, MINMN, MAX( MINMN, 1 )
+*
+* Do for each possible value of NB
+*
+ DO K = 1, NNB
+ NB = NBVAL( K )
+*
+* Test ZTPQRT and ZTPMQRT
+*
+ IF( (NB.LE.N).AND.(NB.GT.0) ) THEN
+ CALL ZQRT05( M, N, L, NB, RESULT )
+*
+* Print information about the tests that did not
+* pass the threshold.
+*
+ DO T = 1, NTESTS
+ IF( RESULT( T ).GE.THRESH ) THEN
+ IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+ $ CALL ALAHD( NOUT, PATH )
+ WRITE( NOUT, FMT = 9999 )M, N, NB,
+ $ T, RESULT( T )
+ NFAIL = NFAIL + 1
+ END IF
+ END DO
+ NRUN = NRUN + NTESTS
+ END IF
+ END DO
+ END DO
+ END DO
+ END DO
+*
+* Print a summary of the results.
+*
+ CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' M=', I5, ', N=', I5, ', NB=', I4,
+ $ ' test(', I2, ')=', G12.5 )
+ RETURN
+*
+* End of ZCHKQRTP
+*
+ END
diff --git a/TESTING/LIN/zerrqrt.f b/TESTING/LIN/zerrqrt.f
new file mode 100644
index 00000000..ea5b6c54
--- /dev/null
+++ b/TESTING/LIN/zerrqrt.f
@@ -0,0 +1,213 @@
+*> \brief \b ZERRQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE ZERRQRT( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> ZERRQRT tests the error exits for the COMPLEX*16 routines
+*> that use the QRT decomposition of a general matrix.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRQRT( PATH, NUNIT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NMAX
+ PARAMETER ( NMAX = 2 )
+* ..
+* .. Local Scalars ..
+ INTEGER I, INFO, J
+* ..
+* .. Local Arrays ..
+ COMPLEX*16 A( NMAX, NMAX ), T( NMAX, NMAX ), W( NMAX ),
+ $ C( NMAX, NMAX )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAESM, CHKXER, ZGEQRT2, ZGEQRT3, ZGEQRT,
+ $ ZGEMQRT
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NOUT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NOUT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Intrinsic Functions ..
+ INTRINSIC DBLE, DCMPLX
+* ..
+* .. Executable Statements ..
+*
+ NOUT = NUNIT
+ WRITE( NOUT, FMT = * )
+*
+* Set the variables to innocuous values.
+*
+ DO J = 1, NMAX
+ DO I = 1, NMAX
+ A( I, J ) = 1.D0 / DCMPLX( DBLE( I+J ), 0.D0 )
+ C( I, J ) = 1.D0 / DCMPLX( DBLE( I+J ), 0.D0 )
+ T( I, J ) = 1.D0 / DCMPLX( DBLE( I+J ), 0.D0 )
+ END DO
+ W( J ) = 0.D0
+ END DO
+ OK = .TRUE.
+*
+* Error exits for QRT factorization
+*
+* ZGEQRT
+*
+ SRNAMT = 'ZGEQRT'
+ INFOT = 1
+ CALL ZGEQRT( -1, 0, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL ZGEQRT( 0, -1, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL ZGEQRT( 0, 0, 0, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL ZGEQRT( 2, 1, 1, A, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZGEQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL ZGEQRT( 2, 2, 2, A, 2, T, 1, W, INFO )
+ CALL CHKXER( 'ZGEQRT', INFOT, NOUT, LERR, OK )
+*
+* ZGEQRT2
+*
+ SRNAMT = 'ZGEQRT2'
+ INFOT = 1
+ CALL ZGEQRT2( -1, 0, A, 1, T, 1, INFO )
+ CALL CHKXER( 'ZGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL ZGEQRT2( 0, -1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'ZGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL ZGEQRT2( 2, 1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'ZGEQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL ZGEQRT2( 2, 2, A, 2, T, 1, INFO )
+ CALL CHKXER( 'ZGEQRT2', INFOT, NOUT, LERR, OK )
+*
+* ZGEQRT3
+*
+ SRNAMT = 'ZGEQRT3'
+ INFOT = 1
+ CALL ZGEQRT3( -1, 0, A, 1, T, 1, INFO )
+ CALL CHKXER( 'ZGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL ZGEQRT3( 0, -1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'ZGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL ZGEQRT3( 2, 1, A, 1, T, 1, INFO )
+ CALL CHKXER( 'ZGEQRT3', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL ZGEQRT3( 2, 2, A, 2, T, 1, INFO )
+ CALL CHKXER( 'ZGEQRT3', INFOT, NOUT, LERR, OK )
+*
+* ZGEMQRT
+*
+ SRNAMT = 'ZGEMQRT'
+ INFOT = 1
+ CALL ZGEMQRT( '/', 'N', 0, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL ZGEMQRT( 'L', '/', 0, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL ZGEMQRT( 'L', 'N', -1, 0, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL ZGEMQRT( 'L', 'N', 0, -1, 0, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL ZGEMQRT( 'L', 'N', 0, 0, -1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL ZGEMQRT( 'R', 'N', 0, 0, -1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL ZGEMQRT( 'L', 'N', 0, 0, 0, 0, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL ZGEMQRT( 'R', 'N', 1, 2, 1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL ZGEMQRT( 'L', 'N', 2, 1, 1, 1, A, 1, T, 1, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL ZGEMQRT( 'R', 'N', 1, 1, 1, 1, A, 1, T, 0, C, 1, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 12
+ CALL ZGEMQRT( 'L', 'N', 1, 1, 1, 1, A, 1, T, 1, C, 0, W, INFO )
+ CALL CHKXER( 'ZGEMQRT', INFOT, NOUT, LERR, OK )
+*
+* Print a summary line.
+*
+ CALL ALAESM( PATH, OK, NOUT )
+*
+ RETURN
+*
+* End of ZERRQRT
+*
+ END
diff --git a/TESTING/LIN/zerrqrtp.f b/TESTING/LIN/zerrqrtp.f
new file mode 100644
index 00000000..7a903f9e
--- /dev/null
+++ b/TESTING/LIN/zerrqrtp.f
@@ -0,0 +1,229 @@
+*> \brief \b ZERRQRTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition:
+* ===========
+*
+* SUBROUTINE ZERRQRTP( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
+*
+*> \par Purpose:
+* =============
+*>
+*> \verbatim
+*>
+*> ZERRQRTP tests the error exits for the COMPLEX*16 routines
+*> that use the QRT decomposition of a triangular-pentagonal matrix.
+*> \endverbatim
+*
+* Arguments:
+* ==========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*
+* Authors:
+* ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRQRTP( PATH, NUNIT )
+ IMPLICIT NONE
+*
+* -- LAPACK test routine (version 3.4.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
+ INTEGER NMAX
+ PARAMETER ( NMAX = 2 )
+* ..
+* .. Local Scalars ..
+ INTEGER I, INFO, J
+* ..
+* .. Local Arrays ..
+ COMPLEX*16 A( NMAX, NMAX ), T( NMAX, NMAX ), W( NMAX ),
+ $ B( NMAX, NMAX ), C( NMAX, NMAX )
+* ..
+* .. External Subroutines ..
+ EXTERNAL ALAESM, CHKXER, ZTPQRT2, ZTPQRT,
+ $ ZTPMQRT
+* ..
+* .. Scalars in Common ..
+ LOGICAL LERR, OK
+ CHARACTER*32 SRNAMT
+ INTEGER INFOT, NOUT
+* ..
+* .. Common blocks ..
+ COMMON / INFOC / INFOT, NOUT, OK, LERR
+ COMMON / SRNAMC / SRNAMT
+* ..
+* .. Intrinsic Functions ..
+ INTRINSIC DBLE, DCMPLX
+* ..
+* .. Executable Statements ..
+*
+ NOUT = NUNIT
+ WRITE( NOUT, FMT = * )
+*
+* Set the variables to innocuous values.
+*
+ DO J = 1, NMAX
+ DO I = 1, NMAX
+ A( I, J ) = 1.D0 / DCMPLX(DBLE( I+J ),0.D0)
+ C( I, J ) = 1.D0 / DCMPLX(DBLE( I+J ),0.D0)
+ T( I, J ) = 1.D0 / DCMPLX(DBLE( I+J ),0.D0)
+ END DO
+ W( J ) = DCMPLX(0.D0,0.D0)
+ END DO
+ OK = .TRUE.
+*
+* Error exits for TPQRT factorization
+*
+* ZTPQRT
+*
+ SRNAMT = 'ZTPQRT'
+ INFOT = 1
+ CALL ZTPQRT( -1, 1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL ZTPQRT( 1, -1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL ZTPQRT( 0, 1, -1, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL ZTPQRT( 0, 1, 1, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL ZTPQRT( 0, 1, 0, 0, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL ZTPQRT( 0, 1, 0, 2, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 6
+ CALL ZTPQRT( 1, 2, 0, 2, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 8
+ CALL ZTPQRT( 2, 1, 0, 1, A, 1, B, 1, T, 1, W, INFO )
+ CALL CHKXER( 'ZTPQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 10
+ CALL ZTPQRT( 2, 2, 1, 2, A, 2, B, 2, T, 1, W, INFO )
+ CALL CHKXER( 'ZTPQRT', INFOT, NOUT, LERR, OK )
+*
+* ZTPQRT2
+*
+ SRNAMT = 'ZTPQRT2'
+ INFOT = 1
+ CALL ZTPQRT2( -1, 0, 0, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'ZTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL ZTPQRT2( 0, -1, 0, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'ZTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL ZTPQRT2( 0, 0, -1, A, 1, B, 1, T, 1, INFO )
+ CALL CHKXER( 'ZTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL ZTPQRT2( 2, 2, 0, A, 1, B, 2, T, 2, INFO )
+ CALL CHKXER( 'ZTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL ZTPQRT2( 2, 2, 0, A, 2, B, 1, T, 2, INFO )
+ CALL CHKXER( 'ZTPQRT2', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL ZTPQRT2( 2, 2, 0, A, 2, B, 2, T, 1, INFO )
+ CALL CHKXER( 'ZTPQRT2', INFOT, NOUT, LERR, OK )
+*
+* ZTPMQRT
+*
+ SRNAMT = 'ZTPMQRT'
+ INFOT = 1
+ CALL ZTPMQRT( '/', 'N', 0, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 2
+ CALL ZTPMQRT( 'L', '/', 0, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 3
+ CALL ZTPMQRT( 'L', 'N', -1, 0, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 4
+ CALL ZTPMQRT( 'L', 'N', 0, -1, 0, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 5
+ CALL ZTPMQRT( 'L', 'N', 0, 0, -1, 0, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ INFOT = 6
+ CALL ZTPMQRT( 'L', 'N', 0, 0, 0, -1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 7
+ CALL ZTPMQRT( 'L', 'N', 0, 0, 0, 0, 0, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL ZTPMQRT( 'R', 'N', 1, 2, 1, 1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 9
+ CALL ZTPMQRT( 'L', 'N', 2, 1, 1, 1, 1, A, 1, T, 1, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 11
+ CALL ZTPMQRT( 'R', 'N', 1, 1, 1, 1, 1, A, 1, T, 0, B, 1, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 13
+ CALL ZTPMQRT( 'L', 'N', 1, 1, 1, 1, 1, A, 1, T, 1, B, 0, C, 1,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+ INFOT = 15
+ CALL ZTPMQRT( 'L', 'N', 1, 1, 1, 1, 1, A, 1, T, 1, B, 1, C, 0,
+ $ W, INFO )
+ CALL CHKXER( 'ZTPMQRT', INFOT, NOUT, LERR, OK )
+*
+* Print a summary line.
+*
+ CALL ALAESM( PATH, OK, NOUT )
+*
+ RETURN
+*
+* End of ZERRQRT
+*
+ END
diff --git a/TESTING/LIN/zqrt04.f b/TESTING/LIN/zqrt04.f
index 997edd38..e453c594 100644
--- a/TESTING/LIN/zqrt04.f
+++ b/TESTING/LIN/zqrt04.f
@@ -72,6 +72,7 @@
*
* =====================================================================
SUBROUTINE ZQRT04(M,N,NB,RESULT)
+ IMPLICIT NONE
*
* -- LAPACK test routine (version 3.4.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
diff --git a/TESTING/LIN/zqrt05.f b/TESTING/LIN/zqrt05.f
index 20cc756d..c7b6ad24 100644
--- a/TESTING/LIN/zqrt05.f
+++ b/TESTING/LIN/zqrt05.f
@@ -79,6 +79,7 @@
*
* =====================================================================
SUBROUTINE ZQRT05(M,N,L,NB,RESULT)
+ IMPLICIT NONE
*
* -- LAPACK test routine (version 3.4.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
@@ -104,7 +105,7 @@
PARAMETER( ZERO = 0.0, ONE = (1.0,0.0), CZERO=(0.0,0.0) )
* ..
* .. Local Scalars ..
- INTEGER INFO, J, K, M2
+ INTEGER INFO, J, K, M2, NP1
DOUBLE PRECISION ANORM, EPS, RESID, CNORM, DNORM
* ..
* .. Local Arrays ..
@@ -122,6 +123,11 @@
EPS = DLAMCH( 'Epsilon' )
K = N
M2 = M+N
+ IF( M.GT.0 ) THEN
+ NP1 = N+1
+ ELSE
+ NP1 = 1
+ END IF
LWORK = M2*M2*NB
*
* Dynamically allocate all arrays
@@ -134,11 +140,20 @@
*
LDT=NB
CALL ZLASET( 'Full', M2, N, CZERO, CZERO, A, M2 )
+ CALL ZLASET( 'Full', NB, N, CZERO, CZERO, T, NB )
DO J=1,N
CALL ZLARNV( 2, ISEED, J, A( 1, J ) )
- CALL ZLARNV( 2, ISEED, M-L, A( MIN(N+M,N+1), J ) )
- CALL ZLARNV( 2, ISEED, MIN(J,L), A( MIN(N+M,N+M-L+1), J ) )
END DO
+ IF( M.GT.0 ) THEN
+ DO J=1,N
+ CALL ZLARNV( 2, ISEED, M-L, A( MIN(N+M,N+1), J ) )
+ END DO
+ END IF
+ IF( L.GT.0 ) THEN
+ DO J=1,N
+ CALL ZLARNV( 2, ISEED, MIN(J,L), A( MIN(N+M,N+M-L+1), J ) )
+ END DO
+ END IF
*
* Copy the matrix A to the array AF.
*
@@ -146,7 +161,7 @@
*
* Factor the matrix A in the array AF.
*
- CALL ZTPQRT( M,N,L,NB,AF,M2,AF(N+1,1),M2,T,LDT,WORK,INFO)
+ CALL ZTPQRT( M,N,L,NB,AF,M2,AF(NP1,1),M2,T,LDT,WORK,INFO)
*
* Generate the (M+N)-by-(M+N) matrix Q by applying H to I
*
@@ -188,8 +203,8 @@
*
* Apply Q to C as Q*C
*
- CALL ZTPMQRT( 'L','N', M,N,K,L,NB,AF(N+1,1),M2,T,LDT,CF,M2,
- $ CF(N+1,1),M2,WORK,INFO)
+ CALL ZTPMQRT( 'L','N', M,N,K,L,NB,AF(NP1,1),M2,T,LDT,CF,M2,
+ $ CF(NP1,1),M2,WORK,INFO)
*
* Compute |Q*C - Q*C| / |C|
*
@@ -207,8 +222,8 @@
*
* Apply Q to C as QT*C
*
- CALL ZTPMQRT( 'L','C',M,N,K,L,NB,AF(N+1,1),M2,T,LDT,CF,M2,
- $ CF(N+1,1),M2,WORK,INFO)
+ CALL ZTPMQRT( 'L','C',M,N,K,L,NB,AF(NP1,1),M2,T,LDT,CF,M2,
+ $ CF(NP1,1),M2,WORK,INFO)
*
* Compute |QT*C - QT*C| / |C|
*
@@ -230,8 +245,8 @@
*
* Apply Q to D as D*Q
*
- CALL ZTPMQRT('R','N',N,M,N,L,NB,AF(N+1,1),M2,T,LDT,DF,N,
- $ DF(1,N+1),N,WORK,INFO)
+ CALL ZTPMQRT('R','N',N,M,N,L,NB,AF(NP1,1),M2,T,LDT,DF,N,
+ $ DF(1,NP1),N,WORK,INFO)
*
* Compute |D*Q - D*Q| / |D|
*
@@ -249,8 +264,8 @@
*
* Apply Q to D as D*QT
*
- CALL ZTPMQRT('R','C',N,M,N,L,NB,AF(N+1,1),M2,T,LDT,DF,N,
- $ DF(1,N+1),N,WORK,INFO)
+ CALL ZTPMQRT('R','C',N,M,N,L,NB,AF(NP1,1),M2,T,LDT,DF,N,
+ $ DF(1,NP1),N,WORK,INFO)
*
* Compute |D*QT - D*QT| / |D|