[R-pkg-devel] Examples are too long in computation for CRAN

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Sun Aug 13 08:14:42 CEST 2023


В Sat, 12 Aug 2023 22:49:01 -0700
Michael Topper <miketopper123 using gmail.com> пишет:

> It appears that some of my examples/tests are taking too
> long to run for CRAN's standards.

I don't think they are running too long; I think they are too parallel.
The elapsed time is below 1s, but the "user" time (CPU time spent in
the process) is 7 to 13 times that. This suggests that your code
resulted in starting more threads than CRAN allows (up to 2 if you have
to test parallellism). Are you using OpenMP? data.table? makeCluster()?
It's simplest to always to default to a parallelism factor of 2 in
examples an tests, because determining the right number is a hard
problem. (What if the computer is busy doing something else? What if
the BLAS is already parallel enough?)

> Moreover, is there any insight as to why this would happen on the
> third update of the package rather than on the first or second?

The rule has always depended on the particular system running the
checks (five seconds on my 12-year-old ThinkPad or on my ultraportative
with an Intel Atom that had snails in its ancestry?). Maybe some
dependency of your package has updated and started creating threads
where it previously didn't.

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list