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

◆ zgenmat()

subroutine zgenmat ( integer  m,
integer  n,
double complex, dimension(lda,n)  a,
integer  lda,
integer  testnum,
integer  myrow,
integer  mycol 
)

Definition at line 10675 of file blacstest.f.

10676*
10677* -- BLACS tester (version 1.0) --
10678* University of Tennessee
10679* December 15, 1994
10680*
10681*
10682* .. Scalar Arguments ..
10683 INTEGER M, N, LDA, TESTNUM, MYROW, MYCOL
10684* ..
10685* .. Array Arguments ..
10686 DOUBLE COMPLEX A(LDA,N)
10687* ..
10688*
10689* Purpose
10690* =======
10691* ZGENMAT: Generates an M-by-N matrix filled with random elements.
10692*
10693* Arguments
10694* =========
10695* M (input) INTEGER
10696* The number of rows of the matrix A. M >= 0.
10697*
10698* N (input) INTEGER
10699* The number of columns of the matrix A. N >= 0.
10700*
10701* A (output) @up@(doctype) array, dimension (LDA,N)
10702* The m by n matrix A. Fortran77 (column-major) storage
10703* assumed.
10704*
10705* LDA (input) INTEGER
10706* The leading dimension of the array A. LDA >= max(1, M).
10707*
10708* TESTNUM (input) INTEGER
10709* Unique number for this test case, used as a basis for
10710* the random seeds.
10711*
10712* ====================================================================
10713*
10714* .. External Functions ..
10715 INTEGER IBTNPROCS
10716 DOUBLE COMPLEX ZBTRAN
10717 EXTERNAL zbtran, ibtnprocs
10718* ..
10719* .. Local Scalars ..
10720 INTEGER I, J, NPROCS, SRC
10721* ..
10722* .. Local Arrays ..
10723 INTEGER ISEED(4)
10724* ..
10725* .. Executable Statements ..
10726*
10727* ISEED's four values must be positive integers less than 4096,
10728* fourth one has to be odd. (see _LARND). Use some goofy
10729* functions to come up with seed values which together should
10730* be unique.
10731*
10732 nprocs = ibtnprocs()
10733 src = myrow * nprocs + mycol
10734 iseed(1) = mod( 1002 + testnum*5 + src*3, 4096 )
10735 iseed(2) = mod( 2027 + testnum*7 + src, 4096 )
10736 iseed(3) = mod( 1234 + testnum + src*3, 4096 )
10737 iseed(4) = mod( 4311 + testnum*10 + src*2, 4096 )
10738*
10739 DO 10 j = 1, n
10740 DO 10 i = 1, m
10741 a(i, j) = zbtran( iseed )
10742 10 CONTINUE
10743*
10744 RETURN
10745*
10746* End of ZGENMAT.
10747*
double complex function zbtran(iseed)
integer function ibtnprocs()
Definition btprim.f:81