[R-pkg-devel] R package submission - too many threads error
Stephen Abrams
@tephen@@br@m@ @end|ng |rom gm@||@com
Fri Feb 14 04:20:50 CET 2025
Hi - my submission was rejected with the following error in one of my
vignettes.
On Debian GNU/Linux trixie/sid:
Error: processing vignette 'modeling_with_binary_classifiers.Rmd'
failed with diagnostics:
24 simultaneous processes spawned
On Windows:
Error: processing vignette 'modeling_with_binary_classifiers.Rmd'
failed with diagnostics:
72 simultaneous processes spawned
I encountered a similar error while using R CMD check --as-cran on my local
(windows) machine and solved it by using a suggestion from this thread:
https://stackoverflow.com/questions/50571325/r-cran-check-fail-when-using-parallel-functions
Specifically, checking for Sys.getenv("_R_CHECK_LIMIT_CORES_", "") and
forcibly bypassing the parallel processing capability in the package. Is
there a better way to do this? Should I just skip the vignette altogether
and try to resolve this after the package is accepted?
For a little more detail, the package (called spect) uses the caret package
under the hood and takes advantage of parallel processing if the user
specifies it. The package is located at the github repo below. The bypass
occurs at line 378 of spect.R:
https://github.com/dawdawdo/spect
A secondary worry is that even if I resolve this, there might be something
else causing threads to spin up. How can I test for that when the error
doesn't trigger when I run R CMD check? I don't want to waste shared
resources if I can check it myself first.
Any help would be greatly appreciated. Thanks!
--
Stephen Abrams
Divergent Blue <http://www.divergentblue.com/>
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list