1 SUBROUTINE pzlasizeheevr( WKNOWN, RANGE, N, DESCA, VL, VU, IL, IU,
2 $ ISEED, WIN, MAXSIZE, VECSIZE, VALSIZE )
14 INTEGER IL, IU, MAXSIZE, N, VALSIZE, VECSIZE
15 DOUBLE PRECISION VL, VU
19 INTEGER DESCA( * ), ISEED( 4 )
20 DOUBLE PRECISION WIN( * )
104 parameter( ctxt_ = 2, mb_ = 5 )
105 DOUBLE PRECISION TWENTY
106 parameter( twenty = 20.0d0 )
110 INTEGER ILMIN, IUMAX,
111 $ mq0, mycol, myil, myiu, myrow, nb, neig, nn,
113 DOUBLE PRECISION ANORM, EPS, SAFMIN
117 INTEGER ICEIL, NUMROC
118 DOUBLE PRECISION DLARAN, PDLAMCH
119 EXTERNAL lsame, iceil, numroc, dlaran, pdlamch
122 EXTERNAL blacs_gridinfo
125 INTRINSIC abs, dble, int,
max
130 CALL blacs_gridinfo( desca( ctxt_ ), nprow, npcol, myrow, mycol )
131 eps = pdlamch( desca( ctxt_ ),
'Precision' )
132 safmin = pdlamch( desca( ctxt_ ),
'Safe Minimum' )
135 np0 = numroc( nn, nb, 0, 0, nprow )
137 valsize = 3 + 5*n +
max( 12*nn, nb*( np0+1 ) )
142 $ anorm =
max( abs( win( 1 ) ), abs( win( n ) ), anorm )
143 IF( lsame( range,
'I' ) )
THEN
145 $ il = int( dlaran( iseed )*dble( n ) ) + 1
147 $ iu = int( dlaran( iseed )*dble( n-il ) ) + il
150 ELSE IF( lsame( range,
'V' ) )
THEN
152 myil = int( dlaran( iseed )*dble( n ) ) + 1
153 myiu = int( dlaran( iseed )*dble( n-myil ) ) + myil
154 vl = win( myil ) - twenty*eps*abs( win( myil ) )
155 vu = win( myiu ) + twenty*eps*abs( win( myiu ) )
156 vu =
max( vu, vl+eps*twenty*abs( vl )+safmin )
161 IF( lsame( range,
'V' ) )
THEN
165 ELSE IF( lsame( range,
'I' ) )
THEN
168 ELSE IF( lsame( range,
'A' ) )
THEN
173 neig = iumax - ilmin + 1
175 mq0 = numroc(
max( neig, nb, 2 ), nb, 0, 0, npcol )
177 vecsize = 3 + 5*n +
max( 18*nn, np0*mq0+2*nb*nb ) +
178 $ (2 + iceil( neig, nprow*npcol ))*nn
180 valsize =
max(3, valsize)
181 vecsize =
max(3, vecsize)