Re: [Rcpp-devel] `checkUserInterrupt()` might not be safe if Rcout is used.

2018-07-26 Thread Wush Wu
On Fri, Jul 27, 2018 at 12:06 AM, Kevin Ushey wrote: > What environment are you executing this on? (R in terminal, or with a GUI; > which OS?) > Here is my session Info: ``` R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.4 LTS Matrix products: d

Re: [Rcpp-devel] `checkUserInterrupt()` might not be safe if Rcout is used.

2018-07-26 Thread Kevin Ushey
What environment are you executing this on? (R in terminal, or with a GUI; which OS?) One thing to be cautious of is that many R APIs in graphical environments will also call for processing of events, and this in turn can also imply a check for, and handling of, interrupts. Rprintf() is in fact on

[Rcpp-devel] `checkUserInterrupt()` might not be safe if Rcout is used.

2018-07-26 Thread Wush Wu
Hi all, I just learned the function `checkUserInterrupt` and played with it in my package today. At first, everything was good. However, I sensed something wrong when I interrupted my function and relaunched it. In my case, the thread number of OpenMP decreased to 1 after an user interruption. Ac

Re: [Rcpp-devel] Linking problem when wrapping a armadillo-based C++ library in a R package using RcppArmadillo

2018-07-26 Thread Dirk Eddelbuettel
On 26 July 2018 at 17:06, julien chiquet wrote: | Ok let's try an answer... there are several reasons. Awesome -- they are all perfectly good ones! I just wanted to make sure you were not hung up on a technicality. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __

Re: [Rcpp-devel] Linking problem when wrapping a armadillo-based C++ library in a R package using RcppArmadillo

2018-07-26 Thread julien chiquet
On Thu, Jul 26, 2018 at 3:09 PM Dirk Eddelbuettel wrote: > So can you detail why the working example from nloptr does not suffice for > you? Because Jelmer has still not released that nloptr version to CRAN? > Or > is there another reason? > Ok let's try an answer... there are several reasons.

Re: [Rcpp-devel] Linking problem when wrapping a armadillo-based C++ library in a R package using RcppArmadillo

2018-07-26 Thread Dirk Eddelbuettel
On 25 July 2018 at 21:12, julien chiquet wrote: | Great ! And no hurry. Cool. I'd love to see how this pans out. In the meantime, nloptr (at least the GitHub version) can be used well enough from R/Rcpp -- see eg https://github.com/jyypma/nloptr/issues/39 --- now I realize that the person I hel