3 SUBROUTINE pzsepchk( MS, NV, A, IA, JA, DESCA, EPSNORMA, THRESH,
4 $ Q, IQ, JQ, DESCQ, C, IC, JC, DESCC, W, WORK,
5 $ LWORK, TSTNRM, RESULT )
12 INTEGER IA, IC, IQ, JA, JC, JQ, LWORK, MS, NV, RESULT
13 DOUBLE PRECISION EPSNORMA, THRESH, TSTNRM
17 INTEGER DESCA( * ), DESCC( * ), DESCQ( * )
18 DOUBLE PRECISION W( * ), WORK( * )
19 COMPLEX*16 A( * ), C( * ), Q( * )
183 INTEGER INFO, J, LOCALCOL, MP, MYCOL, MYROW, NPCOL,
185 DOUBLE PRECISION NORM
188 INTEGER BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
189 $ MB_, NB_, RSRC_, CSRC_, LLD_
190 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
191 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
192 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
193 COMPLEX*16 ONE, NEGONE
194 PARAMETER ( ONE = 1.0d+0, negone = -1.0d+0 )
197 INTEGER INDXG2L, INDXG2P, NUMROC
198 DOUBLE PRECISION PZLANGE
199 EXTERNAL indxg2l, indxg2p, numroc, pzlange
210 IF( block_cyclic_2d*csrc_*ctxt_*dlen_*dtype_*lld_*mb_*m_*nb_*n_*
215 CALL blacs_gridinfo( desca( ctxt_ ), nprow, npcol, myrow, mycol )
218 CALL chk1mat( ms, 1, ms, 1, ia, ja, desca, 6, info )
219 CALL chk1mat( ms, 1, nv, 2, iq, jq, descq, 12, info )
220 CALL chk1mat( ms, 1, nv, 2, ic, jc, descc, 16, info )
224 mp = numroc( ms, desca( mb_ ), myrow, 0, nprow )
225 nq = numroc( nv, desca( nb_ ), mycol, 0, npcol )
229 ELSE IF( jq.NE.1 )
THEN
231 ELSE IF( ia.NE.1 )
THEN
233 ELSE IF( ja.NE.1 )
THEN
235 ELSE IF( ic.NE.1 )
THEN
237 ELSE IF( jc.NE.1 )
THEN
239 ELSE IF( lwork.LT.nq )
THEN
245 CALL pxerbla( desca( ctxt_ ),
'PZSEPCHK', -info )
251 CALL zlacpy(
'A', mp, nq, q, descq( lld_ ), c, descc( lld_ ) )
255 pcol = indxg2p( j, descc( nb_ ), 0, 0, npcol )
256 localcol = indxg2l( j, descc( nb_ ), 0, 0, npcol )
258 IF( mycol.EQ.pcol )
THEN
259 CALL zdscal( mp, w( j ), c( ( localcol-1 )*descc( lld_ )+
267 CALL pzgemm(
'N',
'N', ms, nv, ms, negone, a, 1, 1, desca, q, 1,
268 $ 1, descq, one, c, 1, 1, descc )
273 norm = pzlange(
'M', ms, nv, c, 1, 1, descc, work )
276 tstnrm = norm / epsnorma /
max( ms, 1 )
278 IF( tstnrm.GT.thresh .OR. ( tstnrm-tstnrm.NE.0.0d0 ) )
THEN