.TH PSSYEVX l "12 May 1997" "LAPACK version 1.5" "LAPACK routine (version 1.5)"
.SH NAME

.SH SYNOPSIS
.TP 20
SUBROUTINE PSSYEVX(
JOBZ, RANGE, UPLO, N, A, IA, JA, DESCA, VL,
VU, IL, IU, ABSTOL, M, NZ, W, ORFAC, Z, IZ,
JZ, DESCZ, WORK, LWORK, IWORK, LIWORK, IFAIL,
ICLUSTR, GAP, INFO )
.TP 20
.ti +4
CHARACTER
JOBZ, RANGE, UPLO
.TP 20
.ti +4
INTEGER
IA, IL, INFO, IU, IZ, JA, JZ, LIWORK, LWORK,
M, N, NZ
.TP 20
.ti +4
REAL
ABSTOL, ORFAC, VL, VU
.TP 20
.ti +4
INTEGER
DESCA( * ), DESCZ( * ), ICLUSTR( * ),
IFAIL( * ), IWORK( * )
.TP 20
.ti +4
REAL
A( * ), GAP( * ), W( * ), WORK( * ), Z( * )
.TP 20
.ti +4
INTEGER
BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
MB_, NB_, RSRC_, CSRC_, LLD_
.TP 20
.ti +4
PARAMETER
( BLOCK_CYCLIC_2D = 1, DLEN_ = 9, DTYPE_ = 1,
CTXT_ = 2, M_ = 3, N_ = 4, MB_ = 5, NB_ = 6,
RSRC_ = 7, CSRC_ = 8, LLD_ = 9 )
.TP 20
.ti +4
REAL
ZERO, ONE, TEN, FIVE
.TP 20
.ti +4
PARAMETER
( ZERO = 0.0E+0, ONE = 1.0E+0, TEN = 10.0E+0,
FIVE = 5.0E+0 )
.TP 20
.ti +4
INTEGER
IERREIN, IERRCLS, IERRSPC, IERREBZ
.TP 20
.ti +4
PARAMETER
( IERREIN = 1, IERRCLS = 2, IERRSPC = 4,
IERREBZ = 8 )
.TP 20
.ti +4
LOGICAL
ALLEIG, INDEIG, LOWER, LQUERY, QUICKRETURN,
VALEIG, WANTZ
.TP 20
.ti +4
CHARACTER
ORDER
.TP 20
.ti +4
INTEGER
CSRC_A, I, IACOL, IAROW, ICOFFA, IINFO, INDD,
INDD2, INDE, INDE2, INDIBL, INDISP, INDTAU,
INDWORK, IROFFA, IROFFZ, ISCALE, ISIZESTEBZ,
ISIZESTEIN, IZROW, LALLWORK, LIWMIN, LLWORK,
LWMIN, MAXEIGS, MB_A, MB_Z, MQ0, MYCOL, MYROW,
NB, NB_A, NB_Z, NEIG, NN, NNP, NP0, NPCOL,
NPROCS, NPROW, NSPLIT, NZZ, OFFSET, RSRC_A,
RSRC_Z, SIZEORMTR, SIZESTEIN, SIZESYEVX
.TP 20
.ti +4
REAL
ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
SIGMA, SMLNUM, VLL, VUU
.TP 20
.ti +4
INTEGER
IDUM1( 4 ), IDUM2( 4 )
.TP 20
.ti +4
LOGICAL
LSAME
.TP 20
.ti +4
INTEGER
ICEIL, INDXG2P, NUMROC
.TP 20
.ti +4
REAL
PSLAMCH, PSLANSY
.TP 20
.ti +4
EXTERNAL
LSAME, ICEIL, INDXG2P, NUMROC, PSLAMCH,
PSLANSY
.TP 20
.ti +4
EXTERNAL
BLACS_GRIDINFO, CHK1MAT, IGAMN2D, PCHK2MAT,
PSELGET, PSLARED1D, PSLASCL, PSORMTR, PSSTEBZ,
PSSTEIN, PSSYTRD, PXERBLA, SGEBR2D, SGEBS2D,
SLASRT, SSCAL
.TP 20
.ti +4
INTRINSIC
ABS, ICHAR, MAX, MIN, MOD, REAL, SQRT
.TP 20
.ti +4
IF(
BLOCK_CYCLIC_2D*CSRC_*CTXT_*DLEN_*DTYPE_*LLD_*MB_*M_*NB_*N_*
RSRC_.LT.0 )RETURN
.TP 20
.ti +4
QUICKRETURN
= ( N.EQ.0 )
.TP 20
.ti +4
CALL
BLACS_GRIDINFO( DESCA( CTXT_ ), NPROW, NPCOL, MYROW, MYCOL )
.TP 20
.ti +4
INFO
= 0
.TP 20
.ti +4
IF(
NPROW.EQ.-1 ) THEN
.TP 20
.ti +4
INFO
= -( 800+CTXT_ )
.TP 20
.ti +4
ELSE
IF( DESCA( CTXT_ ).NE.DESCZ( CTXT_ ) ) THEN
.TP 20
.ti +4
INFO
= -( 2100+CTXT_ )
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
CALL
CHK1MAT( N, 4, N, 4, IA, JA, DESCA, 8, INFO )
.TP 20
.ti +4
CALL
CHK1MAT( N, 4, N, 4, IZ, JZ, DESCZ, 21, INFO )
.TP 20
.ti +4
IF(
INFO.EQ.0 ) THEN
.TP 20
.ti +4
SAFMIN
= PSLAMCH( DESCA( CTXT_ ), 'Safe minimum' )
.TP 20
.ti +4
EPS
= PSLAMCH( DESCA( CTXT_ ), 'Precision' )
.TP 20
.ti +4
SMLNUM
= SAFMIN / EPS
.TP 20
.ti +4
BIGNUM
= ONE / SMLNUM
.TP 20
.ti +4
RMIN
= SQRT( SMLNUM )
.TP 20
.ti +4
RMAX
= MIN( SQRT( BIGNUM ), ONE / SQRT( SQRT( SAFMIN ) ) )
.TP 20
.ti +4
NPROCS
= NPROW*NPCOL
.TP 20
.ti +4
LOWER
= LSAME( UPLO, 'L' )
.TP 20
.ti +4
WANTZ
= LSAME( JOBZ, 'V' )
.TP 20
.ti +4
ALLEIG
= LSAME( RANGE, 'A' )
.TP 20
.ti +4
VALEIG
= LSAME( RANGE, 'V' )
.TP 20
.ti +4
INDEIG
= LSAME( RANGE, 'I' )
.TP 20
.ti +4
INDTAU
= 1
.TP 20
.ti +4
INDE
= INDTAU + N
.TP 20
.ti +4
INDD
= INDE + N
.TP 20
.ti +4
INDD2
= INDD + N
.TP 20
.ti +4
INDE2
= INDD2 + N
.TP 20
.ti +4
INDWORK
= INDE2 + N
.TP 20
.ti +4
LLWORK
= LWORK - INDWORK + 1
.TP 20
.ti +4
ISIZESTEIN
= 3*N + NPROCS + 1
.TP 20
.ti +4
ISIZESTEBZ
= MAX( 4*N, 14, NPROCS )
.TP 20
.ti +4
INDIBL
= ( MAX( ISIZESTEIN, ISIZESTEBZ ) ) + 1
.TP 20
.ti +4
INDISP
= INDIBL + N
.TP 20
.ti +4
LQUERY
= .FALSE.
.TP 20
.ti +4
IF(
LWORK.EQ.-1 .OR. LIWORK.EQ.-1 )
LQUERY = .TRUE.
.TP 20
.ti +4
NNP
= MAX( N, NPROCS+1, 4 )
.TP 20
.ti +4
LIWMIN
= 6*NNP
.TP 20
.ti +4
NPROCS
= NPROW*NPCOL
.TP 20
.ti +4
NB_A
= DESCA( NB_ )
.TP 20
.ti +4
MB_A
= DESCA( MB_ )
.TP 20
.ti +4
NB_Z
= DESCZ( NB_ )
.TP 20
.ti +4
MB_Z
= DESCZ( MB_ )
.TP 20
.ti +4
NB
= NB_A
.TP 20
.ti +4
NN
= MAX( N, NB, 2 )
.TP 20
.ti +4
RSRC_A
= DESCA( RSRC_ )
.TP 20
.ti +4
CSRC_A
= DESCA( CSRC_ )
.TP 20
.ti +4
RSRC_Z
= DESCZ( RSRC_ )
.TP 20
.ti +4
IROFFA
= MOD( IA-1, MB_A )
.TP 20
.ti +4
ICOFFA
= MOD( JA-1, NB_A )
.TP 20
.ti +4
IROFFZ
= MOD( IZ-1, MB_A )
.TP 20
.ti +4
IAROW
= INDXG2P( 1, NB_A, MYROW, RSRC_A, NPROW )
.TP 20
.ti +4
IACOL
= INDXG2P( 1, MB_A, MYCOL, CSRC_A, NPCOL )
.TP 20
.ti +4
IZROW
= INDXG2P( 1, NB_A, MYROW, RSRC_Z, NPROW )
.TP 20
.ti +4
NP0
= NUMROC( N+IROFFA, NB_Z, MYROW, IAROW, NPROW )
.TP 20
.ti +4
MQ0
= NUMROC( N+ICOFFA, NB_Z, MYCOL, IACOL, NPCOL )
.TP 20
.ti +4
IF(
( .NOT.WANTZ ) .OR. ( VALEIG .AND. ( .NOT.LQUERY ) ) )
THEN
.TP 20
.ti +4
LWMIN
= 5*N + MAX( 5*NN, NB*( NP0+1 ) )
.TP 20
.ti +4
NEIG
= 0
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
IF(
ALLEIG .OR. VALEIG ) THEN
.TP 20
.ti +4
NEIG
= N
.TP 20
.ti +4
ELSE
IF( INDEIG ) THEN
.TP 20
.ti +4
NEIG
= IU - IL + 1
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
MQ0
= NUMROC( MAX( NEIG, NB, 2 ), NB, MYCOL, IACOL,
NPCOL )
.TP 20
.ti +4
LWMIN
= 5*N + MAX( 5*NN, NP0*MQ0+2*NB*NB ) +
ICEIL( NEIG, NPROW*NPCOL )*NN
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
INFO.EQ.0 ) THEN
.TP 20
.ti +4
IF(
MYROW.EQ.0 .AND. MYCOL.EQ.0 ) THEN
.TP 20
.ti +4
WORK(
1 ) = ABSTOL
.TP 20
.ti +4
IF(
VALEIG ) THEN
.TP 20
.ti +4
WORK(
2 ) = VL
.TP 20
.ti +4
WORK(
3 ) = VU
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
WORK(
2 ) = ZERO
.TP 20
.ti +4
WORK(
3 ) = ZERO
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
CALL
SGEBS2D( DESCA( CTXT_ ), 'ALL', ' ', 3, 1, WORK,
3 )
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
CALL
SGEBR2D( DESCA( CTXT_ ), 'ALL', ' ', 3, 1, WORK, 3,
0, 0 )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
.NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN
.TP 20
.ti +4
INFO
= -1
.TP 20
.ti +4
ELSE
IF( .NOT.( ALLEIG .OR. VALEIG .OR. INDEIG ) ) THEN
.TP 20
.ti +4
INFO
= -2
.TP 20
.ti +4
ELSE
IF( .NOT.( LOWER .OR. LSAME( UPLO, 'U' ) ) ) THEN
.TP 20
.ti +4
INFO
= -3
.TP 20
.ti +4
ELSE
IF( VALEIG .AND. N.GT.0 .AND. VU.LE.VL ) THEN
.TP 20
.ti +4
INFO
= -10
.TP 20
.ti +4
ELSE
IF( INDEIG .AND. ( IL.LT.1 .OR. IL.GT.MAX( 1, N ) ) )
THEN
.TP 20
.ti +4
INFO
= -11
.TP 20
.ti +4
ELSE
IF( INDEIG .AND. ( IU.LT.MIN( N, IL ) .OR. IU.GT.N ) )
THEN
.TP 20
.ti +4
INFO
= -12
.TP 20
.ti +4
ELSE
IF( LWORK.LT.LWMIN .AND. LWORK.NE.-1 ) THEN
.TP 20
.ti +4
INFO
= -23
.TP 20
.ti +4
ELSE
IF( LIWORK.LT.LIWMIN .AND. LIWORK.NE.-1 ) THEN
.TP 20
.ti +4
INFO
= -25
.TP 20
.ti +4
ELSE
IF( VALEIG .AND. ( ABS( WORK( 2 )-VL ).GT.FIVE*EPS*
ABS( VL ) ) ) THEN
.TP 20
.ti +4
INFO
= -9
.TP 20
.ti +4
ELSE
IF( VALEIG .AND. ( ABS( WORK( 3 )-VU ).GT.FIVE*EPS*
ABS( VU ) ) ) THEN
.TP 20
.ti +4
INFO
= -10
.TP 20
.ti +4
ELSE
IF( ABS( WORK( 1 )-ABSTOL ).GT.FIVE*EPS*ABS( ABSTOL ) )
THEN
.TP 20
.ti +4
INFO
= -13
.TP 20
.ti +4
ELSE
IF( IROFFA.NE.IROFFZ ) THEN
.TP 20
.ti +4
INFO
= -19
.TP 20
.ti +4
ELSE
IF( IROFFA.NE.0 ) THEN
.TP 20
.ti +4
INFO
= -6
.TP 20
.ti +4
ELSE
IF( IAROW.NE.IZROW ) THEN
.TP 20
.ti +4
INFO
= -19
.TP 20
.ti +4
ELSE
IF( DESCA( MB_ ).NE.DESCA( NB_ ) ) THEN
.TP 20
.ti +4
INFO
= -( 800+NB_ )
.TP 20
.ti +4
ELSE
IF( DESCA( M_ ).NE.DESCZ( M_ ) ) THEN
.TP 20
.ti +4
INFO
= -( 2100+M_ )
.TP 20
.ti +4
ELSE
IF( DESCA( N_ ).NE.DESCZ( N_ ) ) THEN
.TP 20
.ti +4
INFO
= -( 2100+N_ )
.TP 20
.ti +4
ELSE
IF( DESCA( MB_ ).NE.DESCZ( MB_ ) ) THEN
.TP 20
.ti +4
INFO
= -( 2100+MB_ )
.TP 20
.ti +4
ELSE
IF( DESCA( NB_ ).NE.DESCZ( NB_ ) ) THEN
.TP 20
.ti +4
INFO
= -( 2100+NB_ )
.TP 20
.ti +4
ELSE
IF( DESCA( RSRC_ ).NE.DESCZ( RSRC_ ) ) THEN
.TP 20
.ti +4
INFO
= -( 2100+RSRC_ )
.TP 20
.ti +4
ELSE
IF( DESCA( CSRC_ ).NE.DESCZ( CSRC_ ) ) THEN
.TP 20
.ti +4
INFO
= -( 2100+CSRC_ )
.TP 20
.ti +4
ELSE
IF( DESCA( CTXT_ ).NE.DESCZ( CTXT_ ) ) THEN
.TP 20
.ti +4
INFO
= -( 2100+CTXT_ )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
WANTZ ) THEN
.TP 20
.ti +4
IDUM1(
1 ) = ICHAR( 'V' )
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
IDUM1(
1 ) = ICHAR( 'N' )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IDUM2(
1 ) = 1
.TP 20
.ti +4
IF(
LOWER ) THEN
.TP 20
.ti +4
IDUM1(
2 ) = ICHAR( 'L' )
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
IDUM1(
2 ) = ICHAR( 'U' )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IDUM2(
2 ) = 2
.TP 20
.ti +4
IF(
ALLEIG ) THEN
.TP 20
.ti +4
IDUM1(
3 ) = ICHAR( 'A' )
.TP 20
.ti +4
ELSE
IF( INDEIG ) THEN
.TP 20
.ti +4
IDUM1(
3 ) = ICHAR( 'I' )
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
IDUM1(
3 ) = ICHAR( 'V' )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IDUM2(
3 ) = 3
.TP 20
.ti +4
IF(
LQUERY ) THEN
.TP 20
.ti +4
IDUM1(
4 ) = -1
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
IDUM1(
4 ) = 1
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IDUM2(
4 ) = 4
.TP 20
.ti +4
CALL
PCHK2MAT( N, 4, N, 4, IA, JA, DESCA, 8, N, 4, N, 4, IZ,
JZ, DESCZ, 21, 4, IDUM1, IDUM2, INFO )
.TP 20
.ti +4
WORK(
1 ) = REAL( LWMIN )
.TP 20
.ti +4
IWORK(
1 ) = LIWMIN
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
INFO.NE.0 ) THEN
.TP 20
.ti +4
CALL
PXERBLA( DESCA( CTXT_ ), 'PSSYEVX', -INFO )
.TP 20
.ti +4
RETURN
.TP 20
.ti +4
ELSE
IF( LQUERY ) THEN
.TP 20
.ti +4
RETURN
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
QUICKRETURN ) THEN
.TP 20
.ti +4
IF(
WANTZ ) THEN
.TP 20
.ti +4
NZ
= 0
.TP 20
.ti +4
ICLUSTR(
1 ) = 0
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
M
= 0
.TP 20
.ti +4
WORK(
1 ) = REAL( LWMIN )
.TP 20
.ti +4
IWORK(
1 ) = LIWMIN
.TP 20
.ti +4
RETURN
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
ABSTLL
= ABSTOL
.TP 20
.ti +4
ISCALE
= 0
.TP 20
.ti +4
IF(
VALEIG ) THEN
.TP 20
.ti +4
VLL
= VL
.TP 20
.ti +4
VUU
= VU
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
VLL
= ZERO
.TP 20
.ti +4
VUU
= ZERO
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
ANRM
= PSLANSY( '1', UPLO, N, A, IA, JA, DESCA, WORK( INDWORK ) )
.TP 20
.ti +4
IF(
ANRM.GT.ZERO .AND. ANRM.LT.RMIN ) THEN
.TP 20
.ti +4
ISCALE
= 1
.TP 20
.ti +4
SIGMA
= RMIN / ANRM
.TP 20
.ti +4
ANRM
= ANRM*SIGMA
.TP 20
.ti +4
ELSE
IF( ANRM.GT.RMAX ) THEN
.TP 20
.ti +4
ISCALE
= 1
.TP 20
.ti +4
SIGMA
= RMAX / ANRM
.TP 20
.ti +4
ANRM
= ANRM*SIGMA
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
ISCALE.EQ.1 ) THEN
.TP 20
.ti +4
CALL
PSLASCL( UPLO, ONE, SIGMA, N, N, A, IA, JA, DESCA,
IINFO )
.TP 20
.ti +4
IF(
ABSTOL.GT.0 )
ABSTLL = ABSTOL*SIGMA
.TP 20
.ti +4
IF(
VALEIG ) THEN
.TP 20
.ti +4
VLL
= VL*SIGMA
.TP 20
.ti +4
VUU
= VU*SIGMA
.TP 20
.ti +4
IF(
VUU.EQ.VLL ) THEN
.TP 20
.ti +4
VUU
= VUU + 2*MAX( ABS( VUU )*EPS, SAFMIN )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
LALLWORK
= LLWORK
.TP 20
.ti +4
CALL
PSSYTRD( UPLO, N, A, IA, JA, DESCA, WORK( INDD ),
WORK( INDE ), WORK( INDTAU ), WORK( INDWORK ),
LLWORK, IINFO )
.TP 20
.ti +4
OFFSET
= 0
.TP 20
.ti +4
IF(
IA.EQ.1 .AND. JA.EQ.1 .AND. RSRC_A.EQ.0 .AND. CSRC_A.EQ.0 )
THEN
.TP 20
.ti +4
CALL
PSLARED1D( N, IA, JA, DESCA, WORK( INDD ), WORK( INDD2 ),
WORK( INDWORK ), LLWORK )
.TP 20
.ti +4
CALL
PSLARED1D( N, IA, JA, DESCA, WORK( INDE ), WORK( INDE2 ),
WORK( INDWORK ), LLWORK )
.TP 20
.ti +4
IF(
.NOT.LOWER )
OFFSET = 1
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
DO
10 I = 1, N
.TP 20
.ti +4
CALL
PSELGET( 'A', ' ', WORK( INDD2+I-1 ), A, I+IA-1,
I+JA-1, DESCA )
.TP 20
.ti +4
10
CONTINUE
.TP 20
.ti +4
IF(
LSAME( UPLO, 'U' ) ) THEN
.TP 20
.ti +4
DO
20 I = 1, N - 1
.TP 20
.ti +4
CALL
PSELGET( 'A', ' ', WORK( INDE2+I-1 ), A, I+IA-1,
I+JA, DESCA )
.TP 20
.ti +4
20
CONTINUE
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
DO
30 I = 1, N - 1
.TP 20
.ti +4
CALL
PSELGET( 'A', ' ', WORK( INDE2+I-1 ), A, I+IA,
I+JA-1, DESCA )
.TP 20
.ti +4
30
CONTINUE
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
WANTZ ) THEN
.TP 20
.ti +4
ORDER
= 'b'
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
ORDER
= 'e'
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
CALL
PSSTEBZ( DESCA( CTXT_ ), RANGE, ORDER, N, VLL, VUU, IL, IU,
ABSTLL, WORK( INDD2 ), WORK( INDE2+OFFSET ), M,
NSPLIT, W, IWORK( INDIBL ), IWORK( INDISP ),
WORK( INDWORK ), LLWORK, IWORK( 1 ), ISIZESTEBZ,
IINFO )
.TP 20
.ti +4
IF(
IINFO.NE.0 ) THEN
.TP 20
.ti +4
INFO
= INFO + IERREBZ
.TP 20
.ti +4
DO
40 I = 1, M
.TP 20
.ti +4
IWORK(
INDIBL+I-1 ) = ABS( IWORK( INDIBL+I-1 ) )
.TP 20
.ti +4
40
CONTINUE
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
WANTZ ) THEN
.TP 20
.ti +4
IF(
VALEIG ) THEN
.TP 20
.ti +4
CALL
IGAMN2D( DESCA( CTXT_ ), 'A', ' ', 1, 1, LALLWORK, 1,
1, 1, -1, -1, -1 )
.TP 20
.ti +4
MAXEIGS
= DESCZ( N_ )
.TP 20
.ti +4
DO
50 NZ = MIN( MAXEIGS, M ), 0, -1
.TP 20
.ti +4
MQ0
= NUMROC( NZ, NB, 0, 0, NPCOL )
.TP 20
.ti +4
SIZESTEIN
= ICEIL( NZ, NPROCS )*N + MAX( 5*N, NP0*MQ0 )
.TP 20
.ti +4
SIZEORMTR
= MAX( ( NB*( NB-1 ) ) / 2, ( MQ0+NP0 )*NB ) +
NB*NB
.TP 20
.ti +4
SIZESYEVX
= MAX( SIZESTEIN, SIZEORMTR )
.TP 20
.ti +4
IF(
SIZESYEVX.LE.LALLWORK )
GO TO 60
.TP 20
.ti +4
50
CONTINUE
.TP 20
.ti +4
60
CONTINUE
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
NZ
= M
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
NZ
= MAX( NZ, 0 )
.TP 20
.ti +4
IF(
NZ.NE.M ) THEN
.TP 20
.ti +4
INFO
= INFO + IERRSPC
.TP 20
.ti +4
DO
70 I = 1, M
.TP 20
.ti +4
IFAIL(
I ) = 0
.TP 20
.ti +4
70
CONTINUE
.TP 20
.ti +4
IF(
NSPLIT.GT.1 ) THEN
.TP 20
.ti +4
CALL
SLASRT( 'I', M, W, IINFO )
.TP 20
.ti +4
IF(
NZ.GT.0 ) THEN
.TP 20
.ti +4
VUU
= W( NZ ) - TEN*( EPS*ANRM+SAFMIN )
.TP 20
.ti +4
IF(
VLL.GE.VUU ) THEN
.TP 20
.ti +4
NZZ
= 0
.TP 20
.ti +4
ELSE
.TP 20
.ti +4
CALL
PSSTEBZ( DESCA( CTXT_ ), RANGE, ORDER, N,
VLL, VUU, IL, IU, ABSTLL,
WORK( INDD2 ), WORK( INDE2+OFFSET ),
NZZ, NSPLIT, W, IWORK( INDIBL ),
IWORK( INDISP ), WORK( INDWORK ),
LLWORK, IWORK( 1 ), ISIZESTEBZ,
IINFO )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
MOD( INFO / IERREBZ, 1 ).EQ.0 ) THEN
.TP 20
.ti +4
IF(
NZZ.GT.NZ .OR. IINFO.NE.0 ) THEN
.TP 20
.ti +4
INFO
= INFO + IERREBZ
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
NZ
= MIN( NZ, NZZ )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
CALL
PSSTEIN( N, WORK( INDD2 ), WORK( INDE2+OFFSET ), NZ, W,
IWORK( INDIBL ), IWORK( INDISP ), ORFAC, Z, IZ,
JZ, DESCZ, WORK( INDWORK ), LALLWORK,
IWORK( 1 ), ISIZESTEIN, IFAIL, ICLUSTR, GAP,
IINFO )
.TP 20
.ti +4
IF(
IINFO.GE.NZ+1 )
INFO = INFO + IERRCLS
.TP 20
.ti +4
IF(
MOD( IINFO, NZ+1 ).NE.0 )
INFO = INFO + IERREIN
.TP 20
.ti +4
IF(
NZ.GT.0 ) THEN
.TP 20
.ti +4
CALL
PSORMTR( 'L', UPLO, 'N', N, NZ, A, IA, JA, DESCA,
WORK( INDTAU ), Z, IZ, JZ, DESCZ,
WORK( INDWORK ), LLWORK, IINFO )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
IF(
ISCALE.EQ.1 ) THEN
.TP 20
.ti +4
CALL
SSCAL( M, ONE / SIGMA, W, 1 )
.TP 20
.ti +4
END
IF
.TP 20
.ti +4
WORK(
1 ) = REAL( LWMIN )
.TP 20
.ti +4
IWORK(
1 ) = LIWMIN
.TP 20
.ti +4
RETURN
.TP 20
.ti +4
END
.SH PURPOSE
