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

2022-11-07 Thread Uwe Ligges
On 05.11.2022 15:41, Jiaming Yuan wrote: Hi all, I tried to submit an update to the xgboost package but didn't pass the pre-tests with the following note (solved the other one, but this one is a bit confusing): ``` Flavor: r-devel-linux-x86_64-debian-gcc Check: examples, Result: NOTE   E

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

2022-11-05 Thread Jiaming Yuan
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 wrote: Examples with CPU time > 2.5 times elapsed time I'm wondering what the note is trying to

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

2022-11-05 Thread Jiaming Yuan
Thank you for the detailed explanation, that's really helpful! On 11/6/22 02:22, Henrik Bengtsson wrote: I think it's because it suggests that the package uses more than 250% of CPU load on average, which suggests it runs in parallel with more than two parallel workers, which is the upper limit

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

2022-11-05 Thread Ivan Krylov
On Sat, 5 Nov 2022 22:41:45 +0800 Jiaming Yuan 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 th

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

2022-11-05 Thread Henrik Bengtsson
I think it's because it suggests that the package uses more than 250% of CPU load on average, which suggests it runs in parallel with more than two parallel workers, which is the upper limit in the CRAN Policies (https://cran.r-project.org/web/packages/policies.html); "If running a package uses mu