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

◆ pb_descset2()

subroutine pb_descset2 ( integer, dimension( * )  desc,
integer  m,
integer  n,
integer  imb,
integer  inb,
integer  mb,
integer  nb,
integer  rsrc,
integer  csrc,
integer  ctxt,
integer  lld 
)

Definition at line 3170 of file pblastst.f.

3172*
3173* -- PBLAS test routine (version 2.0) --
3174* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
3175* and University of California, Berkeley.
3176* April 1, 1998
3177*
3178* .. Scalar Arguments ..
3179 INTEGER CSRC, CTXT, IMB, INB, LLD, M, MB, N, NB, RSRC
3180* ..
3181* .. Array Arguments ..
3182 INTEGER DESC( * )
3183* ..
3184*
3185* Purpose
3186* =======
3187*
3188* PB_DESCSET2 uses its 10 input arguments M, N, IMB, INB, MB, NB,
3189* RSRC, CSRC, CTXT and LLD to initialize a descriptor vector of type
3190* BLOCK_CYCLIC_2D_INB.
3191*
3192* Notes
3193* =====
3194*
3195* A description vector is associated with each 2D block-cyclicly dis-
3196* tributed matrix. This vector stores the information required to
3197* establish the mapping between a matrix entry and its corresponding
3198* process and memory location.
3199*
3200* In the following comments, the character _ should be read as
3201* "of the distributed matrix". Let A be a generic term for any 2D
3202* block cyclicly distributed matrix. Its description vector is DESCA:
3203*
3204* NOTATION STORED IN EXPLANATION
3205* ---------------- --------------- -----------------------------------
3206* DTYPE_A (global) DESCA( DTYPE1_ ) The descriptor type.
3207* CTXT_A (global) DESCA( CTXT1_ ) The BLACS context handle indicating
3208* the NPROW x NPCOL BLACS process
3209* grid A is distributed over. The
3210* context itself is global, but the
3211* handle (the integer value) may
3212* vary.
3213* M_A (global) DESCA( M1_ ) The number of rows in the distri-
3214* buted matrix A, M_A >= 0.
3215* N_A (global) DESCA( N1_ ) The number of columns in the dis-
3216* tributed matrix A, N_A >= 0.
3217* MB_A (global) DESCA( MB1_ ) The blocking factor used to distri-
3218* bute the rows of A, MB_A > 0.
3219* NB_A (global) DESCA( NB1_ ) The blocking factor used to distri-
3220* bute the columns of A, NB_A > 0.
3221* RSRC_A (global) DESCA( RSRC1_ ) The process row over which the
3222* first row of the matrix A is dis-
3223* tributed, NPROW > RSRC_A >= 0.
3224* CSRC_A (global) DESCA( CSRC1_ ) The process column over which the
3225* first column of A is distributed.
3226* NPCOL > CSRC_A >= 0.
3227* LLD_A (local) DESCA( LLD1_ ) The leading dimension of the local
3228* array storing the local blocks of
3229* the distributed matrix A,
3230* IF( Lc( 1, N_A ) > 0 )
3231* LLD_A >= MAX( 1, Lr( 1, M_A ) )
3232* ELSE
3233* LLD_A >= 1.
3234*
3235* Let K be the number of rows of a matrix A starting at the global in-
3236* dex IA,i.e, A( IA:IA+K-1, : ). Lr( IA, K ) denotes the number of rows
3237* that the process of row coordinate MYROW ( 0 <= MYROW < NPROW ) would
3238* receive if these K rows were distributed over NPROW processes. If K
3239* is the number of columns of a matrix A starting at the global index
3240* JA, i.e, A( :, JA:JA+K-1, : ), Lc( JA, K ) denotes the number of co-
3241* lumns that the process MYCOL ( 0 <= MYCOL < NPCOL ) would receive if
3242* these K columns were distributed over NPCOL processes.
3243*
3244* The values of Lr() and Lc() may be determined via a call to the func-
3245* tion PB_NUMROC:
3246* Lr( IA, K ) = PB_NUMROC( K, IA, MB_A, MB_A, MYROW, RSRC_A, NPROW )
3247* Lc( JA, K ) = PB_NUMROC( K, JA, NB_A, NB_A, MYCOL, CSRC_A, NPCOL )
3248*
3249* Arguments
3250* =========
3251*
3252* DESC (global and local output) INTEGER array
3253* On entry, DESC is an array of dimension DLEN_. DESC is the
3254* array descriptor to be set.
3255*
3256* M (global input) INTEGER
3257* On entry, M specifies the number of rows of the matrix.
3258* M must be at least zero.
3259*
3260* N (global input) INTEGER
3261* On entry, N specifies the number of columns of the matrix.
3262* N must be at least zero.
3263*
3264* IMB (global input) INTEGER
3265* On entry, IMB specifies the row size of the first block of
3266* the global matrix distribution. IMB must be at least one.
3267*
3268* INB (global input) INTEGER
3269* On entry, INB specifies the column size of the first block
3270* of the global matrix distribution. INB must be at least one.
3271*
3272* MB (global input) INTEGER
3273* On entry, MB specifies the row size of the blocks used to
3274* partition the matrix. MB must be at least one.
3275*
3276* NB (global input) INTEGER
3277* On entry, NB specifies the column size of the blocks used to
3278* partition the matrix. NB must be at least one.
3279*
3280* RSRC (global input) INTEGER
3281* On entry, RSRC specifies the row coordinate of the process
3282* that possesses the first row of the matrix. When RSRC = -1,
3283* the data is not distributed but replicated, otherwise RSRC
3284* must be at least zero and strictly less than NPROW.
3285*
3286* CSRC (global input) INTEGER
3287* On entry, CSRC specifies the column coordinate of the pro-
3288* cess that possesses the first column of the matrix. When
3289* CSRC = -1, the data is not distributed but replicated, other-
3290* wise CSRC must be at least zero and strictly less than NPCOL.
3291*
3292* CTXT (local input) INTEGER
3293* On entry, CTXT specifies the BLACS context handle, indicating
3294* the global communication context. The value of the context
3295* itself is local.
3296*
3297* LLD (local input) INTEGER
3298* On entry, LLD specifies the leading dimension of the local
3299* array storing the local entries of the matrix. LLD must be at
3300* least MAX( 1, Lr(1,M) ).
3301*
3302* -- Written on April 1, 1998 by
3303* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
3304*
3305* =====================================================================
3306*
3307* .. Parameters ..
3308 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
3309 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
3310 $ RSRC_
3311 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
3312 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
3313 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
3314 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
3315* ..
3316* .. Executable Statements ..
3317*
3318 desc( dtype_ ) = block_cyclic_2d_inb
3319 desc( ctxt_ ) = ctxt
3320 desc( m_ ) = m
3321 desc( n_ ) = n
3322 desc( imb_ ) = imb
3323 desc( inb_ ) = inb
3324 desc( mb_ ) = mb
3325 desc( nb_ ) = nb
3326 desc( rsrc_ ) = rsrc
3327 desc( csrc_ ) = csrc
3328 desc( lld_ ) = lld
3329*
3330 RETURN
3331*
3332* End of PB_DESCSET2
3333*
Here is the caller graph for this function: