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

◆ pb_setlocran()

subroutine pb_setlocran ( integer  seed,
integer  ilocblk,
integer  jlocblk,
integer  ilocoff,
integer  jlocoff,
integer  myrdist,
integer  mycdist,
integer  nprow,
integer  npcol,
integer, dimension( * )  jmp,
integer, dimension( 4, * )  imuladd,
integer, dimension( * )  iran 
)

Definition at line 4299 of file pblastst.f.

4302*
4303* -- PBLAS test routine (version 2.0) --
4304* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
4305* and University of California, Berkeley.
4306* April 1, 1998
4307*
4308* .. Scalar Arguments ..
4309 INTEGER ILOCBLK, ILOCOFF, JLOCBLK, JLOCOFF, MYCDIST,
4310 $ MYRDIST, NPCOL, NPROW, SEED
4311* ..
4312* .. Array Arguments ..
4313 INTEGER IMULADD( 4, * ), IRAN( * ), JMP( * )
4314* ..
4315*
4316* Purpose
4317* =======
4318*
4319* PB_SETLOCRAN locally initializes the random number generator.
4320*
4321* Arguments
4322* =========
4323*
4324* SEED (global input) INTEGER
4325* On entry, SEED specifies a positive integer used to initiali-
4326* ze the first number in the random sequence used by the matrix
4327* generator. SEED must be at least zero.
4328*
4329* ILOCBLK (local input) INTEGER
4330* On entry, ILOCBLK specifies the local row block coordinate
4331* corresponding to the first row of the submatrix of interest.
4332* ILOCBLK must be at least zero.
4333*
4334* ILOCOFF (local input) INTEGER
4335* On entry, ILOCOFF specifies the local row offset in the block
4336* of local coordinate ILOCBLK corresponding to the first row of
4337* the submatrix of interest. ILOCOFF must at least zero.
4338*
4339* JLOCBLK (local input) INTEGER
4340* On entry, JLOCBLK specifies the local column block coordinate
4341* corresponding to the first column of the submatrix of inte-
4342* rest. JLOCBLK must be at least zero.
4343*
4344* JLOCOFF (local input) INTEGER
4345* On entry, JLOCOFF specifies the local column offset in the
4346* block of local coordinate JLOCBLK corresponding to the first
4347* column of the submatrix of interest. JLOCOFF must be at least
4348* zero.
4349*
4350* MYRDIST (local input) INTEGER
4351* On entry, MYRDIST specifies the relative row process coordi-
4352* nate to the process owning the first row of the submatrix of
4353* interest. MYRDIST must be at least zero and stricly less than
4354* NPROW (see the subroutine PB_LOCINFO).
4355*
4356* MYCDIST (local input) INTEGER
4357* On entry, MYCDIST specifies the relative column process coor-
4358* dinate to the process owning the first column of the subma-
4359* trix of interest. MYCDIST must be at least zero and stricly
4360* less than NPCOL (see the subroutine PB_LOCINFO).
4361*
4362* NPROW (global input) INTEGER
4363* On entry, NPROW specifies the total number of process rows
4364* over which the matrix is distributed. NPROW must be at least
4365* one.
4366*
4367* NPCOL (global input) INTEGER
4368* On entry, NPCOL specifies the total number of process co-
4369* lumns over which the matrix is distributed. NPCOL must be at
4370* least one.
4371*
4372* JMP (local input) INTEGER array
4373* On entry, JMP is an array of dimension JMP_LEN containing the
4374* different jump values used by the matrix generator.
4375*
4376* IMULADD (local input) INTEGER array
4377* On entry, IMULADD is an array of dimension (4, JMP_LEN). The
4378* jth column of this array contains the encoded initial cons-
4379* tants a_j and c_j to jump from X( n ) to X( n + JMP( j ) )
4380* (= a_j * X( n ) + c_j) in the random sequence. IMULADD(1:2,j)
4381* contains respectively the 16-lower and 16-higher bits of the
4382* constant a_j, and IMULADD(3:4,j) contains the 16-lower and
4383* 16-higher bits of the constant c_j.
4384*
4385* IRAN (local output) INTEGER array
4386* On entry, IRAN is an array of dimension 2. On exit, IRAN con-
4387* tains respectively the 16-lower and 32-higher bits of the en-
4388* coding of the entry of the random sequence corresponding lo-
4389* cally to the first local array entry to generate.
4390*
4391* -- Written on April 1, 1998 by
4392* Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
4393*
4394* =====================================================================
4395*
4396* .. Parameters ..
4397 INTEGER JMP_1, JMP_COL, JMP_IMBV, JMP_INBV, JMP_LEN,
4398 $ JMP_MB, JMP_NB, JMP_NPIMBLOC, JMP_NPMB,
4399 $ JMP_NQINBLOC, JMP_NQNB, JMP_ROW
4400 parameter( jmp_1 = 1, jmp_row = 2, jmp_col = 3,
4401 $ jmp_mb = 4, jmp_imbv = 5, jmp_npmb = 6,
4402 $ jmp_npimbloc = 7, jmp_nb = 8, jmp_inbv = 9,
4403 $ jmp_nqnb = 10, jmp_nqinbloc = 11,
4404 $ jmp_len = 11 )
4405* ..
4406* .. Local Arrays ..
4407 INTEGER IMULADDTMP( 4 ), ITMP( 2 )
4408* ..
4409* .. External Subroutines ..
4410 EXTERNAL pb_jump, pb_setran
4411* ..
4412* .. Executable Statements ..
4413*
4414* Compute and set the value of IRAN corresponding to A( IA, JA )
4415*
4416 itmp( 1 ) = seed
4417 itmp( 2 ) = 0
4418*
4419 CALL pb_jump( jmp( jmp_1 ), imuladd( 1, jmp_1 ), itmp, iran,
4420 $ imuladdtmp )
4421*
4422* Jump ILOCBLK blocks of rows + ILOCOFF rows
4423*
4424 CALL pb_jump( ilocoff, imuladd( 1, jmp_row ), iran, itmp,
4425 $ imuladdtmp )
4426 IF( myrdist.GT.0 ) THEN
4427 CALL pb_jump( jmp( jmp_imbv ), imuladd( 1, jmp_row ), itmp,
4428 $ iran, imuladdtmp )
4429 CALL pb_jump( myrdist - 1, imuladd( 1, jmp_mb ), iran,
4430 $ itmp, imuladdtmp )
4431 CALL pb_jump( ilocblk, imuladd( 1, jmp_npmb ), itmp,
4432 $ iran, imuladdtmp )
4433 ELSE
4434 IF( ilocblk.GT.0 ) THEN
4435 CALL pb_jump( jmp( jmp_imbv ), imuladd( 1, jmp_row ), itmp,
4436 $ iran, imuladdtmp )
4437 CALL pb_jump( nprow - 1, imuladd( 1, jmp_mb ), iran,
4438 $ itmp, imuladdtmp )
4439 CALL pb_jump( ilocblk - 1, imuladd( 1, jmp_npmb ), itmp,
4440 $ iran, imuladdtmp )
4441 ELSE
4442 CALL pb_jump( 0, imuladd( 1, jmp_1 ), itmp,
4443 $ iran, imuladdtmp )
4444 END IF
4445 END IF
4446*
4447* Jump JLOCBLK blocks of columns + JLOCOFF columns
4448*
4449 CALL pb_jump( jlocoff, imuladd( 1, jmp_col ), iran, itmp,
4450 $ imuladdtmp )
4451 IF( mycdist.GT.0 ) THEN
4452 CALL pb_jump( jmp( jmp_inbv ), imuladd( 1, jmp_col ), itmp,
4453 $ iran, imuladdtmp )
4454 CALL pb_jump( mycdist - 1, imuladd( 1, jmp_nb ), iran,
4455 $ itmp, imuladdtmp )
4456 CALL pb_jump( jlocblk, imuladd( 1, jmp_nqnb ), itmp,
4457 $ iran, imuladdtmp )
4458 ELSE
4459 IF( jlocblk.GT.0 ) THEN
4460 CALL pb_jump( jmp( jmp_inbv ), imuladd( 1, jmp_col ), itmp,
4461 $ iran, imuladdtmp )
4462 CALL pb_jump( npcol - 1, imuladd( 1, jmp_nb ), iran,
4463 $ itmp, imuladdtmp )
4464 CALL pb_jump( jlocblk - 1, imuladd( 1, jmp_nqnb ), itmp,
4465 $ iran, imuladdtmp )
4466 ELSE
4467 CALL pb_jump( 0, imuladd( 1, jmp_1 ), itmp,
4468 $ iran, imuladdtmp )
4469 END IF
4470 END IF
4471*
4472 CALL pb_setran( iran, imuladd( 1, jmp_1 ) )
4473*
4474 RETURN
4475*
4476* End of PB_SETLOCRAN
4477*
subroutine pb_setran(iran, iac)
Definition pblastst.f:4759
subroutine pb_jump(k, muladd, irann, iranm, ima)
Definition pblastst.f:4648
Here is the caller graph for this function: