On Mon, 15 Jul 2019 at 12:24, Ronan GRIOT <ronan.gr...@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), ...)

Iñaki

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to