Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/mathlibs/src/parpack/pclarnv.f
5199 views
1
c\BeginDoc
2
c
3
c\Name: pclarnv
4
c
5
c Message Passing Layer: MPI
6
c
7
c\Description:
8
c
9
c Parallel Version of ARPACK utility routine clarnv
10
c
11
c PCLARNV returns a vector of n (nloc) random Complex numbers from a uniform or
12
c normal distribution. It is assumed that X is distributed across a 1-D array
13
c of processors ( nprocs < 1000 )
14
c
15
c\Arguments
16
c COMM MPI Communicator for the processor grid
17
c
18
c IDIST (input) INTEGER
19
c Specifies the distribution of the random numbers:
20
c = 1: uniform (0,1)
21
c = 2: uniform (-1,1)
22
c = 3: normal (0,1)
23
c
24
c ISEED (input/output) INTEGER array, dimension (4)
25
c On entry, the seed of the random number generator; the array
26
c elements must be between 0 and 4095, and ISEED(4) must be
27
c odd.
28
c On exit, the seed is updated.
29
c
30
c N (input) INTEGER
31
c The number of random numbers to be generated.
32
c
33
c X (output) Complex array, dimension (N)
34
c The generated random numbers.
35
c
36
c\Author: Kristi Maschhoff
37
c
38
c\Details
39
c
40
c Simple parallel version of LAPACK auxiliary routine clarnv
41
c for X distributed across a 1-D array of processors.
42
c This routine calls the auxiliary routine CLARNV to generate random
43
c Complex numbers from a uniform or normal distribution. Output is consistent
44
c with serial version.
45
c
46
c\SCCS Information:
47
c FILE: larnv.F SID: 1.3 DATE OF SID: 04/17/99
48
c
49
c-----------------------------------------------------------------------
50
c
51
subroutine pclarnv( comm, idist, iseed, n, x )
52
c
53
integer comm
54
c ..
55
c .. Scalar Arguments ..
56
integer idist, n
57
c ..
58
c .. Array Arguments ..
59
integer iseed( 4 )
60
Complex
61
& x( * )
62
c ..
63
c .. External Subroutines ..
64
external clarnv
65
c ..
66
c .. Executable Statements ..
67
c
68
call clarnv ( idist, iseed, n, x )
69
c
70
return
71
end
72
73