[R-pkg-devel] Examples with CPU time is greater than elapsed time.

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Sat Nov 5 19:30:28 CET 2022


On Sat, 5 Nov 2022 22:41:45 +0800
Jiaming Yuan <jm.yuan using outlook.com> wrote:

>    Examples with CPU time > 2.5 times elapsed time

> I'm wondering what the note is trying to tell me and how can I
> resolve it with confidence.

Henrik Bengtsson already gave a good explanation of the problem.

Not sure what exactly is the right thing to do, but one way to get rid
of this warning could be to pass the argument nthread =
min(parallel::detectCores(), 2) to the xgb.cv invocation (if you
already use the parallel package anywhere) or maybe to hard-code the
use of only one thread in the example.

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list