This is an internal function. Jobs are run in parallel both by method
and by index. Users should call the wrapper function
run_method
.
run_method_parallel(
my_methods,
dir,
model_name,
index,
out_dir,
out_loc,
socket_names,
libraries,
save_locally = TRUE
)
list of methods to be run in parallel
the directory where Model object was saved (by
generate_model
)
the Model object's name
attribute
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.
full directory to where method outputs are stored.
a length-1 character vector that gives location (relative to model's path) that method outputs are stored.This can be useful for staying organized when multiple simulations are based on the same Model and Draws objects.
(quoting from makePSOCKcluster
"either a character vector of host names on which to run the worker
copies of R, or a positive integer (in which case that number of
copies is run on localhost)."
character vector of R packages that will be needed on the slaves.
if TRUE, then files will be saved on slaves. If FALSE, they will be saved on master.