1 SUBROUTINE pslaed1( N, N1, D, ID, Q, IQ, JQ, DESCQ, RHO, WORK,
10 INTEGER ID, INFO, IQ, JQ, N, N1
14 INTEGER DESCQ( * ), IWORK( * )
15 REAL 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 )
114 parameter( zero = 0.0e+0, one = 1.0e+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_ ),
'PSLAED1', -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 pslaedz( n, n1, id, q, iq, jq, ldq, descq, work( iz ),
218 ipq = iiq + ( jjq-1 )*ldq
219 CALL pslaed2( 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 )
229 CALL pslaset(
'A', n, n, zero, one, work( ipu ), 1, 1, descu )
230 CALL pslaed3( ictxt, k, n, nb, d, iqrow, iqcol, rho,
231 $ work( idlmda ), work( iw ), work( iz ),
232 $ work( ipu ), ldq2, work( ibuf ), iwork( indx ),
233 $ iwork( indcol ), iwork( indrow ), iwork( indxr ),
234 $ iwork( indxc ), iwork( ictot ), npcol, info )
238 iqq =
min( iq1, iq2 )
241 jnq = jq - 1 + id + iqq - 1
242 CALL psgemm(
'N',
'N', n1, nn, nn1, one, work( ipq2 ), 1,
243 $ iq1, descq2, work( ipu ), iq1, iqq, descu,
244 $ zero, q, inq, jnq, descq )
247 inq = iq - 1 + id + n1
248 jnq = jq - 1 + id + iqq - 1
249 CALL psgemm(
'N',
'N', n-n1, nn, nn2, one, work( ipq2 ),
250 $ n1+1, iq2, descq2, work( ipu ), iq2, iqq,
251 $ descu, zero, q, inq, jnq, descq )
255 jc = iwork( indx+j-1 )
256 CALL infog1l( jq-1+jc, nb, npcol, mycol, iqcol, jjc, col )
257 CALL infog1l( jc, nb, npcol, mycol, iqcol, jj2c, col )
258 IF( mycol.EQ.col )
THEN
259 iq2 = ipq2 + ( jj2c-1 )*ldq2
260 inq = ipq + ( jjc-1 )*ldq
261 CALL scopy( np, work( iq2 ), 1, q( inq ), 1 )