Sets up parallel processing lapply function for Windows, Mac OS or Linux.
Usage
create.parallel.lapply(
asp,
exports,
parallel = TRUE,
threads = NULL,
export.env = parent.frame(),
dev.mode = FALSE,
package.path = NULL,
allow.mclapply.mac = FALSE
)Arguments
- asp
The AutoSpectral parameter list.
- exports
The vector of variables and functions to pass to the clusters.
- parallel
Logical, controls whether parallel processing is used. Default is
TRUE.- threads
Numeric, number of threads to use for parallel processing. Default is
NULLwhich will revert toasp$worker.process.nifparallel=TRUE.- export.env
The environment containing other functions and global variables potentially needed by the clusters. Default is
parent.frame().- dev.mode
Logical, allows testing of function while in development. Default is
FALSE.- package.path
File.path to the R package files for AutoSpectral to permit loading of the functions via
devtools::load_all()while indev.mode. Default isNULL.- allow.mclapply.mac
Logical, if
TRUEpermitsmclapply()forking on Mac OS. DefaultFALSEforces PSOCK cluster use on Mac to prevent multithreaded Accelerate BLAS from crashing parallels when matrix ops are used.