Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-30 Thread Dirk Eddelbuettel
I have some better news. While we established that 'in theory' setting the environment variable OMP_NUM_THREADS would help (and I maintain that it is a great PITA that CRAN does not do so as a general fix for this issue) it does *not help* once R is started. OpenMP only considers the variable o

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-30 Thread Helske, Jouni
From: Dirk Eddelbuettel Sent: Friday, October 27, 2023 16:28 To: Helske, Jouni Cc: Dirk Eddelbuettel ; Ivan Krylov ; r-package-devel@r-project.org ; Conrad Sanderson Subject: Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table) Hi Jouni, On 27 October 2023 at

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-27 Thread Dirk Eddelbuettel
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 a

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-27 Thread Helske, Jouni
lske, Jouni Cc: Dirk Eddelbuettel ; Ivan Krylov ; r-package-devel@r-project.org ; Conrad Sanderson Subject: Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table) Jouni, My CRANberriesFeed reports a new bssm package at CRAN, congratulations for sorting this out. [1,2] The

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-27 Thread Dirk Eddelbuettel
Jouni, My CRANberriesFeed reports a new bssm package at CRAN, congratulations for sorting this out. [1,2] The OMP_NUM_THREADS setting is indeed all it takes, and it _does_ seem to be read even from a running session: i.e. you can set this inside an R session and the OpenMP code considers it in t

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-25 Thread Helske, Jouni
: Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table) On 24 October 2023 at 08:15, Dirk Eddelbuettel wrote: | | On 24 October 2023 at 15:55, Ivan Krylov wrote: | | � Tue, 24 Oct 2023 10:37:48 + | | "Helske, Jouni" �: | | | | > Examples with CPU tim

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-25 Thread Dirk Eddelbuettel
On 24 October 2023 at 08:15, Dirk Eddelbuettel wrote: | | On 24 October 2023 at 15:55, Ivan Krylov wrote: | | В Tue, 24 Oct 2023 10:37:48 + | | "Helske, Jouni" пишет: | | | | > Examples with CPU time > 2.5 times elapsed time | | > user system elapsed ratio | | > exchange 1.196

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-24 Thread Jan van der Laan
o: Helske, Jouni Cc: r-package-devel@r-project.org Subject: Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table) В Thu, 19 Oct 2023 05:57:54 + "Helske, Jouni" пишет: But I just realised that bssm uses Armadillo via RcppArmadillo, which uses OpenMP by defaul

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-24 Thread Dirk Eddelbuettel
On 24 October 2023 at 15:55, Ivan Krylov wrote: | В Tue, 24 Oct 2023 10:37:48 + | "Helske, Jouni" пишет: | | > Examples with CPU time > 2.5 times elapsed time | > user system elapsed ratio | > exchange 1.196 0.04 0.159 7.774 | | I've downloaded the archived copy of the packag

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-24 Thread Spencer Graves
0.159 7.774 Not sure what to try next. Best, Jouni From: Ivan Krylov Sent: Friday, October 20, 2023 16:54 To: Helske, Jouni Cc: r-package-devel@r-project.org Subject: Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table) В Thu, 19 Oct 2023 05:57:54 + "H

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-24 Thread Ivan Krylov
В Tue, 24 Oct 2023 10:37:48 + "Helske, Jouni" пишет: > Examples with CPU time > 2.5 times elapsed time > user system elapsed ratio > exchange 1.196 0.04 0.159 7.774 I've downloaded the archived copy of the package from the CRAN FTP server, installed it and tried: library(bssm)

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-24 Thread Greg Hunt
sure what to try next. > > Best, > Jouni > > From: Ivan Krylov > Sent: Friday, October 20, 2023 16:54 > To: Helske, Jouni > Cc: r-package-devel@r-project.org > Subject: Re: [R-pkg-devel] Too many cores used in examples (not caused by > data.table) > >

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-24 Thread Helske, Jouni
e what to try next. Best, Jouni From: Ivan Krylov Sent: Friday, October 20, 2023 16:54 To: Helske, Jouni Cc: r-package-devel@r-project.org Subject: Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table) � Thu, 19 Oct 2023 05:57:54 + &

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-20 Thread Ivan Krylov
В Thu, 19 Oct 2023 05:57:54 + "Helske, Jouni" пишет: > But I just realised that bssm uses Armadillo via RcppArmadillo, which > uses OpenMP by default for some elementwise operations. So, I wonder > if that could be the culprit? I wasn't able to reproduce the NOTE either, despite manually set

Re: [R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-20 Thread Dirk Eddelbuettel
On 19 October 2023 at 05:57, Helske, Jouni wrote: | I am having difficulties in getting the latest version of the bssm (https://github.com/helske/bssm) package to CRAN, as the pretest issues a NOTE that the package uses too many cores in some of the examples ("Examples with CPU time > 2.5 time

[R-pkg-devel] Too many cores used in examples (not caused by data.table)

2023-10-20 Thread Helske, Jouni
Hi, I am having difficulties in getting the latest version of the bssm (https://github.com/helske/bssm) package to CRAN, as the pretest issues a NOTE that the package uses too many cores in some of the examples ("Examples with CPU time > 2.5 times elapsed time"). I've seen plenty of discussion