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

◆ sgenmat()

subroutine sgenmat ( integer  m,
integer  n,
real, dimension(lda,n)  a,
integer  lda,
integer  testnum,
integer  myrow,
integer  mycol 
)

Definition at line 7479 of file blacstest.f.

7480*
7481* -- BLACS tester (version 1.0) --
7482* University of Tennessee
7483* December 15, 1994
7484*
7485*
7486* .. Scalar Arguments ..
7487 INTEGER M, N, LDA, TESTNUM, MYROW, MYCOL
7488* ..
7489* .. Array Arguments ..
7490 REAL A(LDA,N)
7491* ..
7492*
7493* Purpose
7494* =======
7495* SGENMAT: Generates an M-by-N matrix filled with random elements.
7496*
7497* Arguments
7498* =========
7499* M (input) INTEGER
7500* The number of rows of the matrix A. M >= 0.
7501*
7502* N (input) INTEGER
7503* The number of columns of the matrix A. N >= 0.
7504*
7505* A (output) @up@(doctype) array, dimension (LDA,N)
7506* The m by n matrix A. Fortran77 (column-major) storage
7507* assumed.
7508*
7509* LDA (input) INTEGER
7510* The leading dimension of the array A. LDA >= max(1, M).
7511*
7512* TESTNUM (input) INTEGER
7513* Unique number for this test case, used as a basis for
7514* the random seeds.
7515*
7516* ====================================================================
7517*
7518* .. External Functions ..
7519 INTEGER IBTNPROCS
7520 REAL SBTRAN
7521 EXTERNAL sbtran, ibtnprocs
7522* ..
7523* .. Local Scalars ..
7524 INTEGER I, J, NPROCS, SRC
7525* ..
7526* .. Local Arrays ..
7527 INTEGER ISEED(4)
7528* ..
7529* .. Executable Statements ..
7530*
7531* ISEED's four values must be positive integers less than 4096,
7532* fourth one has to be odd. (see _LARND). Use some goofy
7533* functions to come up with seed values which together should
7534* be unique.
7535*
7536 nprocs = ibtnprocs()
7537 src = myrow * nprocs + mycol
7538 iseed(1) = mod( 1002 + testnum*5 + src*3, 4096 )
7539 iseed(2) = mod( 2027 + testnum*7 + src, 4096 )
7540 iseed(3) = mod( 1234 + testnum + src*3, 4096 )
7541 iseed(4) = mod( 4311 + testnum*10 + src*2, 4096 )
7542*
7543 DO 10 j = 1, n
7544 DO 10 i = 1, m
7545 a(i, j) = sbtran( iseed )
7546 10 CONTINUE
7547*
7548 RETURN
7549*
7550* End of SGENMAT.
7551*
real function sbtran(iseed)
Definition blacstest.f:7555
integer function ibtnprocs()
Definition btprim.f:81
Here is the caller graph for this function: