Hi Dirk,

Looking more closely earlier failures, vignettes have always worked fine but 
the note on tests said that the CPU time was only 2.7 times over elapsed time, 
so maybe I was just lucky this time and got under 2.5. ;) Or testthat does 
something special...

Jouni
________________________________
From: Dirk Eddelbuettel <e...@debian.org>
Sent: Friday, October 27, 2023 16:28
To: Helske, Jouni <jouni.hel...@jyu.fi>
Cc: Dirk Eddelbuettel <e...@debian.org>; Ivan Krylov <krylov.r...@gmail.com>; 
r-package-devel@r-project.org <r-package-devel@r-project.org>; Conrad Sanderson 
<conrads...@gmail.com>
Subject: Re: [R-pkg-devel] Too many cores used in examples (not caused by 
data.table)


Hi Jouni,

On 27 October 2023 at 13:02, Helske, Jouni wrote:
| Actually, the OMP_NUM_THREADS worked for vignettes and testthat tests, but
| didn't help with the examples. However, I just wrapped the problematic example

Now I am confused.

What is your understanding of why it helps in one place and not the other?

| with \donttest as for some reason this issue only happened with a single
| seemingly simple example (hence the "weird" in the earlier NEWS due to
| frustration, I changed this to the CRAN version).
|
| Thanks for reminding me about the resetting the number of cores, will fix that
| to the next version.

I have an idea for a RcppArmadillo-based helper function. We can save the
initial values of the environment variable in .onLoad and cache it. A simple
helper function pair can then dial the environment variable down and reset it
to the cached value.

Dirk

--
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

        [[alternative HTML version deleted]]

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to