|
|
| |
| # lines: |
494 | | # code: |
494 | | # comment: | 0 | |
# blank: | 0 |
| # Variables: | 45 |
| # Callers: | 1 |
| # Callings: | 1 |
| # Words: | 191 |
| # Keywords: | 93 |
|
|
|
|
|
..
.. Array Arguments ..
..
Purpose
=======
PDLABRD reduces the first NB rows and columns of a real general
M-by-N distributed matrix sub( A ) = A(IA:IA+M-1,JA:JA+N-1) to upper
or lower bidiagonal form by an orthogonal transformation Q' * A * P,
and returns the matrices X and Y which are needed to apply the
transformation to the unreduced part of sub( A ).
If M >= N, sub( A ) is reduced to upper bidiagonal form; if M < N, to
lower bidiagonal form.
This is an auxiliary routine called by PDGEBRD.
Notes
=====
Each global data object is described by an associated description
vector. This vector stores the information required to establish
the mapping between an object element and its corresponding process
and memory location.
Let A be a generic term for any 2D block cyclicly distributed array.
Such a global array has an associated description vector DESCA.
In the following comments, the character _ should be read as
"of the global array".
NOTATION STORED IN EXPLANATION
--------------- -------------- --------------------------------------
DTYPE_A(global) DESCA( DTYPE_ )The descriptor type. In this case,
DTYPE_A = 1.
CTXT_A (global) DESCA( CTXT_ ) The BLACS context handle, indicating
the BLACS process grid A is distribu-
ted over. The context itself is glo-
bal, but the handle (the integer
value) may vary.
M_A (global) DESCA( M_ ) The number of rows in the global
array A.
N_A (global) DESCA( N_ ) The number of columns in the global
array A.
MB_A (global) DESCA( MB_ ) The blocking factor used to distribute
the rows of the array.
NB_A (global) DESCA( NB_ ) The blocking factor used to distribute
the columns of the array.
RSRC_A (global) DESCA( RSRC_ ) The process row over which the first
row of the array A is distributed.
CSRC_A (global) DESCA( CSRC_ ) The process column over which the
first column of the array A is
distributed.
LLD_A (local) DESCA( LLD_ ) The leading dimension of the local
array. LLD_A >= MAX(1,LOCr(M_A)).
Let K be the number of rows or columns of a distributed matrix,
and assume that its process grid has dimension p x q.
LOCr( K ) denotes the number of elements of K that a process
would receive if K were distributed over the p processes of its
process column.
Similarly, LOCc( K ) denotes the number of elements of K that a
process would receive if K were distributed over the q processes of
its process row.
The values of LOCr() and LOCc() may be determined via a call to the
ScaLAPACK tool function, NUMROC:
LOCr( M ) = NUMROC( M, MB_A, MYROW, RSRC_A, NPROW ),
LOCc( N ) = NUMROC( N, NB_A, MYCOL, CSRC_A, NPCOL ).
An upper bound for these quantities may be computed by:
LOCr( M ) <= ceil( ceil(M/MB_A)/NPROW )*MB_A
LOCc( N ) <= ceil( ceil(N/NB_A)/NPCOL )*NB_A
Arguments
=========
M (global input) INTEGER
The number of rows to be operated on, i.e. the number of rows
of the distributed submatrix sub( A ). M >= 0.
N (global input) INTEGER
The number of columns to be operated on, i.e. the number of
columns of the distributed submatrix sub( A ). N >= 0.
NB (global input) INTEGER
The number of leading rows and columns of sub( A ) to be
reduced.
A (local input/local output) DOUBLE PRECISION pointer into the
local memory to an array of dimension (LLD_A,LOCc(JA+N-1)).
On entry, this array contains the local pieces of the
general distributed matrix sub( A ) to be reduced. On exit,
the first NB rows and columns of the matrix are overwritten;
the rest of the distributed matrix sub( A ) is unchanged.
If m >= n, elements on and below the diagonal in the first NB
columns, with the array TAUQ, represent the orthogonal
matrix Q as a product of elementary reflectors; and
elements above the diagonal in the first NB rows, with the
array TAUP, represent the orthogonal matrix P as a product
of elementary reflectors.
If m < n, elements below the diagonal in the first NB
columns, with the array TAUQ, represent the orthogonal
matrix Q as a product of elementary reflectors, and
elements on and above the diagonal in the first NB rows,
with the array TAUP, represent the orthogonal matrix P as
a product of elementary reflectors.
See Further Details.
IA (global input) INTEGER
The row index in the global array A indicating the first
row of sub( A ).
JA (global input) INTEGER
The column index in the global array A indicating the
first column of sub( A ).
DESCA (global and local input) INTEGER array of dimension DLEN_.
The array descriptor for the distributed matrix A.
D (local output) DOUBLE PRECISION array, dimension
LOCr(IA+MIN(M,N)-1) if M >= N; LOCc(JA+MIN(M,N)-1) otherwise.
The distributed diagonal elements of the bidiagonal matrix
B: D(i) = A(ia+i-1,ja+i-1). D is tied to the distributed
matrix A.
E (local output) DOUBLE PRECISION array, dimension
LOCr(IA+MIN(M,N)-1) if M >= N; LOCc(JA+MIN(M,N)-2) otherwise.
The distributed off-diagonal elements of the bidiagonal
distributed matrix B:
if m >= n, E(i) = A(ia+i-1,ja+i) for i = 1,2,...,n-1;
if m < n, E(i) = A(ia+i,ja+i-1) for i = 1,2,...,m-1.
E is tied to the distributed matrix A.
TAUQ (local output) DOUBLE PRECISION array dimension
LOCc(JA+MIN(M,N)-1). The scalar factors of the elementary
reflectors which represent the orthogonal matrix Q. TAUQ
is tied to the distributed matrix A. See Further Details.
TAUP (local output) DOUBLE PRECISION array, dimension
LOCr(IA+MIN(M,N)-1). The scalar factors of the elementary
reflectors which represent the orthogonal matrix P. TAUP
is tied to the distributed matrix A. See Further Details.
X (local output) DOUBLE PRECISION pointer into the local memory
to an array of dimension (LLD_X,NB). On exit, the local
pieces of the distributed M-by-NB matrix
X(IX:IX+M-1,JX:JX+NB-1) required to update the unreduced
part of sub( A ).
IX (global input) INTEGER
The row index in the global array X indicating the first
row of sub( X ).
JX (global input) INTEGER
The column index in the global array X indicating the
first column of sub( X ).
DESCX (global and local input) INTEGER array of dimension DLEN_.
The array descriptor for the distributed matrix X.
Y (local output) DOUBLE PRECISION pointer into the local memory
to an array of dimension (LLD_Y,NB). On exit, the local
pieces of the distributed N-by-NB matrix
Y(IY:IY+N-1,JY:JY+NB-1) required to update the unreduced
part of sub( A ).
IY (global input) INTEGER
The row index in the global array Y indicating the first
row of sub( Y ).
JY (global input) INTEGER
The column index in the global array Y indicating the
first column of sub( Y ).
DESCY (global and local input) INTEGER array of dimension DLEN_.
The array descriptor for the distributed matrix Y.
WORK (local workspace) DOUBLE PRECISION array, dimension (LWORK)
LWORK >= NB_A + NQ, with
NQ = NUMROC( N+MOD( IA-1, NB_Y ), NB_Y, MYCOL, IACOL, NPCOL )
IACOL = INDXG2P( JA, NB_A, MYCOL, CSRC_A, NPCOL )
INDXG2P and NUMROC are ScaLAPACK tool functions;
MYROW, MYCOL, NPROW and NPCOL can be determined by calling
the subroutine BLACS_GRIDINFO.
Further Details
===============
The matrices Q and P are represented as products of elementary
reflectors:
Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb)
Each H(i) and G(i) has the form:
H(i) = I - tauq * v * v' and G(i) = I - taup * u * u'
where tauq and taup are real scalars, and v and u are real vectors.
If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
A(ia+i-1:ia+m-1,ja+i-1); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is
stored on exit in A(ia+i-1,ja+i:ja+n-1); tauq is stored in
TAUQ(ja+i-1) and taup in TAUP(ia+i-1).
If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
A(ia+i+1:ia+m-1,ja+i-1); u(1:i-1) = 0, u(i) = 1, and u(i:n) is
stored on exit in A(ia+i-1,ja+i:ja+n-1); tauq is stored in
TAUQ(ja+i-1) and taup in TAUP(ia+i-1).
The elements of the vectors v and u together form the m-by-nb matrix
V and the nb-by-n matrix U' which are needed, with X and Y, to apply
the transformation to the unreduced part of the matrix, using a block
update of the form: sub( A ) := sub( A ) - V*Y' - X*U'.
The contents of sub( A ) on exit are illustrated by the following
examples with nb = 2:
m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 )
( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 )
( v1 v2 a a a ) ( v1 1 a a a a )
( v1 v2 a a a ) ( v1 v2 a a a a )
( v1 v2 a a a ) ( v1 v2 a a a a )
( v1 v2 a a a )
where a denotes an element of the original matrix which is unchanged,
vi denotes an element of the vector defining H(i), and ui an element
of the vector defining G(i).
=====================================================================
.. Parameters ..
|
|
|
|
001 SUBROUTINE PDLABRD( M , N , NB , A , IA , JA , DESCA , D , E , TAUQ , TAUP ,
002 $X , IX , JX , DESCX , Y , IY , JY , DESCY , WORK )
003
004 * -- ScaLAPACK auxiliary routine(version 1.7) --
005 * University of Tennessee , Knoxville , Oak Ridge National Laboratory ,
006 * and University of California , Berkeley.
007 * May 1 , 1997
008
009 * .. Scalar Arguments ..
010 INTEGER IA , IX , IY , JA , JX , JY , M , N , NB
011 INTEGER BLOCK_CYCLIC_2D , CSRC_ , CTXT_ , DLEN_ , DTYPE_ ,
012 $LLD_ , MB_ , M_ , NB_ , N_ , RSRC_
013 PARAMETER( BLOCK_CYCLIC_2D = 1 , DLEN_ = 9 , DTYPE_ = 1 ,
014 $CTXT_ = 2 , M_ = 3 , N_ = 4 , MB_ = 5 , NB_ = 6 ,
015 $RSRC_ = 7 , CSRC_ = 8 , LLD_ = 9 )
016 DOUBLE PRECISION ONE , ZERO
017 PARAMETER( ONE = 1.0D + 0 , ZERO = 0.0D + 0 )
018 * ..
019 * .. Local Scalars ..
020 INTEGER I , IACOL , IAROW , ICTXT , II , IPY , IW , J , JJ ,
021 $JWY , K , MYCOL , MYROW , NPCOL , NPROW
022 DOUBLE PRECISION ALPHA , TAU
023 INTEGER DESCD( DLEN_ ) , DESCE( DLEN_ ) ,
024 $DESCTP( DLEN_ ) , DESCTQ( DLEN_ ) ,
025 $DESCW( DLEN_ ) , DESCWY( DLEN_ )
026 * ..
027 * .. External Subroutines ..
028 EXTERNAL BLACS_GRIDINFO , DESCSET , INFOG2L , PDCOPY ,
029 $PDELGET , PDELSET , PDGEMV , PDLARFG ,
030 $PDSCAL
031 * ..
032 * .. Intrinsic Functions ..
033 INTRINSIC MIN , MOD
034 * ..
035 * .. Executable Statements ..
036
037 * Quick return if possible
038
039 IF( M.LE.0 .OR. N.LE.0 )
039
040 $ RETURN
041
042 ICTXT = DESCA( CTXT_ )
043 CALL BLACS_GRIDINFO( ICTXT , NPROW , NPCOL , MYROW , MYCOL )
044 CALL INFOG2L( IA , JA , DESCA , NPROW , NPCOL , MYROW , MYCOL , II , JJ ,
045 $ IAROW , IACOL )
046 IPY = DESCA( MB_ ) + 1
047 IW = MOD( IA - 1 , DESCA( NB_ ) ) + 1
048 ALPHA = ZERO
049
050 CALL DESCSET( DESCWY , 1 , N + MOD( IA - 1 , DESCY( NB_ ) ) , 1 ,
051 $ DESCA( NB_ ) , IAROW , IACOL , ICTXT , 1 )
052 CALL DESCSET( DESCW , DESCA( MB_ ) , 1 , DESCA( MB_ ) , 1 , IAROW ,
053 $ IACOL , ICTXT , DESCA( MB_ ) )
054 CALL DESCSET( DESCTQ , 1 , JA + MIN(M , N) - 1 , 1 , DESCA( NB_ ) , IAROW ,
055 $ DESCA( CSRC_ ) , DESCA( CTXT_ ) , 1 )
056 CALL DESCSET( DESCTP , IA + MIN(M , N) - 1 , 1 , DESCA( MB_ ) , 1 ,
057 $ DESCA( RSRC_ ) , IACOL , DESCA( CTXT_ ) ,
058 $ DESCA( LLD_ ) )
059
060 IF( M.GE.N ) THEN
061
062 * Reduce to upper bidiagonal form
063
063
064 CALL DESCSET( DESCD , 1 , JA + MIN(M , N) - 1 , 1 , DESCA( NB_ ) , MYROW ,
065 $ DESCA( CSRC_ ) , DESCA( CTXT_ ) , 1 )
066 CALL DESCSET( DESCE , IA + MIN(M , N) - 1 , 1 , DESCA( MB_ ) , 1 ,
067 $ DESCA( RSRC_ ) , MYCOL , DESCA( CTXT_ ) ,
068 $ DESCA( LLD_ ) )
069 DO 10 K = 1 , NB
069
070 I = IA + K - 1
071 J = JA + K - 1
072 JWY = IW + K
073
074 * Update A(i : ia + m - 1 , j)
075
076 IF( K.GT.1 ) THEN
076
077 CALL PDGEMV( 'No transpose' , M - K + 1 , K - 1 , - ONE , A , I , JA ,
078 $ DESCA , Y , IY , JY + K - 1 , DESCY , 1 , ONE , A , I ,
079 $ J , DESCA , 1 )
080 CALL PDGEMV( 'No transpose' , M - K + 1 , K - 1 , - ONE , X , IX + K - 1 ,
081 $ JX , DESCX , A , IA , J , DESCA , 1 , ONE , A , I , J ,
082 $ DESCA , 1 )
083 CALL PDELSET( A , I - 1 , J , DESCA , ALPHA )
084 END IF
085
086 * Generate reflection Q(i) to annihilate A(i + 1 : ia + m - 1 , j)
087
088 CALL PDLARFG ( M - K + 1 , ALPHA , I , J , A , I + 1 , J , DESCA , 1 ,
089 $ TAUQ )
090 CALL PDELSET( D , 1 , J , DESCD , ALPHA )
091 CALL PDELSET( A , I , J , DESCA , ONE )
092
093 * Compute Y(IA + I : IA + N - 1 , J)
094
095 CALL PDGEMV( 'Transpose' , M - K + 1 , N - K , ONE , A , I , J + 1 , DESCA ,
096 $ A , I , J , DESCA , 1 , ZERO , WORK( IPY ) , 1 , JWY ,
097 $ DESCWY , DESCWY( M_ ) )
098 CALL PDGEMV( 'Transpose' , M - K + 1 , K - 1 , ONE , A , I , JA , DESCA ,
099 $ A , I , J , DESCA , 1 , ZERO , WORK , IW , 1 , DESCW ,
100 $ 1 )
101 CALL PDGEMV( 'Transpose' , K - 1 , N - K , - ONE , Y , IY , JY + K ,
102 $ DESCY , WORK , IW , 1 , DESCW , 1 , ONE , WORK( IPY ) ,
103 $ 1 , JWY , DESCWY , DESCWY( M_ ) )
104 CALL PDGEMV( 'Transpose' , M - K + 1 , K - 1 , ONE , X , IX + K - 1 , JX ,
105 $ DESCX , A , I , J , DESCA , 1 , ZERO , WORK , IW , 1 ,
106 $ DESCW , 1 )
107 CALL PDGEMV( 'Transpose' , K - 1 , N - K , - ONE , A , IA , J + 1 , DESCA ,
108 $ WORK , IW , 1 , DESCW , 1 , ONE , WORK( IPY ) , 1 ,
109 $ JWY , DESCWY , DESCWY( M_ ) )
110
111 CALL PDELGET( 'Rowwise' , ' ' , TAU , TAUQ , 1 , J , DESCTQ )
112 CALL PDSCAL( N - K , TAU , WORK( IPY ) , 1 , JWY , DESCWY ,
113 $ DESCWY( M_ ) )
114 CALL PDCOPY( N - K , WORK( IPY ) , 1 , JWY , DESCWY , DESCWY( M_ ) ,
115 $ Y , IY + K - 1 , JY + K , DESCY , DESCY( M_ ) )
116
117 * Update A(i , j + 1 : ja + n - 1)
118
119 CALL PDGEMV( 'Transpose' , K , N - K , - ONE , Y , IY , JY + K , DESCY ,
120 $ A , I , JA , DESCA , DESCA( M_ ) , ONE , A , I , J + 1 ,
121 $ DESCA , DESCA( M_ ) )
122 CALL PDGEMV( 'Transpose' , K - 1 , N - K , - ONE , A , IA , J + 1 , DESCA ,
123 $ X , IX + K - 1 , JX , DESCX , DESCX( M_ ) , ONE , A , I ,
124 $ J + 1 , DESCA , DESCA( M_ ) )
125 CALL PDELSET( A , I , J , DESCA , ALPHA )
126
127 * Generate reflection P(i) to annihilate A(i , j + 2 : ja + n - 1)
128
129 CALL PDLARFG ( N - K , ALPHA , I , J + 1 , A , I ,
130 $ MIN( J + 2 , N + JA - 1 ) , DESCA , DESCA( M_ ) , TAUP )
131 CALL PDELSET( E , I , 1 , DESCE , ALPHA )
132 CALL PDELSET( A , I , J + 1 , DESCA , ONE )
133
134 * Compute X(I + 1 : IA + M - 1 , J)
135
136 CALL PDGEMV( 'No transpose' , M - K , N - K , ONE , A , I + 1 , J + 1 ,
137 $ DESCA , A , I , J + 1 , DESCA , DESCA( M_ ) , ZERO , X ,
138 $ IX + K , JX + K - 1 , DESCX , 1 )
139 CALL PDGEMV( 'No transpose' , K , N - K , ONE , Y , IY , JY + K ,
140 $ DESCY , A , I , J + 1 , DESCA , DESCA( M_ ) , ZERO ,
141 $ WORK , IW , 1 , DESCW , 1 )
142 CALL PDGEMV( 'No transpose' , M - K , K , - ONE , A , I + 1 , JA ,
143 $ DESCA , WORK , IW , 1 , DESCW , 1 , ONE , X , IX + K ,
144 $ JX + K - 1 , DESCX , 1 )
145 CALL PDGEMV( 'No transpose' , K - 1 , N - K , ONE , A , IA , J + 1 ,
146 $ DESCA , A , I , J + 1 , DESCA , DESCA( M_ ) , ZERO ,
147 $ WORK , IW , 1 , DESCW , 1 )
148 CALL PDGEMV( 'No transpose' , M - K , K - 1 , - ONE , X , IX + K , JX ,
149 $ DESCX , WORK , IW , 1 , DESCW , 1 , ONE , X , IX + K ,
150 $ JX + K - 1 , DESCX , 1 )
151
152 CALL PDELGET( 'Columnwise' , ' ' , TAU , TAUP , I , 1 , DESCTP )
153 CALL PDSCAL( M - K , TAU , X , IX + K , JX + K - 1 , DESCX , 1 )
154 10 CONTINUE
155
155
156 ELSE
157
158 * Reduce to lower bidiagonal form
159
159
160 CALL DESCSET( DESCD , IA + MIN(M , N) - 1 , 1 , DESCA( MB_ ) , 1 ,
161 $ DESCA( RSRC_ ) , MYCOL , DESCA( CTXT_ ) ,
162 $ DESCA( LLD_ ) )
163 CALL DESCSET( DESCE , 1 , JA + MIN(M , N) - 1 , 1 , DESCA( NB_ ) , MYROW ,
164 $ DESCA( CSRC_ ) , DESCA( CTXT_ ) , 1 )
165 DO 20 K = 1 , NB
165
166 I = IA + K - 1
167 J = JA + K - 1
168 JWY = IW + K
169
170 * Update A(i , j : ja + n - 1)
171
172 IF( K.GT.1 ) THEN
172
173 CALL PDGEMV( 'Transpose' , K - 1 , N - K + 1 , - ONE , Y , IY ,
174 $ JY + K - 1 , DESCY , A , I , JA , DESCA , DESCA( M_ ) ,
175 $ ONE , A , I , J , DESCA , DESCA( M_ ) )
176 CALL PDGEMV( 'Transpose' , K - 1 , N - K + 1 , - ONE , A , IA , J ,
177 $ DESCA , X , IX + K - 1 , JX , DESCX , DESCX( M_ ) ,
178 $ ONE , A , I , J , DESCA , DESCA( M_ ) )
179 CALL PDELSET( A , I , J - 1 , DESCA , ALPHA )
180 END IF
181
182 * Generate reflection P(i) to annihilate A(i , j + 1 : ja + n - 1)
183
184 CALL PDLARFG ( N - K + 1 , ALPHA , I , J , A , I , J + 1 , DESCA ,
185 $ DESCA( M_ ) , TAUP )
186 CALL PDELSET( D , I , 1 , DESCD , ALPHA )
187 CALL PDELSET( A , I , J , DESCA , ONE )
188
189 * Compute X(i + 1 : ia + m - 1 , j)
190
191 CALL PDGEMV( 'No transpose' , M - K , N - K + 1 , ONE , A , I + 1 , J ,
192 $ DESCA , A , I , J , DESCA , DESCA( M_ ) , ZERO , X ,
193 $ IX + K , JX + K - 1 , DESCX , 1 )
194 CALL PDGEMV( 'No transpose' , K - 1 , N - K + 1 , ONE , Y , IY , JY + K - 1 ,
195 $ DESCY , A , I , J , DESCA , DESCA( M_ ) , ZERO ,
196 $ WORK , IW , 1 , DESCW , 1 )
197 CALL PDGEMV( 'No transpose' , M - K , K - 1 , - ONE , A , I + 1 , JA ,
198 $ DESCA , WORK , IW , 1 , DESCW , 1 , ONE , X , IX + K ,
199 $ JX + K - 1 , DESCX , 1 )
200 CALL PDGEMV( 'No transpose' , K - 1 , N - K + 1 , ONE , A , IA , J ,
201 $ DESCA , A , I , J , DESCA , DESCA( M_ ) , ZERO ,
202 $ WORK , IW , 1 , DESCW , 1 )
203 CALL PDGEMV( 'No transpose' , M - K , K - 1 , - ONE , X , IX + K , JX ,
204 $ DESCX , WORK , IW , 1 , DESCW , 1 , ONE , X , IX + K ,
205 $ JX + K - 1 , DESCX , 1 )
206
207 CALL PDELGET( 'Columnwise' , ' ' , TAU , TAUP , I , 1 , DESCTP )
208 CALL PDSCAL( M - K , TAU , X , IX + K , JX + K - 1 , DESCX , 1 )
209
210 * Update A(i + 1 : ia + m - 1 , j)
211
212 CALL PDGEMV( 'No transpose' , M - K , K - 1 , - ONE , A , I + 1 , JA ,
213 $ DESCA , Y , IY , JY + K - 1 , DESCY , 1 , ONE , A , I + 1 , J ,
214 $ DESCA , 1 )
215 CALL PDGEMV( 'No transpose' , M - K , K , - ONE , X , IX + K , JX ,
216 $ DESCX , A , IA , J , DESCA , 1 , ONE , A , I + 1 , J ,
217 $ DESCA , 1 )
218 CALL PDELSET( A , I , J , DESCA , ALPHA )
219
220 * Generate reflection Q(i) to annihilate A(i + 2 : ia + m - 1 , j)
221
222 CALL PDLARFG ( M - K , ALPHA , I + 1 , J , A , MIN( I + 2 , M + IA - 1 ) ,
223 $ J , DESCA , 1 , TAUQ )
224 CALL PDELSET( E , 1 , J , DESCE , ALPHA )
225 CALL PDELSET( A , I + 1 , J , DESCA , ONE )
226
227 * Compute Y(ia + i : ia + n - 1 , j)
228
229 CALL PDGEMV( 'Transpose' , M - K , N - K , ONE , A , I + 1 , J + 1 , DESCA ,
230 $ A , I + 1 , J , DESCA , 1 , ZERO , WORK( IPY ) , 1 ,
231 $ JWY , DESCWY , DESCWY( M_ ) )
232 CALL PDGEMV( 'Transpose' , M - K , K - 1 , ONE , A , I + 1 , JA , DESCA ,
233 $ A , I + 1 , J , DESCA , 1 , ZERO , WORK , IW , 1 , DESCW ,
234 $ 1 )
235 CALL PDGEMV( 'Transpose' , K - 1 , N - K , - ONE , Y , IY , JY + K ,
236 $ DESCY , WORK , IW , 1 , DESCW , 1 , ONE , WORK( IPY ) ,
237 $ 1 , JWY , DESCWY , DESCWY( M_ ) )
238 CALL PDGEMV( 'Transpose' , M - K , K , ONE , X , IX + K , JX , DESCX ,
239 $ A , I + 1 , J , DESCA , 1 , ZERO , WORK , IW , 1 , DESCW ,
240 $ 1 )
241 CALL PDGEMV( 'Transpose' , K , N - K , - ONE , A , IA , J + 1 , DESCA ,
242 $ WORK , IW , 1 , DESCW , 1 , ONE , WORK( IPY ) , 1 ,
243 $ JWY , DESCWY , DESCWY( M_ ) )
244
245 CALL PDELGET( 'Rowwise' , ' ' , TAU , TAUQ , 1 , J , DESCTQ )
246 CALL PDSCAL( N - K , TAU , WORK( IPY ) , 1 , JWY , DESCWY ,
247 $ DESCWY( M_ ) )
248 CALL PDCOPY( N - K , WORK( IPY ) , 1 , JWY , DESCWY , DESCWY( M_ ) ,
249 $ Y , IY + K - 1 , JY + K , DESCY , DESCY( M_ ) )
250 20 CONTINUE
250
251 END IF
252
253 RETURN
254
255 * End of PDLABRD
256
257 END43
9
|
|
Variables in Routine PDLABRD()
| Summary Report |
| Data Type | Quantity | Size(byte) |
| DOUBLE PRECISION | 4 | 16 |
| INTEGER | 41 | 164 |
| TOTAL | 45 | 180 |
List of Variables
DOUBLE PRECISION
INTEGER
| BLOCK_CYCLIC_2D | CSRC_ | CTXT_ | DESCD( DLEN_ ) | DESCE( DLEN_ ) |
| DESCTP( DLEN_ ) | DESCTQ( DLEN_ ) | DESCW( DLEN_ ) | DESCWY( DLEN_ ) | DLEN_ |
| DTYPE_ | I | IA | IACOL | IAROW |
| ICTXT | II | IPY | IW | IX |
| IY | J | JA | JJ | JWY |
| JX | JY | K | LLD_ | M |
| M_ | MB_ | MYCOL | MYROW | N |
| N_ | NB | NB_ | NPCOL | NPROW |
| RSRC_ | | | | |
Variables Dependence Graph Put the mouse over a right hand side variable to display the corresponding line of the dependence | | - | | - | - | | ALPHA | <--- | ZEROALPHA = ZERO |
| I | <--- | IAI = IA + K - 1{2I = IA + K - 1}, KI = IA + K - 1{2I = IA + K - 1} |
| ICTXT | <--- | CTXT_ICTXT = DESCA( CTXT_ ) |
| IPY | <--- | MB_IPY = DESCA( MB_ ) + 1 |
| IW | <--- | IAIW = MOD( IA-1, DESCA( NB_ ) ) + 1, NB_IW = MOD( IA-1, DESCA( NB_ ) ) + 1 |
| J | <--- | JAJ = JA + K - 1{2J = JA + K - 1}, KJ = JA + K - 1{2J = JA + K - 1} |
| JWY | <--- | IWJWY = IW + K{2JWY = IW + K}, KJWY = IW + K{2JWY = IW + K} |
| K | <--- | NBDO 20 K = 1, NB{2DO 10 K = 1, NB} |
|
|
Analysis elements of the routine PDLABRD() Put the mouse over each element to display detailed matching information
Assigned variables |
| | | ALPHA , BLOCK_CYCLIC_2D , CSRC_ , CTXT_ , DLEN_ , DTYPE_ , I , ICTXT , IPY , IW , J , JWY , K , LLD_ , M_ , MB_ , N_ , NB_ , ONE , RSRC_ , ZERO |
|
Active variables |
| | | A , ALPHA , BLOCK_CYCLIC_2D , CSRC_ , CTXT_ , D , DESCA , DESCD , DESCE , DESCTP , DESCTQ , DESCW , DESCWY , DESCX , DESCY , DLEN_ , DTYPE_ , E , I , IA , IACOL , IAROW , ICTXT , II , IPY , IW , IX , IY , J , JA , JJ , JWY , JX , JY , K , LLD_ , M , M_ , MB_ , MYCOL , MYROW , N , N_ , NB , NB_ , NPCOL , NPROW , ONE , RSRC_ , TAU , TAUP , TAUQ , WORK , X , Y , ZERO |
|
Accessed arrays [ array name : associated index ] |
| | A | : i,j:ja+n-1 , i,j+1:ja+n-1 , i,j+1:ja+n-1 , i,j+2:ja+n-1 , i:ia+m-1,j , i+1:ia+m-1,j , i+1:ia+m-1,j , i+2:ia+m-1,j |
| | DESCA | : CSRC_ , CSRC_ , CSRC_ , CTXT_ , CTXT_ , CTXT_ , CTXT_ , CTXT_ , CTXT_ , CTXT_ , LLD_ , LLD_ , LLD_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , MB_ , MB_ , MB_ , MB_ , MB_ , MB_ , NB_ , NB_ , NB_ , NB_ , NB_ , RSRC_ , RSRC_ , RSRC_ |
| | DESCD | : DLEN_ |
| | DESCE | : DLEN_ |
| | DESCTP | : DLEN_ |
| | DESCTQ | : DLEN_ |
| | DESCW | : DLEN_ |
| | DESCWY | : DLEN_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ , M_ |
| | DESCX | : M_ , M_ |
| | DESCY | : M_ , M_ , NB_ |
| | WORK | : IPY , IPY , IPY , IPY , IPY , IPY , IPY , IPY , IPY , IPY |
| | X | : I+1:IA+M-1,J , i+1:ia+m-1,j |
| | Y | : ia+i:ia+n-1,j , IA+I:IA+N-1,J |
|
Conditional statements [ statement : associated predicate ] |
| | do | : ( 10 K = 1 , NB ) , ( 20 K = 1 , NB ) |
| | if | : ( possible ) , ( M.LE.0 .OR. N.LE.0 ) , ( M.GE.N ) , ( K.GT.1 ) , ( K.GT.1 ) |
|
| List of variables | ALPHA BLOCK_CYCLIC_2D CSRC_ CTXT_ DESCD( DLEN_ ) DESCE( DLEN_ ) DESCTP( DLEN_ )
| DESCTQ( DLEN_ ) DESCW( DLEN_ ) DESCWY( DLEN_ ) DLEN_ DTYPE_ I IA IACOL
| IAROW ICTXT II IPY IW IX IY J
| JA JJ JWY JX JY K LLD_ M
| M_ MB_ MYCOL MYROW N N_ NB NB_
| NPCOL NPROW ONE RSRC_ TAU ZERO | | close
| |
ALPHA
BLOCK_CYCLIC_2D
CSRC_
CTXT_
DESCD( DLEN_ )
DESCE( DLEN_ )
DESCTP( DLEN_ )
DESCTQ( DLEN_ )
DESCW( DLEN_ )
DESCWY( DLEN_ )
DLEN_
DTYPE_
I
IA
IACOL
IAROW
ICTXT
II
IPY
IW
IX
IY
J
JA
JJ
JWY
JX
JY
K
LLD_
M
M_
MB_
MYCOL
MYROW
N
N_
NB
NB_
NPCOL
NPROW
ONE
RSRC_
TAU
ZERO
234
| |