You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please ensure that you do not use more than 2 cores in your examples, vignettes, etc.
405
+
406
+
:::
407
+
408
+
409
+
CRAN checks run on big, multi-core computers, running many `R CMD check` processes in parallel. Every process is allowed to use a maximum of 2 CPU cores to exercise parallel code in examples and unit tests. When using more than 2 cores, your package will get a NOTE from CRAN checks, saying that it took more CPU time than elapsed time.
410
+
411
+
::: {.callout-note title="CRAN NOTE" icon=false}
412
+
413
+
Check: whether package can be installed, Result: NOTE\
414
+
  Installation took CPU time 6.9 times elapsed time\
415
+
\
416
+
Check: examples, Result: NOTE\
417
+
  Examples with CPU time > 2.5 times elapsed time
418
+
419
+
:::
420
+
421
+
Automatic tests will generate a NOTE if more than 2 cores are used in examples, vignettes, tests, or during installation. It’s best to provide an option for setting the number of cores in any function, with the default ideally set to fewer than 2 cores.
422
+
423
+
Something that ran as part of the installation process might have started more than two child processes (or threads) at the same time. The solution for this is specific to the build system your package is using. Many modern build systems however, can use the `-j` flag which originated from `GNU Make` (for more information, see their [manual](https://devdocs.io/gnu_make/options-summary#-j%20[jobs]){target="_blank"}).
424
+
<!-- The target="_blank" opens the link in a new tab as this is a link to a non R related resource and thus might not interest the user too much-->
0 commit comments