SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ pisinscope()

logical function pisinscope ( integer  ictxt,
integer  n,
integer  ix,
integer  jx,
integer, dimension( * )  descx,
integer  incx 
)

Definition at line 2077 of file pzblas1tst.f.

2078*
2079* -- PBLAS test routine (version 2.0) --
2080* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
2081* and University of California, Berkeley.
2082* April 1, 1998
2083*
2084* .. Scalar Arguments ..
2085 INTEGER ICTXT, INCX, IX, JX, N
2086* ..
2087* .. Array Arguments ..
2088 INTEGER DESCX( * )
2089* ..
2090*
2091* Purpose
2092* =======
2093*
2094* PISINSCOPE returns .TRUE. if the calling process is in the scope of
2095* sub( X ) = X( IX+(JX-1)*DESCX(M_)+(i-1)*INCX ) and .FALSE. if it is
2096* not. This routine is used to determine which processes should check
2097* the answer returned by some Level 1 PBLAS routines.
2098*
2099* Notes
2100* =====
2101*
2102* A description vector is associated with each 2D block-cyclicly dis-
2103* tributed matrix. This vector stores the information required to
2104* establish the mapping between a matrix entry and its corresponding
2105* process and memory location.
2106*
2107* In the following comments, the character _ should be read as
2108* "of the distributed matrix". Let A be a generic term for any 2D
2109* block cyclicly distributed matrix. Its description vector is DESCA:
2110*
2111* NOTATION STORED IN EXPLANATION
2112* ---------------- --------------- ------------------------------------
2113* DTYPE_A (global) DESCA( DTYPE_ ) The descriptor type.
2114* CTXT_A (global) DESCA( CTXT_ ) The BLACS context handle, indicating
2115* the NPROW x NPCOL BLACS process grid
2116* A is distributed over. The context
2117* itself is global, but the handle
2118* (the integer value) may vary.
2119* M_A (global) DESCA( M_ ) The number of rows in the distribu-
2120* ted matrix A, M_A >= 0.
2121* N_A (global) DESCA( N_ ) The number of columns in the distri-
2122* buted matrix A, N_A >= 0.
2123* IMB_A (global) DESCA( IMB_ ) The number of rows of the upper left
2124* block of the matrix A, IMB_A > 0.
2125* INB_A (global) DESCA( INB_ ) The number of columns of the upper
2126* left block of the matrix A,
2127* INB_A > 0.
2128* MB_A (global) DESCA( MB_ ) The blocking factor used to distri-
2129* bute the last M_A-IMB_A rows of A,
2130* MB_A > 0.
2131* NB_A (global) DESCA( NB_ ) The blocking factor used to distri-
2132* bute the last N_A-INB_A columns of
2133* A, NB_A > 0.
2134* RSRC_A (global) DESCA( RSRC_ ) The process row over which the first
2135* row of the matrix A is distributed,
2136* NPROW > RSRC_A >= 0.
2137* CSRC_A (global) DESCA( CSRC_ ) The process column over which the
2138* first column of A is distributed.
2139* NPCOL > CSRC_A >= 0.
2140* LLD_A (local) DESCA( LLD_ ) The leading dimension of the local
2141* array storing the local blocks of
2142* the distributed matrix A,
2143* IF( Lc( 1, N_A ) > 0 )
2144* LLD_A >= MAX( 1, Lr( 1, M_A ) )
2145* ELSE
2146* LLD_A >= 1.
2147*
2148* Let K be the number of rows of a matrix A starting at the global in-
2149* dex IA,i.e, A( IA:IA+K-1, : ). Lr( IA, K ) denotes the number of rows
2150* that the process of row coordinate MYROW ( 0 <= MYROW < NPROW ) would
2151* receive if these K rows were distributed over NPROW processes. If K
2152* is the number of columns of a matrix A starting at the global index
2153* JA, i.e, A( :, JA:JA+K-1, : ), Lc( JA, K ) denotes the number of co-
2154* lumns that the process MYCOL ( 0 <= MYCOL < NPCOL ) would receive if
2155* these K columns were distributed over NPCOL processes.
2156*
2157* The values of Lr() and Lc() may be determined via a call to the func-
2158* tion PB_NUMROC:
2159* Lr( IA, K ) = PB_NUMROC( K, IA, IMB_A, MB_A, MYROW, RSRC_A, NPROW )
2160* Lc( JA, K ) = PB_NUMROC( K, JA, INB_A, NB_A, MYCOL, CSRC_A, NPCOL )
2161*
2162* Arguments
2163* =========
2164*
2165* ICTXT (local input) INTEGER
2166* On entry, ICTXT specifies the BLACS context handle, indica-
2167* ting the global context of the operation. The context itself
2168* is global, but the value of ICTXT is local.
2169*
2170* N (global input) INTEGER
2171* The length of the subvector sub( X ).
2172*
2173* IX (global input) INTEGER
2174* On entry, IX specifies X's global row index, which points to
2175* the beginning of the submatrix sub( X ).
2176*
2177* JX (global input) INTEGER
2178* On entry, JX specifies X's global column index, which points
2179* to the beginning of the submatrix sub( X ).
2180*
2181* DESCX (global and local input) INTEGER array
2182* On entry, DESCX is an integer array of dimension DLEN_. This
2183* is the array descriptor for the matrix X.
2184*
2185* INCX (global input) INTEGER
2186* On entry, INCX specifies the global increment for the
2187* elements of X. Only two values of INCX are supported in
2188* this version, namely 1 and M_X. INCX must not be zero.
2189*
2190* -- Written on April 1, 1998 by
2191* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
2192*
2193* =====================================================================
2194*
2195* .. Parameters ..
2196 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
2197 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
2198 $ RSRC_
2199 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
2200 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
2201 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
2202 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
2203* ..
2204* .. Local Scalars ..
2205 LOGICAL COLREP, ROWREP
2206 INTEGER IIX, IXCOL, IXROW, JJX, MYCOL, MYROW, NPCOL,
2207 $ NPROW
2208* ..
2209* .. External Subroutines ..
2210 EXTERNAL blacs_gridinfo, pb_infog2l
2211* ..
2212* .. Executable Statements ..
2213*
2214 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2215*
2216 CALL pb_infog2l( ix, jx, descx, nprow, npcol, myrow, mycol,
2217 $ iix, jjx, ixrow, ixcol )
2218 rowrep = ( ixrow.EQ.-1 )
2219 colrep = ( ixcol.EQ.-1 )
2220*
2221 IF( descx( m_ ).EQ.1 .AND. n.EQ.1 ) THEN
2222*
2223* This is the special case, find process owner of IX, JX, and
2224* only this process is the scope.
2225*
2226 pisinscope = ( ( ixrow.EQ.myrow .OR. rowrep ) .AND.
2227 $ ( ixcol.EQ.mycol .OR. colrep ) )
2228*
2229 ELSE
2230*
2231 IF( incx.EQ.descx( m_ ) ) THEN
2232*
2233* row vector
2234*
2235 pisinscope = ( myrow.EQ.ixrow .OR. rowrep )
2236*
2237 ELSE
2238*
2239* column vector
2240*
2241 pisinscope = ( mycol.EQ.ixcol .OR. colrep )
2242*
2243 END IF
2244*
2245 END IF
2246*
2247 RETURN
2248*
2249* End of PISINSCOPE
2250*
subroutine pb_infog2l(i, j, desc, nprow, npcol, myrow, mycol, ii, jj, prow, pcol)
Definition pblastst.f:1673
logical function pisinscope(ictxt, n, ix, jx, descx, incx)
Here is the call graph for this function: