Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-12 Thread Dirk Eddelbuettel
Hi Scott, On 13 August 2014 at 13:52, Scott Ritchie wrote: | Thanks Dirk, | | Since the original question has been answered (no there isn't a way to control | this through Armadillo or Rcpp, and the problem is unrelated), I'll go bug the One of the issue is that you start frim R when using Rcpp

Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-12 Thread Scott Ritchie
Thanks Dirk, Since the original question has been answered (no there isn't a way to control this through Armadillo or Rcpp, and the problem is unrelated), I'll go bug the r-sig-hpc mailing list if I can't find a working answer. Thanks for the additional pointers, Cheers, Scott On 12 August 20

Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-12 Thread Dirk Eddelbuettel
On 12 August 2014 at 17:09, Scott Ritchie wrote: | Well that's frustrating. | | I've tried the OpenMPController package without success, and tried to | explicitly disable BLAS in the Armadillo headers and removing the linking code | in the Makevars files. That is IMHO the wrong approach. You wan

Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-12 Thread Scott Ritchie
Well that's frustrating. I've tried the OpenMPController package without success, and tried to explicitly disable BLAS in the Armadillo headers and removing the linking code in the Makevars files. If my reading of this thread: http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2012-June/0038

Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-11 Thread Dirk Eddelbuettel
On 11 August 2014 at 19:23, Yixuan Qiu wrote: | Good point by Dirk. | | And why not just adding a line "export OPENBLAS_NUM_THREADS=1" to your .bashrc | file, or compiling OpenBlas again by setting NUM_THREADS = 1 in the | Makefile.rule? Unless you insist on it you should not need to recompile O

Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-11 Thread Dirk Eddelbuettel
On 12 August 2014 at 10:04, Scott Ritchie wrote: | Thanks Dirk and Yixuan, | | I think I'm misstating the question. | | I'm developing a package which makes use of LAPACK routines through | RcppArmadillo, and I'm handling the parallelism from within R. | | At the moment it looks like I have to

Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-11 Thread Scott Ritchie
Setting the environment variables within my Rcpp function using `putenv` also doesn't seem to have an effect. On 12 August 2014 10:04, Scott Ritchie wrote: > Thanks Dirk and Yixuan, > > I think I'm misstating the question. > > I'm developing a package which makes use of LAPACK routines through

Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-11 Thread Scott Ritchie
Thanks Dirk and Yixuan, I think I'm misstating the question. I'm developing a package which makes use of LAPACK routines through RcppArmadillo, and I'm handling the parallelism from within R. At the moment it looks like I have to write a vignette, telling the user to monitor their CPU usage with

Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-11 Thread Yixuan Qiu
Good point by Dirk. And why not just adding a line "export OPENBLAS_NUM_THREADS=1" to your .bashrc file, or compiling OpenBlas again by setting NUM_THREADS = 1 in the Makefile.rule? Best, Yixuan 2014-08-11 18:55 GMT-04:00 Dirk Eddelbuettel : > > Hi Scott, > > > On 12 August 2014 at 08:43, Sco

Re: [Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-11 Thread Dirk Eddelbuettel
Hi Scott, On 12 August 2014 at 08:43, Scott Ritchie wrote: | Hi Everyone, | | I'm having trouble with restricting the Armadillo function "svd_econ" to run on | a single thread. | | I am able to restrict it if I `export OPENBLAS_NUM_THREADS=1` before opening an | R session, but not from withi

[Rcpp-devel] RcppArmadillo BLAS/LAPACK force number of threads to 1

2014-08-11 Thread Scott Ritchie
Hi Everyone, I'm having trouble with restricting the Armadillo function "svd_econ" to run on a single thread. I am able to restrict it if I `export OPENBLAS_NUM_THREADS=1` before opening an R session, but not from within R (`Sys.setenv(OPENBLAS_NUM_THREADS=1)` has no effect). I'm wondering if th