|
|
| |
| # lines: |
188 | | # code: |
188 | | # comment: | 0 | |
# blank: | 0 |
| # Variables: | 33 |
| # Callers: | 11 |
| # Callings: | 0 |
| # Words: | 58 |
| # Keywords: | 35 |
|
|
|
|
|
..
.. Array Arguments ..
..
Purpose
=======
PCLACGV conjugates a complex vector of length N, sub( X ), where
sub( X ) denotes X(IX,JX:JX+N-1) if INCX = DESCX( M_ ) and
X(IX:IX+N-1,JX) if INCX = 1, and
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
Because vectors may be viewed as a subclass of matrices, a
distributed vector is considered to be a distributed matrix.
Arguments
=========
N (global input) INTEGER
The length of the distributed vector sub( X ).
X (local input/local output) COMPLEX pointer into the
local memory to an array of dimension (LLD_X,*).
On entry the vector to be conjugated
x( i ) = X(IX+(JX-1)*M_X +(i-1)*INCX ), 1 <= i <= N.
On exit the conjugated vector.
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.
INCX (global input) INTEGER
The global increment for the elements of X. Only two values
of INCX are supported in this version, namely 1 and M_X.
INCX must not be zero.
=====================================================================
.. Parameters ..
|
|
|
|
01 SUBROUTINE PCLACGV( N , X , IX , JX , DESCX , INCX )
02
03 * -- ScaLAPACK auxiliary routine(version 1.7) --
04 * University of Tennessee , Knoxville , Oak Ridge National Laboratory ,
05 * and University of California , Berkeley.
06 * May 1 , 1997
07
08 * .. Scalar Arguments ..
09 INTEGER INCX , IX , JX , N
10 INTEGER BLOCK_CYCLIC_2D , CSRC_ , CTXT_ , DLEN_ , DTYPE_ ,
11 $LLD_ , MB_ , M_ , NB_ , N_ , RSRC_
12 PARAMETER( BLOCK_CYCLIC_2D = 1 , DLEN_ = 9 , DTYPE_ = 1 ,
13 $CTXT_ = 2 , M_ = 3 , N_ = 4 , MB_ = 5 , NB_ = 6 ,
14 $RSRC_ = 7 , CSRC_ = 8 , LLD_ = 9 )
15 * ..
16 * .. Local Scalars ..
17 INTEGER I , ICOFFX , ICTXT , IIX , IOFFX , IROFFX , IXCOL ,
18 $IXROW , JJX , LDX , MYCOL , MYROW , NP , NPCOL ,
19 $NPROW , NQ
20 * ..
21 * .. External Subroutines ..
22 EXTERNAL BLACS_GRIDINFO , INFOG2L
23 * ..
24 * .. External Functions ..
25 INTEGER NUMROC
26 EXTERNAL NUMROC
27 * ..
28 * .. Intrinsic Functions ..
29 INTRINSIC CONJG , MOD
30 * ..
31 * .. Executable Statements ..
32
33 * Get grid parameters.
34
35 ICTXT = DESCX( CTXT_ )
36 CALL BLACS_GRIDINFO( ICTXT , NPROW , NPCOL , MYROW , MYCOL )
37
38 * Figure local indexes
39
40 CALL INFOG2L( IX , JX , DESCX , NPROW , NPCOL , MYROW , MYCOL ,
41 $IIX , JJX , IXROW , IXCOL )
42
43 LDX = DESCX( LLD_ )
44 IF( INCX.EQ.DESCX( M_ ) ) THEN
45
46 * sub( X ) is rowwise distributed.
47
47
48 IF( MYROW.NE.IXROW )
48
49 $ RETURN
50 ICOFFX = MOD( JX - 1 , DESCX( NB_ ) )
51 NQ = NUMROC( N + ICOFFX , DESCX( NB_ ) , MYCOL , IXCOL , NPCOL )
52 IF( MYCOL.EQ.IXCOL )
52
53 $ NQ = NQ - ICOFFX
54
55 IF( NQ.GT.0 ) THEN
55
56 IOFFX = IIX + (JJX - 1)*LDX
57 DO 10 I = 1 , NQ
57
58 X( IOFFX ) = CONJG( X( IOFFX ) )
59 IOFFX = IOFFX + LDX
60 10 CONTINUE
60
61 END IF
62
63 ELSE IF( INCX.EQ.1 ) THEN
64
65 * sub( X ) is columnwise distributed.
66
66
67 IF( MYCOL.NE.IXCOL )
67
68 $ RETURN
69 IROFFX = MOD( IX - 1 , DESCX( MB_ ) )
70 NP = NUMROC( N + IROFFX , DESCX( MB_ ) , MYROW , IXROW , NPROW )
71 IF( MYROW.EQ.IXROW )
71
72 $ NP = NP - IROFFX
73
74 IF( NP.GT.0 ) THEN
74
75 IOFFX = IIX + (JJX - 1)*LDX
76 DO 20 I = IOFFX , IOFFX + NP - 1
76
77 X( I ) = CONJG( X( I ) )
78 20 CONTINUE
78
79 END IF
80
81 END IF
82
83 RETURN
84
85 * End of PCLACGV
86
87 END18
12
|
|
Variables in Routine PCLACGV()
| Summary Report |
| Data Type | Quantity | Size(byte) |
| INTEGER | 32 | 128 |
| REAL | 1 | 4 |
| TOTAL | 33 | 132 |
List of Variables
INTEGER
| BLOCK_CYCLIC_2D | CSRC_ | CTXT_ | DLEN_ | DTYPE_ |
| I | ICOFFX | ICTXT | IIX | INCX |
| IOFFX | IROFFX | IX | IXCOL | IXROW |
| JJX | JX | LDX | LLD_ | M_ |
| MB_ | MYCOL | MYROW | N | N_ |
| NB_ | NP | NPCOL | NPROW | NQ |
| NUMROC | RSRC_ | | | |
REAL
Variables Dependence Graph Put the mouse over a right hand side variable to display the corresponding line of the dependence | | - | | - | - | | I | <--- | IOFFXDO 20 I = IOFFX, IOFFX+NP-1, NPDO 20 I = IOFFX, IOFFX+NP-1, NQDO 10 I = 1, NQ |
| ICOFFX | <--- | JXICOFFX = MOD( JX-1, DESCX( NB_ ) ), NB_ICOFFX = MOD( JX-1, DESCX( NB_ ) ) |
| ICTXT | <--- | CTXT_ICTXT = DESCX( CTXT_ ) |
| IOFFX | <--- | IOFFXIOFFX = IOFFX + LDX, JJXIOFFX = IIX+(JJX-1)*LDX{2IOFFX = IIX+(JJX-1)*LDX}, LDXIOFFX = IIX+(JJX-1)*LDX{2IOFFX = IOFFX + LDX, 3IOFFX = IIX+(JJX-1)*LDX}, IIXIOFFX = IIX+(JJX-1)*LDX{2IOFFX = IIX+(JJX-1)*LDX} |
| IROFFX | <--- | IXIROFFX = MOD( IX-1, DESCX( MB_ ) ), MB_IROFFX = MOD( IX-1, DESCX( MB_ ) ) |
| LDX | <--- | LLD_LDX = DESCX( LLD_ ) |
| NP | <--- | IROFFXNP = NUMROC( N+IROFFX, DESCX( MB_ ), MYROW, IXROW, NPROW ), IXROWNP = NUMROC( N+IROFFX, DESCX( MB_ ), MYROW, IXROW, NPROW ), MB_NP = NUMROC( N+IROFFX, DESCX( MB_ ), MYROW, IXROW, NPROW ), MYROWNP = NUMROC( N+IROFFX, DESCX( MB_ ), MYROW, IXROW, NPROW ), NNP = NUMROC( N+IROFFX, DESCX( MB_ ), MYROW, IXROW, NPROW ), NPROWNP = NUMROC( N+IROFFX, DESCX( MB_ ), MYROW, IXROW, NPROW ), NUMROCNP = NUMROC( N+IROFFX, DESCX( MB_ ), MYROW, IXROW, NPROW ) |
| NQ | <--- | IXCOLNQ = NUMROC( N+ICOFFX, DESCX( NB_ ), MYCOL, IXCOL, NPCOL ), MYCOLNQ = NUMROC( N+ICOFFX, DESCX( NB_ ), MYCOL, IXCOL, NPCOL ), NNQ = NUMROC( N+ICOFFX, DESCX( NB_ ), MYCOL, IXCOL, NPCOL ), NB_NQ = NUMROC( N+ICOFFX, DESCX( NB_ ), MYCOL, IXCOL, NPCOL ), NPCOLNQ = NUMROC( N+ICOFFX, DESCX( NB_ ), MYCOL, IXCOL, NPCOL ), NUMROCNQ = NUMROC( N+ICOFFX, DESCX( NB_ ), MYCOL, IXCOL, NPCOL ), ICOFFXNQ = NUMROC( N+ICOFFX, DESCX( NB_ ), MYCOL, IXCOL, NPCOL ) |
| X | <--- | IOFFXX( IOFFX ) = CONJG( X( IOFFX ) ), XX( IOFFX ) = CONJG( X( IOFFX ) ){2X( I ) = CONJG( X( I ) )}, IX( I ) = CONJG( X( I ) ) |
|
|
Analysis elements of the routine PCLACGV() Put the mouse over each element to display detailed matching information
Assigned variables |
| | | BLOCK_CYCLIC_2D , CSRC_ , CTXT_ , DLEN_ , DTYPE_ , I , ICOFFX , ICTXT , IOFFX , IROFFX , LDX , LLD_ , M_ , MB_ , N_ , NB_ , NP , NQ , RSRC_ |
|
Active variables |
| | | BLOCK_CYCLIC_2D , CSRC_ , CTXT_ , DESCX , DLEN_ , DTYPE_ , I , ICOFFX , ICTXT , IIX , INCX , IOFFX , IROFFX , IX , IXCOL , IXROW , JJX , JX , LDX , LLD_ , M_ , MB_ , MYCOL , MYROW , N , N_ , NB_ , NP , NPCOL , NPROW , NQ , NUMROC , RSRC_ , X |
|
Accessed arrays [ array name : associated index ] |
| | DESCX | : CTXT_ , LLD_ , M_ , MB_ , MB_ , NB_ , NB_ |
| | NUMROC | : N+ICOFFX, DESCX( NB_ ), MYCOL, IXCOL, NPCOL , N+IROFFX, DESCX( MB_ ), MYROW, IXROW, NPROW |
| | X | : I , IOFFX |
|
Conditional statements [ statement : associated predicate ] |
| | do | : ( 10 I = 1 , NQ ) , ( 20 I = IOFFX , IOFFX + NP - 1 ) |
| | if | : ( (INCX.EQ.DESCX( M_ ) ) ) , ( MYROW.NE.IXROW ) , ( MYCOL.EQ.IXCOL ) , ( NQ.GT.0 ) , ( INCX.EQ.1 ) , ( MYCOL.NE.IXCOL ) , ( MYROW.EQ.IXROW ) , ( NP.GT.0 ) |
|
| List of variables | BLOCK_CYCLIC_2D CSRC_ CTXT_ DLEN_ DTYPE_ I ICOFFX
| ICTXT IIX INCX IOFFX IROFFX IX IXCOL IXROW
| JJX JX LDX LLD_ M_ MB_ MYCOL MYROW
| N N_ NB_ NP NPCOL NPROW NQ NUMROC
| RSRC_ X | | close
| |
BLOCK_CYCLIC_2D
CSRC_
CTXT_
DLEN_
DTYPE_
I
ICOFFX
ICTXT
IIX
INCX
IOFFX
IROFFX
IX
IXCOL
IXROW
JJX
JX
LDX
LLD_
M_
MB_
MYCOL
MYROW
N
N_
NB_
NP
NPCOL
NPROW
NQ
NUMROC
RSRC_
X
| |