[R-pkg-devel] Fwd: package submission: parallel problem
|uc@r @end|ng |rom |edor@project@org
Mon Jul 15 12:47:04 CEST 2019
On Mon, 15 Jul 2019 at 12:24, Ronan GRIOT <ronan.griot using gmail.com> wrote:
> Dear R developpers,
> I submitted a package involving some parallel functions.
> I received this error message:
> Error in .check_ncores(length(names)) : 30 simultaneous processes spawned
> I read that CRAN only pass the test if 2 cores are used.
> However, in my function, I use this command line:
> parallel::makeCluster(parallel::detectCores() - 2)
> I try to fit the power of each computer by allowing all the cores except 2
> (to keep other software running).
> My question is: What I have to do? Limiting the number of cores at 2 to
> pass the CRAN requirements? Or let "detectCores() - 2" to allow for more
> cores for multi-cores computer but add a restriction to pass the tests?
By *default*, the number of cores should be 2 at most, as you said.
But this doesn't mean that you cannot allow the user to change that
option to increase them.
See, e.g., what parallel::makeForkCluster does:
function (nnodes = getOption("mc.cores", 2L), ...)
More information about the R-package-devel