diff options
author | julie <julielangou@users.noreply.github.com> | 2012-04-02 21:44:14 +0000 |
---|---|---|
committer | julie <julielangou@users.noreply.github.com> | 2012-04-02 21:44:14 +0000 |
commit | 2df2e5930503c73c2d27b78cb1a31537ea3887ba (patch) | |
tree | 8c2ba56587cadd626eeac904006f73fad39d6cee | |
parent | 00f52845f673da75f25d60f80a3df1385073962d (diff) | |
download | lapack-2df2e5930503c73c2d27b78cb1a31537ea3887ba.tar.gz lapack-2df2e5930503c73c2d27b78cb1a31537ea3887ba.tar.bz2 lapack-2df2e5930503c73c2d27b78cb1a31537ea3887ba.zip |
-rw-r--r-- | TESTING/EIG/ddrgvx.f | 1 | ||||
-rw-r--r-- | TESTING/LIN/Makefile | 16 | ||||
-rw-r--r-- | TESTING/LIN/schkaa.f | 4 | ||||
-rw-r--r-- | TESTING/LIN/schkge.f | 75 | ||||
-rw-r--r-- | lapacke/src/lapacke_dlamch.c | 1 | ||||
-rw-r--r-- | lapacke/src/lapacke_dlapy2_work.c | 1 | ||||
-rw-r--r-- | lapacke/src/lapacke_dlapy3_work.c | 1 | ||||
-rw-r--r-- | lapacke/src/lapacke_slamch.c | 1 | ||||
-rw-r--r-- | lapacke/src/lapacke_slapy2_work.c | 1 | ||||
-rw-r--r-- | lapacke/src/lapacke_slapy3_work.c | 1 |
10 files changed, 78 insertions, 24 deletions
diff --git a/TESTING/EIG/ddrgvx.f b/TESTING/EIG/ddrgvx.f index 0a8ce1de..b022bc11 100644 --- a/TESTING/EIG/ddrgvx.f +++ b/TESTING/EIG/ddrgvx.f @@ -509,6 +509,7 @@ RATIO2 = MAX( ABS( DIFTRU( 5 ) / DIF( 5 ) ), $ ABS( DIF( 5 ) / DIFTRU( 5 ) ) ) RESULT( 4 ) = MAX( RATIO1, RATIO2 ) + WRITE(*,*) " COUCOU" END IF * NTESTT = NTESTT + 4 diff --git a/TESTING/LIN/Makefile b/TESTING/LIN/Makefile index 90d3111e..80330ecb 100644 --- a/TESTING/LIN/Makefile +++ b/TESTING/LIN/Makefile @@ -47,8 +47,7 @@ SCLNTST= slaord.o DZLNTST= dlaord.o -SLINTST = schkaa.o \ - schkeq.o schkgb.o schkge.o schkgt.o \ +SLINTST = schkeq.o schkgb.o schkge.o schkgt.o \ schklq.o schkpb.o schkpo.o schkps.o schkpp.o \ schkpt.o schkq3.o schkql.o schkqp.o schkqr.o schkrq.o \ schksp.o schksy.o schksy_rook.o schktb.o schktp.o schktr.o \ @@ -244,8 +243,8 @@ proto-double: ../xlintstds ../xlintstrfd proto-complex: ../xlintstrfc proto-complex16: ../xlintstzc ../xlintstrfz -xlintsts : $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) $(ALINTST) $(SCLNTST) $(SLINTST) \ +xlintsts : schkaa.o $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(LAPACKLIB) + $(LOADER) $(LOADOPTS) schkaa.o $(ALINTST) $(SCLNTST) $(SLINTST) \ ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) -o $@ xlintstc : $(ALINTST) $(CLINTST) $(SCLNTST) ../../$(LAPACKLIB) @@ -284,6 +283,10 @@ xlintstrfz : $(ZLINTSTRFP) ../../$(LAPACKLIB) $(LOADER) $(LOADOPTS) $(ZLINTSTRFP) \ ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ +../LAPACK_test: LAPACK_test.o ../../$(LAPACKLIB) $(ALINTST) $(SLINTST) $(SCLNTST) + $(LOADER) $(LOADOPTS) LAPACK_test.o $(ALINTST) $(SLINTST) $(SCLNTST) \ +../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) -o $@ + ../xlintsts: xlintsts mv xlintsts $@ @@ -336,6 +339,11 @@ cchkaa.o: cchkaa.f $(FORTRAN) $(DRVOPTS) -c $< -o $@ zchkaa.o: zchkaa.f $(FORTRAN) $(DRVOPTS) -c $< -o $@ + +.SUFFIXES: .f90 .f .o + +.f90.o: + $(FORTRAN) -c -g $< .f.o: $(FORTRAN) $(OPTS) -c $< -o $@ diff --git a/TESTING/LIN/schkaa.f b/TESTING/LIN/schkaa.f index 7299c6dd..7bb36e30 100644 --- a/TESTING/LIN/schkaa.f +++ b/TESTING/LIN/schkaa.f @@ -431,9 +431,7 @@ * IF( TSTCHK ) THEN CALL SCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB2, NBVAL2, NNS, - $ NSVAL, THRESH, TSTERR, LDA, A( 1, 1 ), - $ A( 1, 2 ), A( 1, 3 ), B( 1, 1 ), B( 1, 2 ), - $ B( 1, 3 ), WORK, RWORK, IWORK, NOUT ) + $ NSVAL, THRESH, TSTERR, NOUT ) ELSE WRITE( NOUT, FMT = 9989 )PATH END IF diff --git a/TESTING/LIN/schkge.f b/TESTING/LIN/schkge.f index 84272e1e..a4c707ca 100644 --- a/TESTING/LIN/schkge.f +++ b/TESTING/LIN/schkge.f @@ -9,20 +9,17 @@ * =========== * * SUBROUTINE SCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS, -* NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B, -* X, XACT, WORK, RWORK, IWORK, NOUT ) +* NSVAL, THRESH, TSTERR, NOUT ) * * .. Scalar Arguments .. * LOGICAL TSTERR -* INTEGER NM, NMAX, NN, NNB, NNS, NOUT +* INTEGER NM, NN, NNB, NNS, NOUT * REAL THRESH * .. * .. Array Arguments .. * LOGICAL DOTYPE( * ) * INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ), * $ NVAL( * ) -* REAL A( * ), AFAC( * ), AINV( * ), B( * ), -* $ RWORK( * ), WORK( * ), X( * ), XACT( * ) * .. * * @@ -182,8 +179,7 @@ * * ===================================================================== SUBROUTINE SCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS, - $ NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B, - $ X, XACT, WORK, RWORK, IWORK, NOUT ) + $ NSVAL, THRESH, TSTERR, NOUT ) * * -- LAPACK test routine (version 3.4.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- @@ -192,15 +188,13 @@ * * .. Scalar Arguments .. LOGICAL TSTERR - INTEGER NM, NMAX, NN, NNB, NNS, NOUT + INTEGER NM, NN, NNB, NNS, NOUT REAL THRESH * .. * .. Array Arguments .. LOGICAL DOTYPE( * ) - INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ), + INTEGER MVAL( * ), NBVAL( * ), NSVAL( * ), $ NVAL( * ) - REAL A( * ), AFAC( * ), AINV( * ), B( * ), - $ RWORK( * ), WORK( * ), X( * ), XACT( * ) * .. * * ===================================================================== @@ -221,14 +215,18 @@ CHARACTER*3 PATH INTEGER I, IM, IMAT, IN, INB, INFO, IOFF, IRHS, ITRAN, $ IZERO, K, KL, KU, LDA, LWORK, M, MODE, N, NB, - $ NERRS, NFAIL, NIMAT, NRHS, NRUN, NT + $ NERRS, NFAIL, NIMAT, NMAX, NRHS, NRUN, NSMAX, + $ NT REAL AINVNM, ANORM, ANORMI, ANORMO, CNDNUM, DUMMY, $ RCOND, RCONDC, RCONDI, RCONDO * .. * .. Local Arrays .. CHARACTER TRANSS( NTRAN ) INTEGER ISEED( 4 ), ISEEDY( 4 ) + INTEGER, allocatable, dimension (:) :: IWORK REAL RESULT( NTESTS ) + REAL, allocatable, dimension(:) :: A, AFAC, AINV, B, X, XACT + REAL, allocatable, dimension(:) :: RWORK, WORK * .. * .. External Functions .. REAL SGET06, SLANGE @@ -260,6 +258,7 @@ * * Initialize constants and the random number seed. * + WRITE (*,*) "*** SGE ***" PATH( 1: 1 ) = 'Single precision' PATH( 2: 3 ) = 'GE' NRUN = 0 @@ -272,10 +271,36 @@ * Test the error exits * CALL XLAENV( 1, 1 ) - IF( TSTERR ) - $ CALL SERRGE( PATH, NOUT ) + IF( TSTERR ) THEN + CALL SERRGE( PATH, NOUT ) + ENDIF INFOT = 0 CALL XLAENV( 2, 2 ) + + NMAX=0 + DO IM = 1, NM + NMAX = MAX(NMAX,MVAL( IM )) + END DO + DO IN = 1, NN + NMAX = MAX(NMAX,NVAL( IN )) + END DO + NSMAX=0 + DO IRHS = 1, NNS + NSMAX = MAX(NSMAX,NSVAL( IRHS )) + END DO +* +* ALLOCATION +* + ALLOCATE(A(NMAX*NMAX)) + ALLOCATE(AFAC(NMAX*NMAX)) + ALLOCATE(AINV(NMAX*NMAX)) + LWORK=NMAX*max(3,NSMAX) + ALLOCATE(WORK(LWORK)) + ALLOCATE(RWORK(max(2*NMAX,2*NSMAX+LWORK))) + ALLOCATE(IWORK(2*NMAX)) + ALLOCATE (B(NMAX*NSMAX)) + ALLOCATE (X(NMAX*NSMAX)) + ALLOCATE (XACT(NMAX*NSMAX)) * * Do for each value of M in MVAL * @@ -292,6 +317,7 @@ IF( M.LE.0 .OR. N.LE.0 ) $ NIMAT = 1 * + DO 100 IMAT = 1, NIMAT * * Do the tests only if DOTYPE( IMAT ) is true. @@ -311,7 +337,7 @@ CALL SLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, $ CNDNUM, DIST ) * - SRNAMT = 'SLATMS' + SRNAMT = 'SLATMS' CALL SLATMS( M, N, DIST, ISEED, TYPE, RWORK, MODE, $ CNDNUM, ANORM, KL, KU, 'No packing', A, LDA, $ WORK, INFO ) @@ -390,7 +416,7 @@ CALL SLACPY( 'Full', N, N, AFAC, LDA, AINV, LDA ) SRNAMT = 'SGETRI' NRHS = NSVAL( 1 ) - LWORK = NMAX*MAX( 3, NRHS ) + LWORK = MAX(1, N*MAX( 3, NRHS )) CALL SGETRI( N, AINV, LDA, IWORK, WORK, LWORK, $ INFO ) * @@ -451,10 +477,11 @@ IF( INB.GT.1 .OR. M.NE.N ) $ GO TO 90 IF( TRFCON ) - $ GO TO 70 + $ GO TO 70 * DO 60 IRHS = 1, NNS NRHS = NSVAL( IRHS ) + XTYPE = 'N' * DO 50 ITRAN = 1, NTRAN @@ -583,6 +610,20 @@ 100 CONTINUE 110 CONTINUE 120 CONTINUE + +* +* DEALLOCATING +* + DEALLOCATE(A) + DEALLOCATE(AFAC) + DEALLOCATE(AINV) + DEALLOCATE(WORK) + DEALLOCATE(RWORK) + DEALLOCATE(IWORK) + DEALLOCATE (B) + DEALLOCATE (X) + DEALLOCATE (XACT) + * * Print a summary of the results. * diff --git a/lapacke/src/lapacke_dlamch.c b/lapacke/src/lapacke_dlamch.c index ae310246..500e624d 100644 --- a/lapacke/src/lapacke_dlamch.c +++ b/lapacke/src/lapacke_dlamch.c @@ -31,6 +31,7 @@ * Generated November, 2011 *****************************************************************************/ +#include "lapacke_utils.h" double LAPACKE_dlamch( char cmach ) { diff --git a/lapacke/src/lapacke_dlapy2_work.c b/lapacke/src/lapacke_dlapy2_work.c index 01f1c9c3..61ba740b 100644 --- a/lapacke/src/lapacke_dlapy2_work.c +++ b/lapacke/src/lapacke_dlapy2_work.c @@ -31,6 +31,7 @@ * Generated November, 2011 *****************************************************************************/ +#include "lapacke_utils.h" double LAPACKE_dlapy2_work( double x, double y ) { diff --git a/lapacke/src/lapacke_dlapy3_work.c b/lapacke/src/lapacke_dlapy3_work.c index 11951403..1bd6dd31 100644 --- a/lapacke/src/lapacke_dlapy3_work.c +++ b/lapacke/src/lapacke_dlapy3_work.c @@ -31,6 +31,7 @@ * Generated November, 2011 *****************************************************************************/ +#include "lapacke_utils.h" double LAPACKE_dlapy3_work( double x, double y, double z ) { diff --git a/lapacke/src/lapacke_slamch.c b/lapacke/src/lapacke_slamch.c index 5924eb42..0f25b2a4 100644 --- a/lapacke/src/lapacke_slamch.c +++ b/lapacke/src/lapacke_slamch.c @@ -31,6 +31,7 @@ * Generated November, 2011 *****************************************************************************/ +#include "lapacke_utils.h" float LAPACKE_slamch( char cmach ) { diff --git a/lapacke/src/lapacke_slapy2_work.c b/lapacke/src/lapacke_slapy2_work.c index 4cbfd3ab..00507b39 100644 --- a/lapacke/src/lapacke_slapy2_work.c +++ b/lapacke/src/lapacke_slapy2_work.c @@ -31,6 +31,7 @@ * Generated November, 2011 *****************************************************************************/ +#include "lapacke_utils.h" float LAPACKE_slapy2_work( float x, float y ) { diff --git a/lapacke/src/lapacke_slapy3_work.c b/lapacke/src/lapacke_slapy3_work.c index b8749ef8..381c579b 100644 --- a/lapacke/src/lapacke_slapy3_work.c +++ b/lapacke/src/lapacke_slapy3_work.c @@ -31,6 +31,7 @@ * Generated November, 2011 *****************************************************************************/ +#include "lapacke_utils.h" float LAPACKE_slapy3_work( float x, float y, float z ) { |