simulate_parallel {simulator} | R Documentation |
Simulate from a model in parallel.
Description
This is an internal function. Draws are done in chunks labeled
by indices and of size determined by nsim. Users should call the wrapper
function simulate_from_model
.
Usage
simulate_parallel(
model_ref,
nsim,
index,
seeds,
socket_names,
libraries,
save_locally = TRUE
)
Arguments
model_ref |
object of class |
nsim |
number of simulations to be conducted on each chunk. Vector of
same length as |
index |
a vector of positive integer indices. Allows simulations to be carried out in chunks. Each chunk gets a separate RNG stream, meaning that the results will be identical whether we run these in parallel or sequentially. |
seeds |
a list of |
socket_names |
(quoting from |
libraries |
character vector of R packages that will be needed on the slaves. |
save_locally |
if TRUE, then files will be saved on slaves. If FALSE, they will be saved on master. |