LAPACK 3.3.1
Linear Algebra PACKage

derrab.f

Go to the documentation of this file.
00001       SUBROUTINE DERRAB( NUNIT )
00002       IMPLICIT NONE
00003 *
00004 *  -- LAPACK test routine (version 3.1.1) --
00005 *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
00006 *     January 2007
00007 *
00008 *     .. Scalar Arguments ..
00009       INTEGER            NUNIT
00010 *     ..
00011 *
00012 *  Purpose
00013 *  =======
00014 *
00015 *  DERRAB tests the error exits for DSGESV.
00016 *
00017 *  Arguments
00018 *  =========
00019 *
00020 *  NUNIT   (input) INTEGER
00021 *          The unit number for output.
00022 *
00023 *  =====================================================================
00024 *
00025 *     .. Parameters ..
00026       INTEGER            NMAX
00027       PARAMETER          ( NMAX = 4 )
00028 *     ..
00029 *     .. Local Scalars ..
00030       INTEGER            I, INFO, ITER, J
00031 *     ..
00032 *     .. Local Arrays ..
00033       INTEGER            IP( NMAX )
00034       DOUBLE PRECISION   A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
00035      $                   C( NMAX ), R( NMAX ), R1( NMAX ), R2( NMAX ),
00036      $                   W( 2*NMAX ), X( NMAX )
00037       DOUBLE PRECISION   WORK(1)
00038       REAL               SWORK(1)
00039 *     ..
00040 *     .. External Subroutines ..
00041       EXTERNAL           CHKXER, DSGESV
00042 *     ..
00043 *     .. Scalars in Common ..
00044       LOGICAL            LERR, OK
00045       CHARACTER*32       SRNAMT
00046       INTEGER            INFOT, NOUT
00047 *     ..
00048 *     .. Common blocks ..
00049       COMMON             / INFOC / INFOT, NOUT, OK, LERR
00050       COMMON             / SRNAMC / SRNAMT
00051 *     ..
00052 *     .. Intrinsic Functions ..
00053       INTRINSIC          DBLE
00054 *     ..
00055 *     .. Executable Statements ..
00056 *
00057       NOUT = NUNIT
00058       WRITE( NOUT, FMT = * )
00059 *
00060 *     Set the variables to innocuous values.
00061 *
00062       DO 20 J = 1, NMAX
00063          DO 10 I = 1, NMAX
00064             A( I, J ) = 1.D0 / DBLE( I+J )
00065             AF( I, J ) = 1.D0 / DBLE( I+J )
00066    10    CONTINUE
00067          B( J ) = 0.D0
00068          R1( J ) = 0.D0
00069          R2( J ) = 0.D0
00070          W( J ) = 0.D0
00071          X( J ) = 0.D0
00072          C( J ) = 0.D0
00073          R( J ) = 0.D0
00074          IP( J ) = J
00075    20 CONTINUE
00076       OK = .TRUE.
00077 *
00078       SRNAMT = 'DSGESV'
00079       INFOT = 1
00080       CALL DSGESV(-1,0,A,1,IP,B,1,X,1,WORK,SWORK,ITER,INFO)
00081       CALL CHKXER( 'DSGESV', INFOT, NOUT, LERR, OK )
00082       INFOT = 2
00083       CALL DSGESV(0,-1,A,1,IP,B,1,X,1,WORK,SWORK,ITER,INFO)
00084       CALL CHKXER( 'DSGESV', INFOT, NOUT, LERR, OK )
00085       INFOT = 4
00086       CALL DSGESV(2,1,A,1,IP,B,2,X,2,WORK,SWORK,ITER,INFO)
00087       CALL CHKXER( 'DSGESV', INFOT, NOUT, LERR, OK )
00088       INFOT = 7
00089       CALL DSGESV(2,1,A,2,IP,B,1,X,2,WORK,SWORK,ITER,INFO)
00090       CALL CHKXER( 'DSGESV', INFOT, NOUT, LERR, OK )
00091       INFOT = 9
00092       CALL DSGESV(2,1,A,2,IP,B,2,X,1,WORK,SWORK,ITER,INFO)
00093       CALL CHKXER( 'DSGESV', INFOT, NOUT, LERR, OK )
00094 *
00095 *     Print a summary line.
00096 *
00097       IF( OK ) THEN
00098          WRITE( NOUT, FMT = 9999 )'DSGESV'
00099       ELSE
00100          WRITE( NOUT, FMT = 9998 )'DSGESV'
00101       END IF
00102 *
00103  9999 FORMAT( 1X, A6, ' drivers passed the tests of the error exits' )
00104  9998 FORMAT( ' *** ', A6, ' drivers failed the tests of the error ',
00105      $      'exits ***' )
00106 *
00107       RETURN
00108 *
00109 *     End of DERRAB
00110 *
00111       END
 All Files Functions