1 SUBROUTINE pdlaed1( N, N1, D, ID, Q, IQ, JQ, DESCQ, RHO, WORK,
10 INTEGER ID, INFO, IQ, JQ, N, N1
14 INTEGER DESCQ( * ), IWORK( * )
15 DOUBLE PRECISION D( * ), Q( * ), WORK( * )
108 INTEGER BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
109 $ mb_, nb_, rsrc_, csrc_, lld_
110 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
111 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
112 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
113 DOUBLE PRECISION ZERO, ONE
114 parameter( zero = 0.0d+0, one = 1.0d+0 )
117 INTEGER COL, COLTYP, IBUF, ICTOT, ICTXT, IDLMDA, IIQ,
118 $ indcol, indrow, indx, indxc, indxp, indxr, inq,
119 $ ipq, ipq2, ipsm, ipu, ipwork, iq1, iq2, iqcol,
120 $ iqq, iqrow, iw, iz, j, jc, jj2c, jjc, jjq, jnq,
121 $ k, ldq, ldq2, ldu, mycol, myrow, nb, nn, nn1,
122 $ nn2, np, npcol, nprow, nq
125 INTEGER DESCQ2( DLEN_ ), DESCU( DLEN_ )
142 IF( block_cyclic_2d*csrc_*ctxt_*dlen_*dtype_*lld_*mb_*m_*nb_*n_*
148 CALL blacs_gridinfo( descq( ctxt_ ), nprow, npcol, myrow, mycol )
150 IF( nprow.EQ.-1 )
THEN
151 info = -( 600+ctxt_ )
152 ELSE IF( n.LT.0 )
THEN
154 ELSE IF( id.GT.descq( n_ ) )
THEN
156 ELSE IF( n1.GE.n )
THEN
160 CALL pxerbla( descq( ctxt_ ),
'PDLAED1', -info )
173 ictxt = descq( ctxt_ )
177 CALL infog2l( iq-1+id, jq-1+id, descq, nprow, npcol, myrow, mycol,
178 $ iiq, jjq, iqrow, iqcol )
180 np = numroc( n, descq( mb_ ), myrow, iqrow, nprow )
181 nq = numroc( n, descq( nb_ ), mycol, iqcol, npcol )
195 ipsm = ictot + npcol*4
196 indx = ipsm + npcol*4
204 CALL descinit( descq2, n, n, nb, nb, iqrow, iqcol, ictxt, ldq2,
206 CALL descinit( descu, n, n, nb, nb, iqrow, iqcol, ictxt, ldu,
213 CALL pdlaedz( n, n1, id, q, iq, jq, ldq, descq, work( iz ),
218 ipq = iiq + ( jjq-1 )*ldq
219 CALL pdlaed2( ictxt, k, n, n1, nb, d, iqrow, iqcol, q( ipq ), ldq,
220 $ rho, work( iz ), work( iw ), work( idlmda ),
221 $ work( ipq2 ), ldq2, work( ibuf ), iwork( ictot ),
222 $ iwork( ipsm ), npcol, iwork( indx ), iwork( indxc ),
223 $ iwork( indxp ), iwork( indcol ), iwork( coltyp ),
224 $ nn, nn1, nn2, iq1, iq2 )
230 CALL pdlaset(
'A', n, n, zero, one, work( ipu ), 1, 1, descu )
231 CALL pdlaed3( ictxt, k, n, nb, d, iqrow, iqcol, rho,
232 $ work( idlmda ), work( iw ), work( iz ),
233 $ work( ipu ), ldq2, work( ibuf ), iwork( indx ),
234 $ iwork( indcol ), iwork( indrow ), iwork( indxr ),
235 $ iwork( indxc ), iwork( ictot ), npcol, info )
239 iqq =
min( iq1, iq2 )
242 jnq = jq - 1 + id + iqq - 1
243 CALL pdgemm(
'N',
'N', n1, nn, nn1, one, work( ipq2 ), 1,
244 $ iq1, descq2, work( ipu ), iq1, iqq, descu,
245 $ zero, q, inq, jnq, descq )
248 inq = iq - 1 + id + n1
249 jnq = jq - 1 + id + iqq - 1
250 CALL pdgemm(
'N',
'N', n-n1, nn, nn2, one, work( ipq2 ),
251 $ n1+1, iq2, descq2, work( ipu ), iq2, iqq,
252 $ descu, zero, q, inq, jnq, descq )
256 jc = iwork( indx+j-1 )
257 CALL infog1l( jq-1+jc, nb, npcol, mycol, iqcol, jjc, col )
258 CALL infog1l( jc, nb, npcol, mycol, iqcol, jj2c, col )
259 IF( mycol.EQ.col )
THEN
260 iq2 = ipq2 + ( jj2c-1 )*ldq2
261 inq = ipq + ( jjc-1 )*ldq
262 CALL dcopy( np, work( iq2 ), 1, q( inq ), 1 )