Open nuno-agostinho opened 8 years ago
Unfortunately, when trying to parallelise a function using the standard parallel
package in Shiny, the computer gets alarmingly slow and never completes the task at hand. I waited around 30min before stopping the execution of R.
The following instructions were tried (both with 1 and 2 cores, the result is the same):
cl <- parallel::makeCluster(getOption("cl.cores", 2))
stats <- apply(cl, psi, 1, aFunction)
parallel::stopCluster(cl)
The number of cores to use could default to 1 (for safety reasons) or maybe use 2 or 4 depending on cores available… is it possible to check available cores in R?
This should be a setting the user could modify (see #80).