stop("read/writeTmp should be functional (see defaults.R)")
if (WER!="end" && WER!="mix")
stop("WER takes values in {'end','mix'}")
- #concerning ncores, any non-integer type will be treated as "use parallel:detectCores()"
+ #concerning ncores, any non-integer type will be treated as "use parallel:detectCores()/4"
#1) acquire data (process curves, get as coeffs)
#TODO: for data.frame and custom function, run in parallel (connections are sequential[?!])
#2) process coeffs (by nb_series_per_chunk) and cluster them in parallel
library(parallel)
- ncores = ifelse(is.integer(ncores), ncores, parallel::detectCores())
+ ncores = ifelse(is.integer(ncores), ncores, parallel::detectCores()%/%4)
cl = parallel::makeCluster(ncores)
parallel::clusterExport(cl=cl, varlist=c("TODO:", "what", "to", "export?"), envir=environment())
#TODO: be careful of writing to a new temp file, then flush initial one, then re-use it...