Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/mathlibs/src/parpack/pslarnv.f
5213 views
1
c\BeginDoc
2
c
3
c\Name: pslarnv
4
c
5
c Message Passing Layer: MPI
6
c
7
c\Description:
8
c
9
c Parallel Version of ARPACK utility routine slarnv
10
c
11
c PSLARNV returns a vector of n (nloc) random real 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) Real 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 slarnv
41
c for X distributed across a 1-D array of processors.
42
c This routine calls the auxiliary routine SLARNV to generate random
43
c real numbers from a uniform (0,1) distribution. Output is consistent
44
c with serial version.
45
c
46
c\SCCS Information:
47
c FILE: larnv.F SID: 1.4 DATE OF SID: 04/16/99
48
c
49
c-----------------------------------------------------------------------
50
c
51
subroutine pslarnv( comm, idist, iseed, n, x )
52
c
53
include 'mpif.h'
54
c
55
c .. MPI VARIABLES AND FUNCTIONS ..
56
integer comm
57
c ..
58
c .. Scalar Arguments ..
59
integer idist, n
60
c ..
61
c .. Array Arguments ..
62
integer iseed( 4 )
63
Real
64
& x( * )
65
c ..
66
c .. External Subroutines ..
67
external slarnv
68
c ..
69
c .. Executable Statements ..
70
c
71
call slarnv ( idist, iseed, n, x )
72
c
73
return
74
end
75
76