3 SUBROUTINE pdlasizesyevx( WKNOWN, RANGE, N, DESCA, VL, VU, IL, IU,
4 $ ISEED, WIN, MAXSIZE, VECSIZE, VALSIZE )
15 INTEGER IL, IU, MAXSIZE, N, VALSIZE, VECSIZE
16 DOUBLE PRECISION VL, VU
19 INTEGER DESCA( * ), ISEED( 4 )
20 DOUBLE PRECISION WIN( * )
104 INTEGER BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
105 $ mb_, nb_, rsrc_, csrc_, lld_
106 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
107 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
108 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
109 DOUBLE PRECISION TWENTY
110 parameter( twenty = 20.0d0 )
114 INTEGER CLUSTERSIZE, I, ILMIN, IUMAX, MAXCLUSTERSIZE,
115 $ mq0, mycol, myil, myiu, myrow, nb, neig, nn,
117 DOUBLE PRECISION ANORM, EPS, ORFAC, SAFMIN, VLMIN, VUMAX
123 INTEGER ICEIL, NUMROC
124 DOUBLE PRECISION DLARAN, PDLAMCH
125 EXTERNAL lsame, iceil, numroc, dlaran, pdlamch
128 EXTERNAL blacs_gridinfo
131 INTRINSIC abs, dble, int,
max
135 IF( block_cyclic_2d*csrc_*ctxt_*dlen_*dtype_*lld_*mb_*m_*nb_*n_*
141 CALL blacs_gridinfo( desca( ctxt_ ), nprow, npcol, myrow, mycol )
142 eps = pdlamch( desca( ctxt_ ),
'Precision' )
143 safmin = pdlamch( desca( ctxt_ ),
'Safe Minimum' )
146 np0 = numroc( nn, nb, 0, 0, nprow )
148 valsize = 5*n +
max( 5*nn, nb*( np0+1 ) )
153 $ anorm =
max( abs( win( 1 ) ), abs( win( n ) ), anorm )
155 IF( lsame( range,
'I' ) )
THEN
157 $ il = int( dlaran( iseed )*dble( n ) ) + 1
159 $ iu = int( dlaran( iseed )*dble( n-il ) ) + il
162 ELSE IF( lsame( range,
'V' ) )
THEN
164 myil = int( dlaran( iseed )*dble( n ) ) + 1
165 myiu = int( dlaran( iseed )*dble( n-myil ) ) + myil
166 vl = win( myil ) + twenty*eps*abs( win( myil ) )
167 vu = win( myiu ) + twenty*eps*abs( win( myiu ) )
168 vu =
max( vu, vl+eps*twenty*abs( vl )+safmin )
173 IF( lsame( range,
'V' ) )
THEN
178 vlmin = vl - twenty*eps*anorm
179 vumax = vu + twenty*eps*anorm
183 IF( win( i ).LT.vlmin )
185 IF( win( i ).LT.vumax )
192 ELSE IF( lsame( range,
'I' ) )
THEN
195 ELSE IF( lsame( range,
'A' ) )
THEN
200 neig = iumax - ilmin + 1
202 mq0 = numroc(
max( neig, nb, 2 ), nb, 0, 0, npcol )
203 vecsize = 5*n +
max( 5*nn, np0*mq0+2*nb*nb ) +
204 $ iceil( neig, nprow*npcol )*nn
209 DO 20 i = ilmin + 1, iumax
210 IF( ( win( i )-win( i-1 ) ).LT.orfac*2*anorm )
THEN
211 clustersize = clustersize + 1
212 IF( clustersize.GT.maxclustersize )
213 $ maxclustersize = clustersize
218 IF( clustersize.GT.maxclustersize )
219 $ maxclustersize = clustersize
224 maxsize = vecsize +
max( ( maxclustersize-1 ), 0 )*n