-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
CRAN has a policy that limits the number of cores that can be used during package checks, and they have recently implemented a mechanism for checking compliance. Upon recent CRAN submission of one of my R packages which imports data.table, I got the following rejection message from CRAN:
Flavor: r-devel-linux-x86_64-debian-gcc
Check: examples, Result: NOTE
Examples with CPU (user + system) or elapsed time > 5s
user system elapsed
aum_line_search 12.349 0.322 1.935
aum_line_search_grid 10.033 0.308 1.781
Examples with CPU time > 2.5 times elapsed time
user system elapsed ratio
aum_line_search 12.349 0.322 1.935 6.548
aum_line_search_grid 10.033 0.308 1.781 5.806
aum_diffs_penalty 4.730 0.169 1.635 2.996
These messages can be suppressed by adding data.table::setDTthreads(1) at the start of each example.
Is there another/recommended way to avoid using too many cores when checking a CRAN package which uses data.table? The default number of threads in data.table is max cores/2 which is over the CRAN limit (max 2 cores I believe).
Also is there documentation about this somewhere? Probably would be good to mention in the datatable-importing vignette.
Reactions are currently unavailable