[R-pkg-devel] Examples with CPU time is greater than elapsed time.
Jiaming Yuan
jm@yu@n @end|ng |rom out|ook@com
Sat Nov 5 22:07:49 CET 2022
Thank you for the suggestions! I think I will hard-code the number of
threads to 2 in that specific example.
On 11/6/22 02:30, Ivan Krylov wrote:
> 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.
>
More information about the R-package-devel
mailing list