parLoadModule: Dynamically load JAGS modules on parallel workers

View source: R/parLoadModule.R

parLoadModuleR Documentation

Dynamically load JAGS modules on parallel workers

Description

A JAGS module is a dynamically loaded library that extends the functionality of JAGS. These functions load and unload JAGS modules and show the names of the currently loaded modules on parallel workers.

Usage

parLoadModule(cl, name, path, quiet=FALSE)
parUnloadModule(cl, name, quiet=FALSE)
parListModules(cl)

Arguments

cl

a cluster object created by the parallel package.

name

character, name of the module to be loaded

path

file path to the location of the DLL. If omitted, the option jags.moddir is used to locate the modules. it can be a vector of length length(cl) to set different DLL locations on each worker

quiet

a logical. If TRUE, no message will be printed about loading the module

Author(s)

Peter Solymos

See Also

list.modules, load.module, unload.module

Examples

## Not run: 
if (require(rjags)) {
cl <- makePSOCKcluster(3)
parListModules(cl)
parLoadModule(cl, "glm")
parListModules(cl)
parUnloadModule(cl, "glm")
parListModules(cl)
stopCluster(cl)
}

## End(Not run)

datacloning/dclone documentation built on July 5, 2023, 5:26 a.m.