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

4640*
4641* -- PBLAS test routine (version 2.0) --
4642* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
4643* and University of California, Berkeley.
4644* April 1, 1998
4645*
4646* .. Scalar Arguments ..
4647 LOGICAL COLMAJ
4648 INTEGER CSRC, IMBLOC, IMBVIR, INBLOC, INBVIR, MB, NB,
4649 $ NPCOL, NPROW, NVIR, RSRC, STRIDE
4650* ..
4651* .. Array Arguments ..
4652 INTEGER JMP( * )
4653* ..
4654*
4655* Purpose
4656* =======
4657*
4658* PB_INITJMP initializes the jump values JMP used by the random matrix
4659* generator.
4660*
4661* Arguments
4662* =========
4663*
4664* COLMAJ (global input) LOGICAL
4665* On entry, COLMAJ specifies the ordering of the random sequen-
4666* ce. When COLMAJ is .TRUE., the random sequence will be used
4667* for a column major ordering, and otherwise a row-major orde-
4668* ring. This impacts on the computation of the jump values.
4669*
4670* NVIR (global input) INTEGER
4671* On entry, NVIR specifies the size of the underlying virtual
4672* matrix. NVIR must be at least zero.
4673*
4674* IMBVIR (local input) INTEGER
4675* On entry, IMBVIR specifies the number of virtual rows of the
4676* upper left block of the underlying virtual submatrix. IMBVIR
4677* must be at least IMBLOC.
4678*
4679* INBVIR (local input) INTEGER
4680* On entry, INBVIR specifies the number of virtual columns of
4681* the upper left block of the underlying virtual submatrix.
4682* INBVIR must be at least INBLOC.
4683*
4684* IMBLOC (local input) INTEGER
4685* On entry, IMBLOC specifies the number of rows (size) of the
4686* local uppest blocks. IMBLOC is at least zero.
4687*
4688* INBLOC (local input) INTEGER
4689* On entry, INBLOC specifies the number of columns (size) of
4690* the local leftmost blocks. INBLOC is at least zero.
4691*
4692* MB (global input) INTEGER
4693* On entry, MB specifies the size of the blocks used to parti-
4694* tion the matrix rows. MB must be at least one.
4695*
4696* NB (global input) INTEGER
4697* On entry, NB specifies the size of the blocks used to parti-
4698* tion the matrix columns. NB must be at least one.
4699*
4700* RSRC (global input) INTEGER
4701* On entry, RSRC specifies the row coordinate of the process
4702* that possesses the first row of the matrix. When RSRC = -1,
4703* the rows are not distributed but replicated, otherwise RSRC
4704* must be at least zero and strictly less than NPROW.
4705*
4706* CSRC (global input) INTEGER
4707* On entry, CSRC specifies the column coordinate of the pro-
4708* cess that possesses the first column of the matrix. When CSRC
4709* is equal to -1, the columns are not distributed but replica-
4710* ted, otherwise CSRC must be at least zero and strictly less
4711* than NPCOL.
4712*
4713* NPROW (global input) INTEGER
4714* On entry, NPROW specifies the total number of process rows
4715* over which the matrix is distributed. NPROW must be at least
4716* one.
4717*
4718* NPCOL (global input) INTEGER
4719* On entry, NPCOL specifies the total number of process co-
4720* lumns over which the matrix is distributed. NPCOL must be at
4721* least one.
4722*
4723* STRIDE (global input) INTEGER
4724* On entry, STRIDE specifies the number of random numbers to be
4725* generated to compute one matrix entry. In the real case,
4726* STRIDE is usually 1, where as in the complex case STRIDE is
4727* usually 2 in order to generate the real and imaginary parts.
4728*
4729* JMP (local output) INTEGER array
4730* On entry, JMP is an array of dimension JMP_LEN. On exit, this
4731* array contains the different jump values used by the random
4732* matrix generator.
4733*
4734* -- Written on April 1, 1998 by
4735* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
4736*
4737* =====================================================================
4738*
4739* .. Parameters ..
4740 INTEGER JMP_1, JMP_COL, JMP_IMBV, JMP_INBV, JMP_LEN,
4741 $ JMP_MB, JMP_NB, JMP_NPIMBLOC, JMP_NPMB,
4742 $ JMP_NQINBLOC, JMP_NQNB, JMP_ROW
4743 parameter( jmp_1 = 1, jmp_row = 2, jmp_col = 3,
4744 $ jmp_mb = 4, jmp_imbv = 5, jmp_npmb = 6,
4745 $ jmp_npimbloc = 7, jmp_nb = 8, jmp_inbv = 9,
4746 $ jmp_nqnb = 10, jmp_nqinbloc = 11,
4747 $ jmp_len = 11 )
4748* ..
4749* .. Local Scalars ..
4750 INTEGER NPMB, NQNB
4751* ..
4752* .. Executable Statements ..
4753*
4754 IF( rsrc.LT.0 ) THEN
4755 npmb = mb
4756 ELSE
4757 npmb = nprow * mb
4758 END IF
4759 IF( csrc.LT.0 ) THEN
4760 nqnb = nb
4761 ELSE
4762 nqnb = npcol * nb
4763 END IF
4764*
4765 jmp( jmp_1 ) = 1
4766*
4767 jmp( jmp_mb ) = mb
4768 jmp( jmp_imbv ) = imbvir
4769 jmp( jmp_npmb ) = npmb
4770 jmp( jmp_npimbloc ) = imbloc + npmb - mb
4771*
4772 jmp( jmp_nb ) = nb
4773 jmp( jmp_inbv ) = inbvir
4774 jmp( jmp_nqnb ) = nqnb
4775 jmp( jmp_nqinbloc ) = inbloc + nqnb - nb
4776*
4777 IF( colmaj ) THEN
4778 jmp( jmp_row ) = stride
4779 jmp( jmp_col ) = stride * nvir
4780 ELSE
4781 jmp( jmp_row ) = stride * nvir
4782 jmp( jmp_col ) = stride
4783 END IF
4784*
4785 RETURN
4786*
4787* End of PB_INITJMP
4788*