1*> \brief \b ZGET37
2*
3*  =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6*            http://www.netlib.org/lapack/explore-html/
7*
8*  Definition:
9*  ===========
10*
11*       SUBROUTINE ZGET37( RMAX, LMAX, NINFO, KNT, NIN )
12*
13*       .. Scalar Arguments ..
14*       INTEGER            KNT, NIN
15*       ..
16*       .. Array Arguments ..
17*       INTEGER            LMAX( 3 ), NINFO( 3 )
18*       DOUBLE PRECISION   RMAX( 3 )
19*       ..
20*
21*
22*> \par Purpose:
23*  =============
24*>
25*> \verbatim
26*>
27*> ZGET37 tests ZTRSNA, a routine for estimating condition numbers of
28*> eigenvalues and/or right eigenvectors of a matrix.
29*>
30*> The test matrices are read from a file with logical unit number NIN.
31*> \endverbatim
32*
33*  Arguments:
34*  ==========
35*
36*> \param[out] RMAX
37*> \verbatim
38*>          RMAX is DOUBLE PRECISION array, dimension (3)
39*>          Value of the largest test ratio.
40*>          RMAX(1) = largest ratio comparing different calls to ZTRSNA
41*>          RMAX(2) = largest error in reciprocal condition
42*>                    numbers taking their conditioning into account
43*>          RMAX(3) = largest error in reciprocal condition
44*>                    numbers not taking their conditioning into
45*>                    account (may be larger than RMAX(2))
46*> \endverbatim
47*>
48*> \param[out] LMAX
49*> \verbatim
50*>          LMAX is INTEGER array, dimension (3)
51*>          LMAX(i) is example number where largest test ratio
52*>          RMAX(i) is achieved. Also:
53*>          If ZGEHRD returns INFO nonzero on example i, LMAX(1)=i
54*>          If ZHSEQR returns INFO nonzero on example i, LMAX(2)=i
55*>          If ZTRSNA returns INFO nonzero on example i, LMAX(3)=i
56*> \endverbatim
57*>
58*> \param[out] NINFO
59*> \verbatim
60*>          NINFO is INTEGER array, dimension (3)
61*>          NINFO(1) = No. of times ZGEHRD returned INFO nonzero
62*>          NINFO(2) = No. of times ZHSEQR returned INFO nonzero
63*>          NINFO(3) = No. of times ZTRSNA returned INFO nonzero
64*> \endverbatim
65*>
66*> \param[out] KNT
67*> \verbatim
68*>          KNT is INTEGER
69*>          Total number of examples tested.
70*> \endverbatim
71*>
72*> \param[in] NIN
73*> \verbatim
74*>          NIN is INTEGER
75*>          Input logical unit number
76*> \endverbatim
77*
78*  Authors:
79*  ========
80*
81*> \author Univ. of Tennessee
82*> \author Univ. of California Berkeley
83*> \author Univ. of Colorado Denver
84*> \author NAG Ltd.
85*
86*> \ingroup complex16_eig
87*
88*  =====================================================================
89      SUBROUTINE ZGET37( RMAX, LMAX, NINFO, KNT, NIN )
90*
91*  -- LAPACK test routine --
92*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
93*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
94*
95*     .. Scalar Arguments ..
96      INTEGER            KNT, NIN
97*     ..
98*     .. Array Arguments ..
99      INTEGER            LMAX( 3 ), NINFO( 3 )
100      DOUBLE PRECISION   RMAX( 3 )
101*     ..
102*
103*  =====================================================================
104*
105*     .. Parameters ..
106      DOUBLE PRECISION   ZERO, ONE, TWO
107      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0 )
108      DOUBLE PRECISION   EPSIN
109      PARAMETER          ( EPSIN = 5.9605D-8 )
110      INTEGER            LDT, LWORK
111      PARAMETER          ( LDT = 20, LWORK = 2*LDT*( 10+LDT ) )
112*     ..
113*     .. Local Scalars ..
114      INTEGER            I, ICMP, INFO, ISCL, ISRT, J, KMIN, M, N
115      DOUBLE PRECISION   BIGNUM, EPS, SMLNUM, TNRM, TOL, TOLIN, V,
116     $                   VCMIN, VMAX, VMIN, VMUL
117*     ..
118*     .. Local Arrays ..
119      LOGICAL            SELECT( LDT )
120      INTEGER            LCMP( 3 )
121      DOUBLE PRECISION   DUM( 1 ), RWORK( 2*LDT ), S( LDT ), SEP( LDT ),
122     $                   SEPIN( LDT ), SEPTMP( LDT ), SIN( LDT ),
123     $                   STMP( LDT ), VAL( 3 ), WIIN( LDT ),
124     $                   WRIN( LDT ), WSRT( LDT )
125      COMPLEX*16         CDUM( 1 ), LE( LDT, LDT ), RE( LDT, LDT ),
126     $                   T( LDT, LDT ), TMP( LDT, LDT ), W( LDT ),
127     $                   WORK( LWORK ), WTMP( LDT )
128*     ..
129*     .. External Functions ..
130      DOUBLE PRECISION   DLAMCH, ZLANGE
131      EXTERNAL           DLAMCH, ZLANGE
132*     ..
133*     .. External Subroutines ..
134      EXTERNAL           DCOPY, DLABAD, DSCAL, ZCOPY, ZDSCAL, ZGEHRD,
135     $                   ZHSEQR, ZLACPY, ZTREVC, ZTRSNA
136*     ..
137*     .. Intrinsic Functions ..
138      INTRINSIC          DBLE, DIMAG, MAX, SQRT
139*     ..
140*     .. Executable Statements ..
141*
142      EPS = DLAMCH( 'P' )
143      SMLNUM = DLAMCH( 'S' ) / EPS
144      BIGNUM = ONE / SMLNUM
145      CALL DLABAD( SMLNUM, BIGNUM )
146*
147*     EPSIN = 2**(-24) = precision to which input data computed
148*
149      EPS = MAX( EPS, EPSIN )
150      RMAX( 1 ) = ZERO
151      RMAX( 2 ) = ZERO
152      RMAX( 3 ) = ZERO
153      LMAX( 1 ) = 0
154      LMAX( 2 ) = 0
155      LMAX( 3 ) = 0
156      KNT = 0
157      NINFO( 1 ) = 0
158      NINFO( 2 ) = 0
159      NINFO( 3 ) = 0
160      VAL( 1 ) = SQRT( SMLNUM )
161      VAL( 2 ) = ONE
162      VAL( 3 ) = SQRT( BIGNUM )
163*
164*     Read input data until N=0.  Assume input eigenvalues are sorted
165*     lexicographically (increasing by real part if ISRT = 0,
166*     increasing by imaginary part if ISRT = 1)
167*
168   10 CONTINUE
169      READ( NIN, FMT = * )N, ISRT
170      IF( N.EQ.0 )
171     $   RETURN
172      DO 20 I = 1, N
173         READ( NIN, FMT = * )( TMP( I, J ), J = 1, N )
174   20 CONTINUE
175      DO 30 I = 1, N
176         READ( NIN, FMT = * )WRIN( I ), WIIN( I ), SIN( I ), SEPIN( I )
177   30 CONTINUE
178      TNRM = ZLANGE( 'M', N, N, TMP, LDT, RWORK )
179      DO 260 ISCL = 1, 3
180*
181*        Scale input matrix
182*
183         KNT = KNT + 1
184         CALL ZLACPY( 'F', N, N, TMP, LDT, T, LDT )
185         VMUL = VAL( ISCL )
186         DO 40 I = 1, N
187            CALL ZDSCAL( N, VMUL, T( 1, I ), 1 )
188   40    CONTINUE
189         IF( TNRM.EQ.ZERO )
190     $      VMUL = ONE
191*
192*        Compute eigenvalues and eigenvectors
193*
194         CALL ZGEHRD( N, 1, N, T, LDT, WORK( 1 ), WORK( N+1 ), LWORK-N,
195     $                INFO )
196         IF( INFO.NE.0 ) THEN
197            LMAX( 1 ) = KNT
198            NINFO( 1 ) = NINFO( 1 ) + 1
199            GO TO 260
200         END IF
201         DO 60 J = 1, N - 2
202            DO 50 I = J + 2, N
203               T( I, J ) = ZERO
204   50       CONTINUE
205   60    CONTINUE
206*
207*        Compute Schur form
208*
209         CALL ZHSEQR( 'S', 'N', N, 1, N, T, LDT, W, CDUM, 1, WORK,
210     $                LWORK, INFO )
211         IF( INFO.NE.0 ) THEN
212            LMAX( 2 ) = KNT
213            NINFO( 2 ) = NINFO( 2 ) + 1
214            GO TO 260
215         END IF
216*
217*        Compute eigenvectors
218*
219         DO 70 I = 1, N
220            SELECT( I ) = .TRUE.
221   70    CONTINUE
222         CALL ZTREVC( 'B', 'A', SELECT, N, T, LDT, LE, LDT, RE, LDT, N,
223     $                M, WORK, RWORK, INFO )
224*
225*        Compute condition numbers
226*
227         CALL ZTRSNA( 'B', 'A', SELECT, N, T, LDT, LE, LDT, RE, LDT, S,
228     $                SEP, N, M, WORK, N, RWORK, INFO )
229         IF( INFO.NE.0 ) THEN
230            LMAX( 3 ) = KNT
231            NINFO( 3 ) = NINFO( 3 ) + 1
232            GO TO 260
233         END IF
234*
235*        Sort eigenvalues and condition numbers lexicographically
236*        to compare with inputs
237*
238         CALL ZCOPY( N, W, 1, WTMP, 1 )
239         IF( ISRT.EQ.0 ) THEN
240*
241*           Sort by increasing real part
242*
243            DO 80 I = 1, N
244               WSRT( I ) = DBLE( W( I ) )
245   80       CONTINUE
246         ELSE
247*
248*           Sort by increasing imaginary part
249*
250            DO 90 I = 1, N
251               WSRT( I ) = DIMAG( W( I ) )
252   90       CONTINUE
253         END IF
254         CALL DCOPY( N, S, 1, STMP, 1 )
255         CALL DCOPY( N, SEP, 1, SEPTMP, 1 )
256         CALL DSCAL( N, ONE / VMUL, SEPTMP, 1 )
257         DO 110 I = 1, N - 1
258            KMIN = I
259            VMIN = WSRT( I )
260            DO 100 J = I + 1, N
261               IF( WSRT( J ).LT.VMIN ) THEN
262                  KMIN = J
263                  VMIN = WSRT( J )
264               END IF
265  100       CONTINUE
266            WSRT( KMIN ) = WSRT( I )
267            WSRT( I ) = VMIN
268            VCMIN = WTMP( I )
269            WTMP( I ) = W( KMIN )
270            WTMP( KMIN ) = VCMIN
271            VMIN = STMP( KMIN )
272            STMP( KMIN ) = STMP( I )
273            STMP( I ) = VMIN
274            VMIN = SEPTMP( KMIN )
275            SEPTMP( KMIN ) = SEPTMP( I )
276            SEPTMP( I ) = VMIN
277  110    CONTINUE
278*
279*        Compare condition numbers for eigenvalues
280*        taking their condition numbers into account
281*
282         V = MAX( TWO*DBLE( N )*EPS*TNRM, SMLNUM )
283         IF( TNRM.EQ.ZERO )
284     $      V = ONE
285         DO 120 I = 1, N
286            IF( V.GT.SEPTMP( I ) ) THEN
287               TOL = ONE
288            ELSE
289               TOL = V / SEPTMP( I )
290            END IF
291            IF( V.GT.SEPIN( I ) ) THEN
292               TOLIN = ONE
293            ELSE
294               TOLIN = V / SEPIN( I )
295            END IF
296            TOL = MAX( TOL, SMLNUM / EPS )
297            TOLIN = MAX( TOLIN, SMLNUM / EPS )
298            IF( EPS*( SIN( I )-TOLIN ).GT.STMP( I )+TOL ) THEN
299               VMAX = ONE / EPS
300            ELSE IF( SIN( I )-TOLIN.GT.STMP( I )+TOL ) THEN
301               VMAX = ( SIN( I )-TOLIN ) / ( STMP( I )+TOL )
302            ELSE IF( SIN( I )+TOLIN.LT.EPS*( STMP( I )-TOL ) ) THEN
303               VMAX = ONE / EPS
304            ELSE IF( SIN( I )+TOLIN.LT.STMP( I )-TOL ) THEN
305               VMAX = ( STMP( I )-TOL ) / ( SIN( I )+TOLIN )
306            ELSE
307               VMAX = ONE
308            END IF
309            IF( VMAX.GT.RMAX( 2 ) ) THEN
310               RMAX( 2 ) = VMAX
311               IF( NINFO( 2 ).EQ.0 )
312     $            LMAX( 2 ) = KNT
313            END IF
314  120    CONTINUE
315*
316*        Compare condition numbers for eigenvectors
317*        taking their condition numbers into account
318*
319         DO 130 I = 1, N
320            IF( V.GT.SEPTMP( I )*STMP( I ) ) THEN
321               TOL = SEPTMP( I )
322            ELSE
323               TOL = V / STMP( I )
324            END IF
325            IF( V.GT.SEPIN( I )*SIN( I ) ) THEN
326               TOLIN = SEPIN( I )
327            ELSE
328               TOLIN = V / SIN( I )
329            END IF
330            TOL = MAX( TOL, SMLNUM / EPS )
331            TOLIN = MAX( TOLIN, SMLNUM / EPS )
332            IF( EPS*( SEPIN( I )-TOLIN ).GT.SEPTMP( I )+TOL ) THEN
333               VMAX = ONE / EPS
334            ELSE IF( SEPIN( I )-TOLIN.GT.SEPTMP( I )+TOL ) THEN
335               VMAX = ( SEPIN( I )-TOLIN ) / ( SEPTMP( I )+TOL )
336            ELSE IF( SEPIN( I )+TOLIN.LT.EPS*( SEPTMP( I )-TOL ) ) THEN
337               VMAX = ONE / EPS
338            ELSE IF( SEPIN( I )+TOLIN.LT.SEPTMP( I )-TOL ) THEN
339               VMAX = ( SEPTMP( I )-TOL ) / ( SEPIN( I )+TOLIN )
340            ELSE
341               VMAX = ONE
342            END IF
343            IF( VMAX.GT.RMAX( 2 ) ) THEN
344               RMAX( 2 ) = VMAX
345               IF( NINFO( 2 ).EQ.0 )
346     $            LMAX( 2 ) = KNT
347            END IF
348  130    CONTINUE
349*
350*        Compare condition numbers for eigenvalues
351*        without taking their condition numbers into account
352*
353         DO 140 I = 1, N
354            IF( SIN( I ).LE.DBLE( 2*N )*EPS .AND. STMP( I ).LE.
355     $          DBLE( 2*N )*EPS ) THEN
356               VMAX = ONE
357            ELSE IF( EPS*SIN( I ).GT.STMP( I ) ) THEN
358               VMAX = ONE / EPS
359            ELSE IF( SIN( I ).GT.STMP( I ) ) THEN
360               VMAX = SIN( I ) / STMP( I )
361            ELSE IF( SIN( I ).LT.EPS*STMP( I ) ) THEN
362               VMAX = ONE / EPS
363            ELSE IF( SIN( I ).LT.STMP( I ) ) THEN
364               VMAX = STMP( I ) / SIN( I )
365            ELSE
366               VMAX = ONE
367            END IF
368            IF( VMAX.GT.RMAX( 3 ) ) THEN
369               RMAX( 3 ) = VMAX
370               IF( NINFO( 3 ).EQ.0 )
371     $            LMAX( 3 ) = KNT
372            END IF
373  140    CONTINUE
374*
375*        Compare condition numbers for eigenvectors
376*        without taking their condition numbers into account
377*
378         DO 150 I = 1, N
379            IF( SEPIN( I ).LE.V .AND. SEPTMP( I ).LE.V ) THEN
380               VMAX = ONE
381            ELSE IF( EPS*SEPIN( I ).GT.SEPTMP( I ) ) THEN
382               VMAX = ONE / EPS
383            ELSE IF( SEPIN( I ).GT.SEPTMP( I ) ) THEN
384               VMAX = SEPIN( I ) / SEPTMP( I )
385            ELSE IF( SEPIN( I ).LT.EPS*SEPTMP( I ) ) THEN
386               VMAX = ONE / EPS
387            ELSE IF( SEPIN( I ).LT.SEPTMP( I ) ) THEN
388               VMAX = SEPTMP( I ) / SEPIN( I )
389            ELSE
390               VMAX = ONE
391            END IF
392            IF( VMAX.GT.RMAX( 3 ) ) THEN
393               RMAX( 3 ) = VMAX
394               IF( NINFO( 3 ).EQ.0 )
395     $            LMAX( 3 ) = KNT
396            END IF
397  150    CONTINUE
398*
399*        Compute eigenvalue condition numbers only and compare
400*
401         VMAX = ZERO
402         DUM( 1 ) = -ONE
403         CALL DCOPY( N, DUM, 0, STMP, 1 )
404         CALL DCOPY( N, DUM, 0, SEPTMP, 1 )
405         CALL ZTRSNA( 'E', 'A', SELECT, N, T, LDT, LE, LDT, RE, LDT,
406     $                STMP, SEPTMP, N, M, WORK, N, RWORK, INFO )
407         IF( INFO.NE.0 ) THEN
408            LMAX( 3 ) = KNT
409            NINFO( 3 ) = NINFO( 3 ) + 1
410            GO TO 260
411         END IF
412         DO 160 I = 1, N
413            IF( STMP( I ).NE.S( I ) )
414     $         VMAX = ONE / EPS
415            IF( SEPTMP( I ).NE.DUM( 1 ) )
416     $         VMAX = ONE / EPS
417  160    CONTINUE
418*
419*        Compute eigenvector condition numbers only and compare
420*
421         CALL DCOPY( N, DUM, 0, STMP, 1 )
422         CALL DCOPY( N, DUM, 0, SEPTMP, 1 )
423         CALL ZTRSNA( 'V', 'A', SELECT, N, T, LDT, LE, LDT, RE, LDT,
424     $                STMP, SEPTMP, N, M, WORK, N, RWORK, INFO )
425         IF( INFO.NE.0 ) THEN
426            LMAX( 3 ) = KNT
427            NINFO( 3 ) = NINFO( 3 ) + 1
428            GO TO 260
429         END IF
430         DO 170 I = 1, N
431            IF( STMP( I ).NE.DUM( 1 ) )
432     $         VMAX = ONE / EPS
433            IF( SEPTMP( I ).NE.SEP( I ) )
434     $         VMAX = ONE / EPS
435  170    CONTINUE
436*
437*        Compute all condition numbers using SELECT and compare
438*
439         DO 180 I = 1, N
440            SELECT( I ) = .TRUE.
441  180    CONTINUE
442         CALL DCOPY( N, DUM, 0, STMP, 1 )
443         CALL DCOPY( N, DUM, 0, SEPTMP, 1 )
444         CALL ZTRSNA( 'B', 'S', SELECT, N, T, LDT, LE, LDT, RE, LDT,
445     $                STMP, SEPTMP, N, M, WORK, N, RWORK, INFO )
446         IF( INFO.NE.0 ) THEN
447            LMAX( 3 ) = KNT
448            NINFO( 3 ) = NINFO( 3 ) + 1
449            GO TO 260
450         END IF
451         DO 190 I = 1, N
452            IF( SEPTMP( I ).NE.SEP( I ) )
453     $         VMAX = ONE / EPS
454            IF( STMP( I ).NE.S( I ) )
455     $         VMAX = ONE / EPS
456  190    CONTINUE
457*
458*        Compute eigenvalue condition numbers using SELECT and compare
459*
460         CALL DCOPY( N, DUM, 0, STMP, 1 )
461         CALL DCOPY( N, DUM, 0, SEPTMP, 1 )
462         CALL ZTRSNA( 'E', 'S', SELECT, N, T, LDT, LE, LDT, RE, LDT,
463     $                STMP, SEPTMP, N, M, WORK, N, RWORK, INFO )
464         IF( INFO.NE.0 ) THEN
465            LMAX( 3 ) = KNT
466            NINFO( 3 ) = NINFO( 3 ) + 1
467            GO TO 260
468         END IF
469         DO 200 I = 1, N
470            IF( STMP( I ).NE.S( I ) )
471     $         VMAX = ONE / EPS
472            IF( SEPTMP( I ).NE.DUM( 1 ) )
473     $         VMAX = ONE / EPS
474  200    CONTINUE
475*
476*        Compute eigenvector condition numbers using SELECT and compare
477*
478         CALL DCOPY( N, DUM, 0, STMP, 1 )
479         CALL DCOPY( N, DUM, 0, SEPTMP, 1 )
480         CALL ZTRSNA( 'V', 'S', SELECT, N, T, LDT, LE, LDT, RE, LDT,
481     $                STMP, SEPTMP, N, M, WORK, N, RWORK, INFO )
482         IF( INFO.NE.0 ) THEN
483            LMAX( 3 ) = KNT
484            NINFO( 3 ) = NINFO( 3 ) + 1
485            GO TO 260
486         END IF
487         DO 210 I = 1, N
488            IF( STMP( I ).NE.DUM( 1 ) )
489     $         VMAX = ONE / EPS
490            IF( SEPTMP( I ).NE.SEP( I ) )
491     $         VMAX = ONE / EPS
492  210    CONTINUE
493         IF( VMAX.GT.RMAX( 1 ) ) THEN
494            RMAX( 1 ) = VMAX
495            IF( NINFO( 1 ).EQ.0 )
496     $         LMAX( 1 ) = KNT
497         END IF
498*
499*        Select second and next to last eigenvalues
500*
501         DO 220 I = 1, N
502            SELECT( I ) = .FALSE.
503  220    CONTINUE
504         ICMP = 0
505         IF( N.GT.1 ) THEN
506            ICMP = 1
507            LCMP( 1 ) = 2
508            SELECT( 2 ) = .TRUE.
509            CALL ZCOPY( N, RE( 1, 2 ), 1, RE( 1, 1 ), 1 )
510            CALL ZCOPY( N, LE( 1, 2 ), 1, LE( 1, 1 ), 1 )
511         END IF
512         IF( N.GT.3 ) THEN
513            ICMP = 2
514            LCMP( 2 ) = N - 1
515            SELECT( N-1 ) = .TRUE.
516            CALL ZCOPY( N, RE( 1, N-1 ), 1, RE( 1, 2 ), 1 )
517            CALL ZCOPY( N, LE( 1, N-1 ), 1, LE( 1, 2 ), 1 )
518         END IF
519*
520*        Compute all selected condition numbers
521*
522         CALL DCOPY( ICMP, DUM, 0, STMP, 1 )
523         CALL DCOPY( ICMP, DUM, 0, SEPTMP, 1 )
524         CALL ZTRSNA( 'B', 'S', SELECT, N, T, LDT, LE, LDT, RE, LDT,
525     $                STMP, SEPTMP, N, M, WORK, N, RWORK, INFO )
526         IF( INFO.NE.0 ) THEN
527            LMAX( 3 ) = KNT
528            NINFO( 3 ) = NINFO( 3 ) + 1
529            GO TO 260
530         END IF
531         DO 230 I = 1, ICMP
532            J = LCMP( I )
533            IF( SEPTMP( I ).NE.SEP( J ) )
534     $         VMAX = ONE / EPS
535            IF( STMP( I ).NE.S( J ) )
536     $         VMAX = ONE / EPS
537  230    CONTINUE
538*
539*        Compute selected eigenvalue condition numbers
540*
541         CALL DCOPY( ICMP, DUM, 0, STMP, 1 )
542         CALL DCOPY( ICMP, DUM, 0, SEPTMP, 1 )
543         CALL ZTRSNA( 'E', 'S', SELECT, N, T, LDT, LE, LDT, RE, LDT,
544     $                STMP, SEPTMP, N, M, WORK, N, RWORK, INFO )
545         IF( INFO.NE.0 ) THEN
546            LMAX( 3 ) = KNT
547            NINFO( 3 ) = NINFO( 3 ) + 1
548            GO TO 260
549         END IF
550         DO 240 I = 1, ICMP
551            J = LCMP( I )
552            IF( STMP( I ).NE.S( J ) )
553     $         VMAX = ONE / EPS
554            IF( SEPTMP( I ).NE.DUM( 1 ) )
555     $         VMAX = ONE / EPS
556  240    CONTINUE
557*
558*        Compute selected eigenvector condition numbers
559*
560         CALL DCOPY( ICMP, DUM, 0, STMP, 1 )
561         CALL DCOPY( ICMP, DUM, 0, SEPTMP, 1 )
562         CALL ZTRSNA( 'V', 'S', SELECT, N, T, LDT, LE, LDT, RE, LDT,
563     $                STMP, SEPTMP, N, M, WORK, N, RWORK, INFO )
564         IF( INFO.NE.0 ) THEN
565            LMAX( 3 ) = KNT
566            NINFO( 3 ) = NINFO( 3 ) + 1
567            GO TO 260
568         END IF
569         DO 250 I = 1, ICMP
570            J = LCMP( I )
571            IF( STMP( I ).NE.DUM( 1 ) )
572     $         VMAX = ONE / EPS
573            IF( SEPTMP( I ).NE.SEP( J ) )
574     $         VMAX = ONE / EPS
575  250    CONTINUE
576         IF( VMAX.GT.RMAX( 1 ) ) THEN
577            RMAX( 1 ) = VMAX
578            IF( NINFO( 1 ).EQ.0 )
579     $         LMAX( 1 ) = KNT
580         END IF
581  260 CONTINUE
582      GO TO 10
583*
584*     End of ZGET37
585*
586      END
587