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
-
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 check
processes 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.cargo
without explicit-j 2
uses all available CPUs by default [1, 2]cmake -GNinja
and thencmake --build
,ninja
will 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
-j
flag that had originated in Make:cargo
, make sure to specify-j 2
any time your package is built on CRAN.cmake --build
, also make sure to specify-j 2
at least on CRAN builds to avoid the underlying build system implicitly using all CPUs.-j
flag and make sure it doesn't exceed two at least on CRAN builds.Beta Was this translation helpful? Give feedback.
All reactions