[R-pkg-devel] Too many processes spawned on Windows and Debian, although only 2 cores should be used

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Wed Nov 16 08:29:27 CET 2022


В Wed, 16 Nov 2022 07:29:25 +0100
Riko Kelter <riko.kelter using uni-siegen.de> пишет:

> if (nzchar(chk) && chk == "TRUE") {
>  # use 2 cores in CRAN/Travis/AppVeyor
>  num_workers <- 2L
> }

The check in parallel:::.check_ncores is a bit different:

chk <- tolower(Sys.getenv("_R_CHECK_LIMIT_CORES_", ""))
if (nzchar(chk) && (chk != "false")) # then limit the workers

Unless you actually set _R_CHECK_LIMIT_CORES_=FALSE on your machine
when running the checks, I would perform a more pessimistic check of
nzchar(chk) (without additionally checking whether it's TRUE or not
FALSE), though copy-pasting the check from parallel:::.check_ncores
should also work.

Can we see the rest of the vignette? Perhaps the problem is not with
the check. For example, a piece of code might be implicitly spawning a
new cluster, defaulting to all of the cores instead of num_workers.

> 	[[alternative HTML version deleted]]

Unfortunately, the plain text version of your message prepared by your
mailer has all the code samples mangled:
https://stat.ethz.ch/pipermail/r-package-devel/2022q4/008647.html

Please compose your messages to R mailing lists in plain text.

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list