3 SUBROUTINE pssepchk( 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 REAL EPSNORMA, THRESH, TSTNRM
17 INTEGER DESCA( * ), DESCC( * ), DESCQ( * )
18 REAL A( * ), C( * ), Q( * ), W( * ), WORK( * )
182 INTEGER INFO, J, LOCALCOL, MP, MYCOL, MYROW, NPCOL,
187 INTEGER BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
188 $ MB_, NB_, RSRC_, CSRC_, LLD_
189 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
190 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
191 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
193 PARAMETER ( ONE = 1.0e+0, negone = -1.0e+0 )
196 INTEGER INDXG2L, INDXG2P, NUMROC
198 EXTERNAL indxg2l, indxg2p, numroc, pslange
209 IF( block_cyclic_2d*csrc_*ctxt_*dlen_*dtype_*lld_*mb_*m_*nb_*n_*
214 CALL blacs_gridinfo( desca( ctxt_ ), nprow, npcol, myrow, mycol )
217 CALL chk1mat( ms, 1, ms, 1, ia, ja, desca, 6, info )
218 CALL chk1mat( ms, 1, nv, 2, iq, jq, descq, 12, info )
219 CALL chk1mat( ms, 1, nv, 2, ic, jc, descc, 16, info )
223 mp = numroc( ms, desca( mb_ ), myrow, 0, nprow )
224 nq = numroc( nv, desca( nb_ ), mycol, 0, npcol )
228 ELSE IF( jq.NE.1 )
THEN
230 ELSE IF( ia.NE.1 )
THEN
232 ELSE IF( ja.NE.1 )
THEN
234 ELSE IF( ic.NE.1 )
THEN
236 ELSE IF( jc.NE.1 )
THEN
238 ELSE IF( lwork.LT.nq )
THEN
244 CALL pxerbla( desca( ctxt_ ),
'PSSEPCHK', -info )
250 CALL slacpy(
'A', mp, nq, q, descq( lld_ ), c, descc( lld_ ) )
254 pcol = indxg2p( j, descc( nb_ ), 0, 0, npcol )
255 localcol = indxg2l( j, descc( nb_ ), 0, 0, npcol )
257 IF( mycol.EQ.pcol )
THEN
258 CALL sscal( mp, w( j ), c( ( localcol-1 )*descc( lld_ )+1 ),
266 CALL psgemm(
'N',
'N', ms, nv, ms, negone, a, 1, 1, desca, q, 1,
267 $ 1, descq, one, c, 1, 1, descc )
272 norm = pslange(
'M', ms, nv, c, 1, 1, descc, work )
275 tstnrm = norm / epsnorma /
max( ms, 1 )
277 IF( tstnrm.GT.thresh .OR. ( tstnrm-tstnrm.NE.0.0e0 ) )
THEN