LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ xerbla()

subroutine xerbla ( character*(*)  srname,
integer  info 
)

XERBLA

Purpose:
 This is a special version of XERBLA to be used only as part of
 the test program for testing error exits from the LAPACK routines.
 Error messages are printed if INFO.NE.INFOT or if SRNAME.NE.SRNAMT,
 where INFOT and SRNAMT are values stored in COMMON.
Parameters
[in]SRNAME
          SRNAME is CHARACTER*(*)
          The name of the subroutine calling XERBLA.  This name should
          match the COMMON variable SRNAMT.
[in]INFO
          INFO is INTEGER
          The error return code from the calling subroutine.  INFO
          should equal the COMMON variable INFOT.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
  The following variables are passed via the common blocks INFOC and
  SRNAMC:

  INFOT   INTEGER      Expected integer return code
  NOUT    INTEGER      Unit number for printing error messages
  OK      LOGICAL      Set to .TRUE. if INFO = INFOT and
                       SRNAME = SRNAMT, otherwise set to .FALSE.
  LERR    LOGICAL      Set to .TRUE., indicating that XERBLA was called
  SRNAMT  CHARACTER*(*) Expected name of calling subroutine

Definition at line 74 of file xerbla.f.

75*
76* -- LAPACK test routine --
77* -- LAPACK is a software package provided by Univ. of Tennessee, --
78* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
79*
80* .. Scalar Arguments ..
81 CHARACTER*(*) SRNAME
82 INTEGER INFO
83* ..
84*
85* =====================================================================
86*
87* .. Scalars in Common ..
88 LOGICAL LERR, OK
89 CHARACTER*32 SRNAMT
90 INTEGER INFOT, NOUT
91* ..
92* .. Intrinsic Functions ..
93 INTRINSIC len_trim
94* ..
95* .. Common blocks ..
96 COMMON / infoc / infot, nout, ok, lerr
97 COMMON / srnamc / srnamt
98* ..
99* .. Executable Statements ..
100*
101 lerr = .true.
102 IF( info.NE.infot ) THEN
103 IF( infot.NE.0 ) THEN
104 WRITE( nout, fmt = 9999 )
105 $ srnamt( 1:len_trim( srnamt ) ), info, infot
106 ELSE
107 WRITE( nout, fmt = 9997 )
108 $ srname( 1:len_trim( srname ) ), info
109 END IF
110 ok = .false.
111 END IF
112 IF( srname.NE.srnamt ) THEN
113 WRITE( nout, fmt = 9998 )
114 $ srname( 1:len_trim( srname ) ),
115 $ srnamt( 1:len_trim( srnamt ) )
116 ok = .false.
117 END IF
118 RETURN
119*
120 9999 FORMAT( ' *** XERBLA was called from ', a, ' with INFO = ', i6,
121 $ ' instead of ', i2, ' ***' )
122 9998 FORMAT( ' *** XERBLA was called with SRNAME = ', a,
123 $ ' instead of ', a9, ' ***' )
124 9997 FORMAT( ' *** On entry to ', a, ' parameter number ', i6,
125 $ ' had an illegal value ***' )
126*
127* End of XERBLA
128*