Diff of /man/parallel.Rd [000000] .. [858cf4] Maximize Restore

  Switch to unified view

a b/man/parallel.Rd
1
\name{parallel}
2
\alias{parallel.seeds}
3
\title{Get initial values for parallel RNGs}
4
\description{
5
  On a multi-processor system, you may wish to run parallel chains using
6
  multiple \code{jags.model} objects, each running a single chain on a
7
  separate processor.  This function returns a list of values that may
8
  be used to initialize the random number generator of each chain.
9
10
}
11
\usage{
12
parallel.seeds(factory, nchain)
13
}
14
\arguments{
15
  \item{factory}{Name of the RNG factory to use.}
16
  \item{nchain}{Number of chains for which to initialize RNGs.}
17
}
18
\value{
19
  \code{parallel.seeds} returns a list of RNG states. Each element
20
  is a list of length 2 with the following elements:
21
  \item{.RNG.name}{The name of the RNG}
22
  \item{.RNG.state}{An integer vector giving the state of the RNG.}
23
}
24
\note{
25
  It is not yet possible to make the results of \code{parallel.seeds}
26
  reproducible.  This will be fixed in a future version of JAGS.
27
}
28
\examples{
29
##The BaseRNG factory generates up to four distinct types of RNG. If
30
##more than 4 chains are requested, it will recycle the RNG types, but
31
##use different initial values
32
parallel.seeds("base::BaseRNG", 3)
33
34
## The lecuyer module provides the RngStream factory, which allows large
35
## numbers of independent parallel RNGs to be generated. 
36
load.module("lecuyer")
37
list.factories(type="rng")
38
parallel.seeds("lecuyer::RngStream", 5);
39
}
40
\author{Martyn Plummer}
41
\seealso{
42
  \code{\link{jags.model}}, section \dQuote{Random number generators},
43
  for further details on RNG initialization;
44
  \code{\link{list.factories}} to find the names of available RNG
45
  factories.
46
}
47
\keyword{models}