1 SUBROUTINE pzgbsv( N, BWL, BWU, NRHS, A, JA, DESCA, IPIV, B, IB,
2 $ DESCB, WORK, LWORK, INFO )
12 INTEGER BWL, BWU, IB, INFO, JA, LWORK, N, NRHS
15 INTEGER DESCA( * ), DESCB( * ), IPIV( * )
16 COMPLEX*16 A( * ), B( * ), WORK( * )
370 DOUBLE PRECISION ONE, ZERO
371 parameter( one = 1.0d+0 )
372 parameter( zero = 0.0d+0 )
373 COMPLEX*16 CONE, CZERO
374 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
375 parameter( czero = ( 0.0d+0, 0.0d+0 ) )
377 parameter( int_one = 1 )
378 INTEGER DESCMULT, BIGNUM
379 parameter(descmult = 100, bignum = descmult * descmult)
380 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
381 $ lld_, mb_, m_, nb_, n_, rsrc_
382 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
383 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
384 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
387 INTEGER ICTXT, MYCOL, MYROW, NB, NPCOL, NPROW,
405 IF( desca( dtype_ ) .EQ. block_cyclic_2d )
THEN
407 ictxt = desca( ctxt_ )
408 ELSEIF( desca( dtype_ ) .EQ. 501 )
THEN
412 info = -( 6*100 + dtype_ )
419 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
424 ws_factor = (nb+bwu)*(bwl+bwu)+6*(bwl+bwu)*(bwl+2*bwu)
428 CALL pzgbtrf( n, bwl, bwu, a, ja, desca, ipiv, work,
429 $
min( lwork, ws_factor ), work( 1+ws_factor ),
430 $ lwork-ws_factor, info )
435 IF( info .LT. 0 )
THEN
436 CALL pxerbla( ictxt,
'PZGBSV', -info )
443 CALL pzgbtrs(
'N', n, bwl, bwu, nrhs, a, ja, desca, ipiv, b, ib,
444 $ descb, work,
min( lwork, ws_factor ),
445 $ work( 1+ws_factor), lwork-ws_factor, info )
450 CALL pxerbla( ictxt,
'PZGBSV', -info )