diff options
author | igor175 <igor175@8a072113-8704-0410-8d35-dd094bca7971> | 2011-12-23 01:00:25 +0000 |
---|---|---|
committer | igor175 <igor175@8a072113-8704-0410-8d35-dd094bca7971> | 2011-12-23 01:00:25 +0000 |
commit | 355cdb3ae109b3b49da832f6218d32732d586a9c (patch) | |
tree | 959ac27fbde482fbc43303102d24ba0c8eca54da /TESTING/LIN | |
parent | 6cc04f348aabb9e9ea29ad59551828e0c6975d24 (diff) | |
download | lapack-355cdb3ae109b3b49da832f6218d32732d586a9c.tar.gz lapack-355cdb3ae109b3b49da832f6218d32732d586a9c.tar.bz2 lapack-355cdb3ae109b3b49da832f6218d32732d586a9c.zip |
added a few comments to the code in files for linear equations testing routines: schksy.f dchksy.f cchksy.f zchksy.f
Diffstat (limited to 'TESTING/LIN')
-rw-r--r-- | TESTING/LIN/cchksy.f | 38 | ||||
-rw-r--r-- | TESTING/LIN/dchksy.f | 37 | ||||
-rw-r--r-- | TESTING/LIN/schksy.f | 37 | ||||
-rw-r--r-- | TESTING/LIN/zchksy.f | 32 |
4 files changed, 114 insertions, 30 deletions
diff --git a/TESTING/LIN/cchksy.f b/TESTING/LIN/cchksy.f index 6fa7ab6b..618f8a16 100644 --- a/TESTING/LIN/cchksy.f +++ b/TESTING/LIN/cchksy.f @@ -294,18 +294,22 @@ * IF( IMAT.NE.NTYPES ) THEN * -* Set up parameters with CLATB4 and generate a test -* matrix with CLATMS. +* Begin generate the test matrix A. +* +* Set up parameters with DLATB4 for the matrix generator +* based on the type of matrix to be generated. * CALL CLATB4( PATH, IMAT, N, N, TYPE, KL, KU, ANORM, $ MODE, CNDNUM, DIST ) * +* Generate a matrix with CLATMS. +* SRNAMT = 'CLATMS' CALL CLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE, $ CNDNUM, ANORM, KL, KU, 'N', A, LDA, WORK, $ INFO ) * -* Check error code from CLATMS. +* Check error code from CLATMS and handle error. * IF( INFO.NE.0 ) THEN CALL ALAERH( PATH, 'CLATMS', INFO, 0, UPLO, N, N, @@ -313,8 +317,9 @@ GO TO 160 END IF * -* For types 3-6, zero one or more rows and columns of -* the matrix to test that INFO is returned correctly. +* For matrix types 3-6, zero one or more rows and +* columns of the matrix to test that INFO is returned +* correctly. * IF( ZEROT ) THEN IF( IMAT.EQ.3 ) THEN @@ -380,6 +385,9 @@ ELSE IZERO = 0 END IF +* +* End generate the test matrix A. +* ELSE * * Use a special block diagonal matrix to test alternate @@ -391,13 +399,24 @@ * Do for each value of NB in NBVAL * DO 150 INB = 1, NNB +* +* Set the optimal blocksize, which will be later +* returned by ILAENV. +* NB = NBVAL( INB ) CALL XLAENV( 1, NB ) * -* Compute the L*D*L' or U*D*U' factorization of the -* matrix. +* Copy the test matrix A into matrix AFAC which +* will be factorized in place. This is needed to +* preserve the test matrix A for subsequent tests. * CALL CLACPY( UPLO, N, N, A, LDA, AFAC, LDA ) +* +* Compute the L*D*L**T or U*D*U**T factorization of the +* matrix. IWORK stores details of the interchanges and +* the block structure of D. AINV is a work array for +* block factorization, LWORK is the length of AINV. +* LWORK = MAX( 2, NB )*LDA SRNAMT = 'CSYTRF' CALL CSYTRF( UPLO, N, AFAC, LDA, IWORK, AINV, LWORK, @@ -420,11 +439,14 @@ END IF END IF * -* Check error code from CSYTRF. +* Check error code from CSYTRF and handle error. * IF( INFO.NE.K ) $ CALL ALAERH( PATH, 'CSYTRF', INFO, K, UPLO, N, N, $ -1, -1, NB, IMAT, NFAIL, NERRS, NOUT ) +* +* Set the condition estimate flag if the INFO is not 0. +* IF( INFO.NE.0 ) THEN TRFCON = .TRUE. ELSE diff --git a/TESTING/LIN/dchksy.f b/TESTING/LIN/dchksy.f index fd0447e0..1577f74d 100644 --- a/TESTING/LIN/dchksy.f +++ b/TESTING/LIN/dchksy.f @@ -295,18 +295,22 @@ DO 160 IUPLO = 1, 2 UPLO = UPLOS( IUPLO ) * -* Set up parameters with DLATB4 and generate a test matrix -* with DLATMS. +* Begin generate the test matrix A. +* +* Set up parameters with DLATB4 for the matrix generator +* based on the type of matrix to be generated. * CALL DLATB4( PATH, IMAT, N, N, TYPE, KL, KU, ANORM, MODE, $ CNDNUM, DIST ) * +* Generate a matrix with DLATMS. +* SRNAMT = 'DLATMS' CALL DLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE, $ CNDNUM, ANORM, KL, KU, UPLO, A, LDA, WORK, $ INFO ) * -* Check error code from DLATMS. +* Check error code from DLATMS and handle error. * IF( INFO.NE.0 ) THEN CALL ALAERH( PATH, 'DLATMS', INFO, 0, UPLO, N, N, -1, @@ -314,8 +318,9 @@ GO TO 160 END IF * -* For types 3-6, zero one or more rows and columns of -* the matrix to test that INFO is returned correctly. +* For matrix types 3-6, zero one or more rows and +* columns of the matrix to test that INFO is returned +* correctly. * IF( ZEROT ) THEN IF( IMAT.EQ.3 ) THEN @@ -381,16 +386,29 @@ IZERO = 0 END IF * +* End generate the test matrix A. +* * Do for each value of NB in NBVAL * DO 150 INB = 1, NNB +* +* Set the optimal blocksize, which will be later +* returned by ILAENV. +* NB = NBVAL( INB ) CALL XLAENV( 1, NB ) * -* Compute the L*D*L' or U*D*U' factorization of the -* matrix. +* Copy the test matrix A into matrix AFAC which +* will be factorized in place. This is needed to +* preserve the test matrix A for subsequent tests. * CALL DLACPY( UPLO, N, N, A, LDA, AFAC, LDA ) +* +* Compute the L*D*L**T or U*D*U**T factorization of the +* matrix. IWORK stores details of the interchanges and +* the block structure of D. AINV is a work array for +* block factorization, LWORK is the length of AINV. +* LWORK = MAX( 2, NB )*LDA SRNAMT = 'DSYTRF' CALL DSYTRF( UPLO, N, AFAC, LDA, IWORK, AINV, LWORK, @@ -413,11 +431,14 @@ END IF END IF * -* Check error code from DSYTRF. +* Check error code from DSYTRF and handle error. * IF( INFO.NE.K ) $ CALL ALAERH( PATH, 'DSYTRF', INFO, K, UPLO, N, N, $ -1, -1, NB, IMAT, NFAIL, NERRS, NOUT ) +* +* Set the condition estimate flag if the INFO is not 0. +* IF( INFO.NE.0 ) THEN TRFCON = .TRUE. ELSE diff --git a/TESTING/LIN/schksy.f b/TESTING/LIN/schksy.f index f8965a59..c3b2e031 100644 --- a/TESTING/LIN/schksy.f +++ b/TESTING/LIN/schksy.f @@ -295,18 +295,22 @@ DO 160 IUPLO = 1, 2 UPLO = UPLOS( IUPLO ) * -* Set up parameters with SLATB4 and generate a test matrix -* with SLATMS. +* Begin generate the test matrix A. +* +* Set up parameters with SLATB4 for the matrix generator +* based on the type of matrix to be generated. * CALL SLATB4( PATH, IMAT, N, N, TYPE, KL, KU, ANORM, MODE, $ CNDNUM, DIST ) * +* Generate a matrix with SLATMS. +* SRNAMT = 'SLATMS' CALL SLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE, $ CNDNUM, ANORM, KL, KU, UPLO, A, LDA, WORK, $ INFO ) * -* Check error code from SLATMS. +* Check error code from SLATMS and handle error. * IF( INFO.NE.0 ) THEN CALL ALAERH( PATH, 'SLATMS', INFO, 0, UPLO, N, N, -1, @@ -314,8 +318,9 @@ GO TO 160 END IF * -* For types 3-6, zero one or more rows and columns of -* the matrix to test that INFO is returned correctly. +* For matrix types 3-6, zero one or more rows and +* columns of the matrix to test that INFO is returned +* correctly. * IF( ZEROT ) THEN IF( IMAT.EQ.3 ) THEN @@ -381,16 +386,29 @@ IZERO = 0 END IF * +* End generate the test matrix A. +* * Do for each value of NB in NBVAL * DO 150 INB = 1, NNB +* +* Set the optimal blocksize, which will be later +* returned by ILAENV. +* NB = NBVAL( INB ) CALL XLAENV( 1, NB ) * -* Compute the L*D*L' or U*D*U' factorization of the -* matrix. +* Copy the test matrix A into matrix AFAC which +* will be factorized in place. This is needed to +* preserve the test matrix A for subsequent tests. * CALL SLACPY( UPLO, N, N, A, LDA, AFAC, LDA ) +* +* Compute the L*D*L**T or U*D*U**T factorization of the +* matrix. IWORK stores details of the interchanges and +* the block structure of D. AINV is a work array for +* block factorization, LWORK is the length of AINV. +* LWORK = MAX( 2, NB )*LDA SRNAMT = 'SSYTRF' CALL SSYTRF( UPLO, N, AFAC, LDA, IWORK, AINV, LWORK, @@ -413,11 +431,14 @@ END IF END IF * -* Check error code from SSYTRF. +* Check error code from SSYTRF and handle error. * IF( INFO.NE.K ) $ CALL ALAERH( PATH, 'SSYTRF', INFO, K, UPLO, N, N, $ -1, -1, NB, IMAT, NFAIL, NERRS, NOUT ) +* +* Set the condition estimate flag if the INFO is not 0. +* IF( INFO.NE.0 ) THEN TRFCON = .TRUE. ELSE diff --git a/TESTING/LIN/zchksy.f b/TESTING/LIN/zchksy.f index 1d363c91..b516e1dd 100644 --- a/TESTING/LIN/zchksy.f +++ b/TESTING/LIN/zchksy.f @@ -300,12 +300,14 @@ CALL ZLATB4( PATH, IMAT, N, N, TYPE, KL, KU, ANORM, $ MODE, CNDNUM, DIST ) * +* Generate a matrix with ZLATMS. +* SRNAMT = 'ZLATMS' CALL ZLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE, $ CNDNUM, ANORM, KL, KU, 'N', A, LDA, WORK, $ INFO ) * -* Check error code from ZLATMS. +* Check error code from ZLATMS and handle error. * IF( INFO.NE.0 ) THEN CALL ALAERH( PATH, 'ZLATMS', INFO, 0, UPLO, N, N, @@ -313,8 +315,9 @@ GO TO 160 END IF * -* For types 3-6, zero one or more rows and columns of -* the matrix to test that INFO is returned correctly. +* For matrix types 3-6, zero one or more rows and +* columns of the matrix to test that INFO is returned +* correctly. * IF( ZEROT ) THEN IF( IMAT.EQ.3 ) THEN @@ -380,6 +383,9 @@ ELSE IZERO = 0 END IF +* +* End generate the test matrix A. +* ELSE * * Use a special block diagonal matrix to test alternate @@ -391,13 +397,24 @@ * Do for each value of NB in NBVAL * DO 150 INB = 1, NNB +* +* Set the optimal blocksize, which will be later +* returned by ILAENV. +* NB = NBVAL( INB ) CALL XLAENV( 1, NB ) * -* Compute the L*D*L' or U*D*U' factorization of the -* matrix. +* Copy the test matrix A into matrix AFAC which +* will be factorized in place. This is needed to +* preserve the test matrix A for subsequent tests. * CALL ZLACPY( UPLO, N, N, A, LDA, AFAC, LDA ) +* +* Compute the L*D*L**T or U*D*U**T factorization of the +* matrix. IWORK stores details of the interchanges and +* the block structure of D. AINV is a work array for +* block factorization, LWORK is the length of AINV. +* LWORK = MAX( 2, NB )*LDA SRNAMT = 'ZSYTRF' CALL ZSYTRF( UPLO, N, AFAC, LDA, IWORK, AINV, LWORK, @@ -420,11 +437,14 @@ END IF END IF * -* Check error code from ZSYTRF. +* Check error code from ZSYTRF and handle error. * IF( INFO.NE.K ) $ CALL ALAERH( PATH, 'ZSYTRF', INFO, K, UPLO, N, N, $ -1, -1, NB, IMAT, NFAIL, NERRS, NOUT ) +* +* Set the condition estimate flag if the INFO is not 0. +* IF( INFO.NE.0 ) THEN TRFCON = .TRUE. ELSE |