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 3765 of file pblastim.f.

3767*
3768* -- PBLAS test routine (version 2.0) --
3769* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
3770* and University of California, Berkeley.
3771* April 1, 1998
3772*
3773* .. Scalar Arguments ..
3774 INTEGER CSRC, CTXT, IMB, INB, LLD, M, MB, N, NB, RSRC
3775* ..
3776* .. Array Arguments ..
3777 INTEGER DESC( * )
3778* ..
3779*
3780* Purpose
3781* =======
3782*
3783* PB_DESCSET2 uses its 10 input arguments M, N, IMB, INB, MB, NB,
3784* RSRC, CSRC, CTXT and LLD to initialize a descriptor vector of type
3785* BLOCK_CYCLIC_2D_INB.
3786*
3787* Notes
3788* =====
3789*
3790* A description vector is associated with each 2D block-cyclicly dis-
3791* tributed matrix. This vector stores the information required to
3792* establish the mapping between a matrix entry and its corresponding
3793* process and memory location.
3794*
3795* In the following comments, the character _ should be read as
3796* "of the distributed matrix". Let A be a generic term for any 2D
3797* block cyclicly distributed matrix. Its description vector is DESCA:
3798*
3799* NOTATION STORED IN EXPLANATION
3800* ---------------- --------------- -----------------------------------
3801* DTYPE_A (global) DESCA( DTYPE1_ ) The descriptor type.
3802* CTXT_A (global) DESCA( CTXT1_ ) The BLACS context handle indicating
3803* the NPROW x NPCOL BLACS process
3804* grid A is distributed over. The
3805* context itself is global, but the
3806* handle (the integer value) may
3807* vary.
3808* M_A (global) DESCA( M1_ ) The number of rows in the distri-
3809* buted matrix A, M_A >= 0.
3810* N_A (global) DESCA( N1_ ) The number of columns in the dis-
3811* tributed matrix A, N_A >= 0.
3812* MB_A (global) DESCA( MB1_ ) The blocking factor used to distri-
3813* bute the rows of A, MB_A > 0.
3814* NB_A (global) DESCA( NB1_ ) The blocking factor used to distri-
3815* bute the columns of A, NB_A > 0.
3816* RSRC_A (global) DESCA( RSRC1_ ) The process row over which the
3817* first row of the matrix A is dis-
3818* tributed, NPROW > RSRC_A >= 0.
3819* CSRC_A (global) DESCA( CSRC1_ ) The process column over which the
3820* first column of A is distributed.
3821* NPCOL > CSRC_A >= 0.
3822* LLD_A (local) DESCA( LLD1_ ) The leading dimension of the local
3823* array storing the local blocks of
3824* the distributed matrix A,
3825* IF( Lc( 1, N_A ) > 0 )
3826* LLD_A >= MAX( 1, Lr( 1, M_A ) )
3827* ELSE
3828* LLD_A >= 1.
3829*
3830* Let K be the number of rows of a matrix A starting at the global in-
3831* dex IA,i.e, A( IA:IA+K-1, : ). Lr( IA, K ) denotes the number of rows
3832* that the process of row coordinate MYROW ( 0 <= MYROW < NPROW ) would
3833* receive if these K rows were distributed over NPROW processes. If K
3834* is the number of columns of a matrix A starting at the global index
3835* JA, i.e, A( :, JA:JA+K-1, : ), Lc( JA, K ) denotes the number of co-
3836* lumns that the process MYCOL ( 0 <= MYCOL < NPCOL ) would receive if
3837* these K columns were distributed over NPCOL processes.
3838*
3839* The values of Lr() and Lc() may be determined via a call to the func-
3840* tion PB_NUMROC:
3841* Lr( IA, K ) = PB_NUMROC( K, IA, MB_A, MB_A, MYROW, RSRC_A, NPROW )
3842* Lc( JA, K ) = PB_NUMROC( K, JA, NB_A, NB_A, MYCOL, CSRC_A, NPCOL )
3843*
3844* Arguments
3845* =========
3846*
3847* DESC (global and local output) INTEGER array
3848* On entry, DESC is an array of dimension DLEN_. DESC is the
3849* array descriptor to be set.
3850*
3851* M (global input) INTEGER
3852* On entry, M specifies the number of rows of the matrix.
3853* M must be at least zero.
3854*
3855* N (global input) INTEGER
3856* On entry, N specifies the number of columns of the matrix.
3857* N must be at least zero.
3858*
3859* IMB (global input) INTEGER
3860* On entry, IMB specifies the row size of the first block of
3861* the global matrix distribution. IMB must be at least one.
3862*
3863* INB (global input) INTEGER
3864* On entry, INB specifies the column size of the first block
3865* of the global matrix distribution. INB must be at least one.
3866*
3867* MB (global input) INTEGER
3868* On entry, MB specifies the row size of the blocks used to
3869* partition the matrix. MB must be at least one.
3870*
3871* NB (global input) INTEGER
3872* On entry, NB specifies the column size of the blocks used to
3873* partition the matrix. NB must be at least one.
3874*
3875* RSRC (global input) INTEGER
3876* On entry, RSRC specifies the row coordinate of the process
3877* that possesses the first row of the matrix. When RSRC = -1,
3878* the data is not distributed but replicated, otherwise RSRC
3879* must be at least zero and strictly less than NPROW.
3880*
3881* CSRC (global input) INTEGER
3882* On entry, CSRC specifies the column coordinate of the pro-
3883* cess that possesses the first column of the matrix. When
3884* CSRC = -1, the data is not distributed but replicated, other-
3885* wise CSRC must be at least zero and strictly less than NPCOL.
3886*
3887* CTXT (local input) INTEGER
3888* On entry, CTXT specifies the BLACS context handle, indicating
3889* the global communication context. The value of the context
3890* itself is local.
3891*
3892* LLD (local input) INTEGER
3893* On entry, LLD specifies the leading dimension of the local
3894* array storing the local entries of the matrix. LLD must be at
3895* least MAX( 1, Lr(1,M) ).
3896*
3897* -- Written on April 1, 1998 by
3898* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
3899*
3900* =====================================================================
3901*
3902* .. Parameters ..
3903 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
3904 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
3905 $ RSRC_
3906 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
3907 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
3908 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
3909 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
3910* ..
3911* .. Executable Statements ..
3912*
3913 desc( dtype_ ) = block_cyclic_2d_inb
3914 desc( ctxt_ ) = ctxt
3915 desc( m_ ) = m
3916 desc( n_ ) = n
3917 desc( imb_ ) = imb
3918 desc( inb_ ) = inb
3919 desc( mb_ ) = mb
3920 desc( nb_ ) = nb
3921 desc( rsrc_ ) = rsrc
3922 desc( csrc_ ) = csrc
3923 desc( lld_ ) = lld
3924*
3925 RETURN
3926*
3927* End of PB_DESCSET2
3928*