3 SUBROUTINE pdlasizegsep( DESCA, IPREPAD, IPOSTPAD, SIZEMQRLEFT,
4 $ SIZEMQRRIGHT, SIZEQRF, SIZETMS, SIZEQTQ,
5 $ SIZECHK, SIZESYEVX, ISIZESYEVX,
6 $ SIZESUBTST, ISIZESUBTST, SIZETST,
15 INTEGER IPOSTPAD, IPREPAD, ISIZESUBTST, ISIZESYEVX,
16 $ ISIZETST, SIZECHK, SIZEMQRLEFT, SIZEMQRRIGHT,
17 $ SIZEQRF, SIZEQTQ, SIZESUBTST, SIZESYEVX,
61 INTEGER BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
62 $ MB_, NB_, RSRC_, CSRC_, LLD_
63 PARAMETER ( BLOCK_CYCLIC_2D = 1, dlen_ = 9, dtype_ = 1,
64 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
65 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
68 INTEGER CSRC_A, IACOL, IAROW, ICOFFA, IROFFA, LCM,
69 $ LCMQ, LDA, MQ0, MYCOL, MYROW, N, NB, NEIG, NN,
70 $ NNP, NP, NP0, NPCOL, NPROW, NQ, RSRC_A
73 INTEGER ICEIL, ILCM, INDXG2P, NUMROC
74 EXTERNAL ICEIL, ILCM, INDXG2P, NUMROC
79 EXTERNAL blacs_gridinfo
85 IF( block_cyclic_2d*csrc_*ctxt_*dlen_*dtype_*lld_*mb_*m_*nb_*n_*
90 rsrc_a = desca( rsrc_ )
91 csrc_a = desca( csrc_ )
94 CALL blacs_gridinfo( desca( ctxt_ ), nprow, npcol, myrow, mycol )
96 lcm = ilcm( nprow, npcol )
100 iarow = indxg2p( 1, nb, myrow, rsrc_a, nprow )
101 iacol = indxg2p( 1, nb, mycol, csrc_a, npcol )
102 np = numroc( n+iroffa, nb, myrow, iarow, nprow )
103 nq = numroc( n+icoffa, nb, mycol, iacol, npcol )
104 sizemqrleft =
max( ( nb*( nb-1 ) ) / 2, ( np+nq )*nb ) + nb*nb
105 sizemqrright =
max( ( nb*( nb-1 ) ) / 2,
106 $ ( nq+
max( np+numroc( numroc( n+icoffa, nb, 0, 0,
107 $ npcol ), nb, 0, 0, lcmq ), np ) )*nb ) + nb*nb
108 sizeqrf = nb*np + nb*nq + nb*nb
109 sizetms = ( lda+1 )*
max( 1, nq ) +
110 $
max( sizemqrleft, sizemqrright, sizeqrf )
112 np0 = numroc( n, desca( mb_ ), 0, 0, nprow )
113 mq0 = numroc( n, desca( nb_ ), 0, 0, npcol )
115 sizechk = numroc( n, desca( nb_ ), mycol, 0, npcol )
119 np0 = numroc( nn, nb, 0, 0, nprow )
120 mq0 = numroc(
max( neig, nb, 2 ), nb, 0, 0, npcol )
121 sizesyevx = 5*n +
max( 5*nn, np0*mq0+2*nb*nb ) +
122 $ iceil( neig, nprow*npcol )*nn
123 nnp =
max( n, nprow*npcol+1, 4 )
126 sizesubtst =
max( sizetms, sizeqtq, sizechk, sizesyevx ) +
128 isizesubtst = isizesyevx + iprepad + ipostpad
133 sizetst = 5*( lda*np+iprepad+ipostpad ) +
134 $ 4*( n+iprepad+ipostpad ) + sizesubtst
138 isizetst = n + 2*nprow*npcol + 2*( iprepad+ipostpad ) +