1 SUBROUTINE pslasizesepr( DESCA, IPREPAD, IPOSTPAD, SIZEMQRLEFT,
2 $ SIZEMQRRIGHT, SIZEQRF, SIZETMS, SIZEQTQ,
3 $ SIZECHK, SIZESYEVR, ISIZESYEVR,
4 $ SIZESUBTST, ISIZESUBTST, SIZETST,
15 INTEGER IPOSTPAD, IPREPAD, ISIZESUBTST, ISIZESYEVR,
16 $ isizetst, sizechk, sizemqrleft, sizemqrright,
17 $ sizeqrf, sizeqtq, sizesubtst, sizesyevr,
62 $ MB_, NB_, RSRC_, CSRC_, LLD_
64 $ CTXT_ = 2, m_ = 3, 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
77 EXTERNAL blacs_gridinfo
86 rsrc_a = desca( rsrc_ )
87 csrc_a = desca( csrc_ )
90 CALL blacs_gridinfo( desca( ctxt_ ), nprow, npcol, myrow, mycol )
92 lcm = ilcm( nprow, npcol )
96 iarow = indxg2p( 1, nb, myrow, rsrc_a, nprow )
97 iacol = indxg2p( 1, nb, mycol, csrc_a, npcol )
98 np = numroc( n+iroffa, nb, myrow, iarow, nprow )
99 nq = numroc( n+icoffa, nb, mycol, iacol, npcol )
100 sizemqrleft =
max( ( nb*( nb-1 ) ) / 2, ( np+nq )*nb ) + nb*nb
101 sizemqrright =
max( ( nb*( nb-1 ) ) / 2,
102 $ ( nq+
max( np+numroc( numroc( n+icoffa, nb, 0, 0,
103 $ npcol ), nb, 0, 0, lcmq ), np ) )*nb ) + nb*nb
104 sizeqrf = nb*np + nb*nq + nb*nb
105 sizetms = ( lda+1 )*
max( 1, nq ) +
106 $
max( sizemqrleft, sizemqrright, sizeqrf )
108 np0 = numroc( n, desca( mb_ ), 0, 0, nprow )
109 mq0 = numroc( n, desca( nb_ ), 0, 0, npcol )
110 sizeqtq = 2 +
max( desca( mb_ ), 2 )*( 2*np0+mq0 )
111 sizechk = numroc( n, desca( nb_ ), mycol, 0, npcol )
114 nn =
max( n, nb, 2 ) + 1
115 np0 = numroc( nn, nb, 0, 0, nprow )
116 mq0 = numroc(
max( neig, nb, 2 ), nb, 0, 0, npcol )
117 nnp =
max( n, nprow*npcol+1, 4 )
120 sizesyevr = 1 + 5*n +
max( 18*nn, np0*mq0+2*nb*nb ) +
121 $ (2 + iceil( neig, nprow*npcol ))*nn
122 sizesyevr =
max(3, sizesyevr)
124 isizesyevr = 12*nnp + 2*n
126 sizesubtst =
max( sizetms, sizeqtq, sizechk, sizesyevr ) +
128 isizesubtst = isizesyevr + iprepad + ipostpad
132 sizetst = 3*( lda*np+iprepad+ipostpad ) +
133 $ 4*( n+iprepad+ipostpad ) + sizesubtst
138 isizetst = n + 2*nprow*npcol + 2*( iprepad+ipostpad ) +