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

◆ pb_initjmp()

subroutine pb_initjmp ( logical  colmaj,
integer  nvir,
integer  imbvir,
integer  inbvir,
integer  imbloc,
integer  inbloc,
integer  mb,
integer  nb,
integer  rsrc,
integer  csrc,
integer  nprow,
integer  npcol,
integer  stride,
integer, dimension( * )  jmp 
)

Definition at line 4042 of file pblastst.f.

4045*
4046* -- PBLAS test routine (version 2.0) --
4047* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
4048* and University of California, Berkeley.
4049* April 1, 1998
4050*
4051* .. Scalar Arguments ..
4052 LOGICAL COLMAJ
4053 INTEGER CSRC, IMBLOC, IMBVIR, INBLOC, INBVIR, MB, NB,
4054 $ NPCOL, NPROW, NVIR, RSRC, STRIDE
4055* ..
4056* .. Array Arguments ..
4057 INTEGER JMP( * )
4058* ..
4059*
4060* Purpose
4061* =======
4062*
4063* PB_INITJMP initializes the jump values JMP used by the random matrix
4064* generator.
4065*
4066* Arguments
4067* =========
4068*
4069* COLMAJ (global input) LOGICAL
4070* On entry, COLMAJ specifies the ordering of the random sequen-
4071* ce. When COLMAJ is .TRUE., the random sequence will be used
4072* for a column major ordering, and otherwise a row-major orde-
4073* ring. This impacts on the computation of the jump values.
4074*
4075* NVIR (global input) INTEGER
4076* On entry, NVIR specifies the size of the underlying virtual
4077* matrix. NVIR must be at least zero.
4078*
4079* IMBVIR (local input) INTEGER
4080* On entry, IMBVIR specifies the number of virtual rows of the
4081* upper left block of the underlying virtual submatrix. IMBVIR
4082* must be at least IMBLOC.
4083*
4084* INBVIR (local input) INTEGER
4085* On entry, INBVIR specifies the number of virtual columns of
4086* the upper left block of the underlying virtual submatrix.
4087* INBVIR must be at least INBLOC.
4088*
4089* IMBLOC (local input) INTEGER
4090* On entry, IMBLOC specifies the number of rows (size) of the
4091* local uppest blocks. IMBLOC is at least zero.
4092*
4093* INBLOC (local input) INTEGER
4094* On entry, INBLOC specifies the number of columns (size) of
4095* the local leftmost blocks. INBLOC is at least zero.
4096*
4097* MB (global input) INTEGER
4098* On entry, MB specifies the size of the blocks used to parti-
4099* tion the matrix rows. MB must be at least one.
4100*
4101* NB (global input) INTEGER
4102* On entry, NB specifies the size of the blocks used to parti-
4103* tion the matrix columns. NB must be at least one.
4104*
4105* RSRC (global input) INTEGER
4106* On entry, RSRC specifies the row coordinate of the process
4107* that possesses the first row of the matrix. When RSRC = -1,
4108* the rows are not distributed but replicated, otherwise RSRC
4109* must be at least zero and strictly less than NPROW.
4110*
4111* CSRC (global input) INTEGER
4112* On entry, CSRC specifies the column coordinate of the pro-
4113* cess that possesses the first column of the matrix. When CSRC
4114* is equal to -1, the columns are not distributed but replica-
4115* ted, otherwise CSRC must be at least zero and strictly less
4116* than NPCOL.
4117*
4118* NPROW (global input) INTEGER
4119* On entry, NPROW specifies the total number of process rows
4120* over which the matrix is distributed. NPROW must be at least
4121* one.
4122*
4123* NPCOL (global input) INTEGER
4124* On entry, NPCOL specifies the total number of process co-
4125* lumns over which the matrix is distributed. NPCOL must be at
4126* least one.
4127*
4128* STRIDE (global input) INTEGER
4129* On entry, STRIDE specifies the number of random numbers to be
4130* generated to compute one matrix entry. In the real case,
4131* STRIDE is usually 1, where as in the complex case STRIDE is
4132* usually 2 in order to generate the real and imaginary parts.
4133*
4134* JMP (local output) INTEGER array
4135* On entry, JMP is an array of dimension JMP_LEN. On exit, this
4136* array contains the different jump values used by the random
4137* matrix generator.
4138*
4139* -- Written on April 1, 1998 by
4140* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
4141*
4142* =====================================================================
4143*
4144* .. Parameters ..
4145 INTEGER JMP_1, JMP_COL, JMP_IMBV, JMP_INBV, JMP_LEN,
4146 $ JMP_MB, JMP_NB, JMP_NPIMBLOC, JMP_NPMB,
4147 $ JMP_NQINBLOC, JMP_NQNB, JMP_ROW
4148 parameter( jmp_1 = 1, jmp_row = 2, jmp_col = 3,
4149 $ jmp_mb = 4, jmp_imbv = 5, jmp_npmb = 6,
4150 $ jmp_npimbloc = 7, jmp_nb = 8, jmp_inbv = 9,
4151 $ jmp_nqnb = 10, jmp_nqinbloc = 11,
4152 $ jmp_len = 11 )
4153* ..
4154* .. Local Scalars ..
4155 INTEGER NPMB, NQNB
4156* ..
4157* .. Executable Statements ..
4158*
4159 IF( rsrc.LT.0 ) THEN
4160 npmb = mb
4161 ELSE
4162 npmb = nprow * mb
4163 END IF
4164 IF( csrc.LT.0 ) THEN
4165 nqnb = nb
4166 ELSE
4167 nqnb = npcol * nb
4168 END IF
4169*
4170 jmp( jmp_1 ) = 1
4171*
4172 jmp( jmp_mb ) = mb
4173 jmp( jmp_imbv ) = imbvir
4174 jmp( jmp_npmb ) = npmb
4175 jmp( jmp_npimbloc ) = imbloc + npmb - mb
4176*
4177 jmp( jmp_nb ) = nb
4178 jmp( jmp_inbv ) = inbvir
4179 jmp( jmp_nqnb ) = nqnb
4180 jmp( jmp_nqinbloc ) = inbloc + nqnb - nb
4181*
4182 IF( colmaj ) THEN
4183 jmp( jmp_row ) = stride
4184 jmp( jmp_col ) = stride * nvir
4185 ELSE
4186 jmp( jmp_row ) = stride * nvir
4187 jmp( jmp_col ) = stride
4188 END IF
4189*
4190 RETURN
4191*
4192* End of PB_INITJMP
4193*
Here is the caller graph for this function: