checking whether package can be installed... NOTE Installation took CPU time x times elapsed time
#61
Closed
aitap
started this conversation in
Community Contributions
Replies: 1 comment 2 replies
-
|
Thanks for the contribution. This issue (to some extend) is already on our ToDo list. I suspect it will be added next week. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem: Your package got a NOTE saying that during installation, it took more CPU time than elapsed time.
Cause: CRAN checks run on big, multi-core computers, running many
R CMD checkprocesses in parallel. Every process is allowed to use two CPU cores to exercise parallel code in examples and unit tests (policy: "If running a package uses multiple threads/cores it must never use more than two simultaneously"). Something that ran as part of the installation process (most likely called fromsrc/Makevars*) started more than two child processes (or threads) at the same time.cargowithout explicit-j 2uses all available CPUs by default [1, 2]cmake -GNinjaand thencmake --build,ninjawill by default use all available CPUs.make -j`nproc`in its build scripts to speed up the build process.Solution: Specific to the build system your package is using, but many modern build systems use the
-jflag that had originated in Make:cargo, make sure to specify-j 2any time your package is built on CRAN.cmake --build, also make sure to specify-j 2at least on CRAN builds to avoid the underlying build system implicitly using all CPUs.-jflag and make sure it doesn't exceed two at least on CRAN builds.Beta Was this translation helpful? Give feedback.
All reactions