Re: [Rcpp-devel] RcppArmadillo with -fopenmp: Not using all available cores

2024-03-02 Thread Dirk Eddelbuettel
Hi Robin, On 2 March 2024 at 16:34, Robin Liu wrote: | sessionInfo() was the right clue. Indeed the version of R on machine B was not | linked to OpenBLAS. Switching to a version with OpenBLAS allows the test code | to use all cores. | | A clear way to check which library is linked is to run the

Re: [Rcpp-devel] RcppArmadillo with -fopenmp: Not using all available cores

2024-03-02 Thread Robin Liu
Hi Dirk, sessionInfo() was the right clue. Indeed the version of R on machine B was not linked to OpenBLAS. Switching to a version with OpenBLAS allows the test code to use all cores. A clear way to check which library is linked is to run the following: > extSoftVersion()["BLAS"] Thanks for you

Re: [Rcpp-devel] RcppArmadillo with -fopenmp: Not using all available cores

2024-02-24 Thread Dirk Eddelbuettel
On 24 February 2024 at 11:44, Robin Liu wrote: | Thank you Dirk for the response. | | I called RcppArmadillo::armadillo_get_number_of_omp_threads() on both machines | and correctly see that machine A and B have 20 and 40 cores, respectively. I | also see that calling the setter changes this value

Re: [Rcpp-devel] RcppArmadillo with -fopenmp: Not using all available cores

2024-02-24 Thread Robin Liu
Thank you Dirk for the response. I called RcppArmadillo::armadillo_get_number_of_omp_threads() on both machines and correctly see that machine A and B have 20 and 40 cores, respectively. I also see that calling the setter changes this value. However, calling the setter does not seem to change the

Re: [Rcpp-devel] RcppArmadillo with -fopenmp: Not using all available cores

2024-02-23 Thread Dirk Eddelbuettel
On 23 February 2024 at 09:35, Robin Liu wrote: | Hi all, | | Here is an R script that uses Armadillo to decompose a large matrix and print | the first 10 eigenvalues. | | library(RcppArmadillo) | library(Rcpp) | | src <- | r"(#include | | // [[Rcpp::depends(RcppArmadillo)]] | | // [[Rcpp::e

[Rcpp-devel] RcppArmadillo with -fopenmp: Not using all available cores

2024-02-23 Thread Robin Liu
Hi all, Here is an R script that uses Armadillo to decompose a large matrix and print the first 10 eigenvalues. library(RcppArmadillo) library(Rcpp) src <- r"(#include // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] arma::vec getEigenValues(arma::mat M) { return arma::eig_sym(M); })

[Rcpp-devel] RcppArmadillo 0.10.8.0.0

2022-01-02 Thread Dirk Eddelbuettel
Happy New Year to all! Conrad released version 10.8 Armadillo (and I had prepared two pre-releases which passed reverse dependency checks just fine so not expecting surprises). Given that 0.10.7.5.0, the final RcppRelease for the 10.7.* series with his last release 10.7.5, only got to CRAN on De

[Rcpp-devel] RcppArmadillo 0.8.400.0.0

2018-02-21 Thread Dirk Eddelbuettel
I uploaded RcppArmadillo to CRAN 2 1/2 days ago --- but just like every now and so often it just sits there, and nobody cares to tell us what, if anything, is holding it up. So I put it into the Rcpp drat repo from where you can install the usual way, if you're so inclined: drat:::add("RcppCo

[Rcpp-devel] RcppArmadillo 0.8.399.0.0 off Armadillo 8.400.rc1

2018-02-10 Thread Dirk Eddelbuettel
Conrad released a first release candidate for Armadillo 8.400. I wrapped this up as 0.8.399.0.0 (so that R's version sorting can allow later 0.8.400.* releases) and put it into the rcpp-drat at https://rcppcore.github.io/drat/ Via drat:::add("RcppCore") install.packages("RcppArmadillo") you

Re: [Rcpp-devel] RcppArmadillo build failures

2017-10-29 Thread Dirk Eddelbuettel
On 27 October 2017 at 08:11, Dirk Eddelbuettel wrote: | | We have two recent build failures reports at GitHub: | | https://github.com/RcppCore/RcppArmadillo/issues/177 | https://github.com/RcppCore/RcppArmadillo/issues/185 | | I don't understand what is going on as this just builds fine on my s

[Rcpp-devel] RcppArmadillo build failures

2017-10-27 Thread Dirk Eddelbuettel
We have two recent build failures reports at GitHub: https://github.com/RcppCore/RcppArmadillo/issues/177 https://github.com/RcppCore/RcppArmadillo/issues/185 I don't understand what is going on as this just builds fine on my systems. We test for a sufficient compiler, use C++11 and expect OpenM

Re: [Rcpp-devel] RcppArmadillo Mat_meat.hpp:4467 and arma_static_check.hpp:31 errors

2017-07-25 Thread Dirk Eddelbuettel
On 25 July 2017 at 12:56, Patrick Veenstra wrote: | My apologies! I mistook what the code in those files were for. It seemed to | be completely separate from my code. So I thought it was something about my | environment. But in the process of setting up a reproducible example, I | found that actua

Re: [Rcpp-devel] RcppArmadillo Mat_meat.hpp:4467 and arma_static_check.hpp:31 errors

2017-07-25 Thread Patrick Veenstra
My apologies! I mistook what the code in those files were for. It seemed to be completely separate from my code. So I thought it was something about my environment. But in the process of setting up a reproducible example, I found that actually it was something in my own code. An accidental assignme

Re: [Rcpp-devel] RcppArmadillo Mat_meat.hpp:4467 and arma_static_check.hpp:31 errors

2017-07-24 Thread Dirk Eddelbuettel
Please provide a minimal yet reproducible example. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | [email protected] ___ Rcpp-devel mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/r

Re: [Rcpp-devel] RcppArmadillo Mat_meat.hpp:4467 and arma_static_check.hpp:31 errors

2017-07-24 Thread Patrick Veenstra
Correction, Armadillo version: 7.900.2 On 24 July 2017 at 19:09, Patrick Veenstra wrote: > When attempting to compile a cpp function that uses RcppArmadillo (in > RStudio), I get the following two errors from files provided by > RcppArmadillo: > > Error 1: In ~/RLibs/RcppArmadillo/include/armadi

[Rcpp-devel] RcppArmadillo Mat_meat.hpp:4467 and arma_static_check.hpp:31 errors

2017-07-24 Thread Patrick Veenstra
When attempting to compile a cpp function that uses RcppArmadillo (in RStudio), I get the following two errors from files provided by RcppArmadillo: Error 1: In ~/RLibs/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp line 4467: no matching function for call to ‘arma::Gen, arma::gen_zeros>::appl

Re: [Rcpp-devel] [RcppArmadillo] Result of Rcpp Wrap() for Sparse Matrix

2017-06-15 Thread Serguei Sokol
Le 14/06/2017 à 16:06, Serguei Sokol a écrit : Le 14/06/2017 à 15:21, Douglas Bates a écrit : ... That is the format of the dgTMatrix class from the Matrix package for R but not, as far as I can tell, in Armadillo. A brief glance at the Armadillo documentation indicates that sparse matrices a

Re: [Rcpp-devel] [RcppArmadillo] Result of Rcpp Wrap() for Sparse Matrix

2017-06-14 Thread Serguei Sokol
Le 14/06/2017 à 17:33, Douglas Bates a écrit : On Wed, Jun 14, 2017 at 9:06 AM Serguei Sokol mailto:[email protected]>> wrote: Le 14/06/2017 à 15:21, Douglas Bates a écrit : > > > On Wed, Jun 14, 2017 at 3:59 AM Serguei Sokol mailto:[email protected]>

Re: [Rcpp-devel] [RcppArmadillo] Result of Rcpp Wrap() for Sparse Matrix

2017-06-14 Thread Douglas Bates
On Wed, Jun 14, 2017 at 9:06 AM Serguei Sokol wrote: > Le 14/06/2017 à 15:21, Douglas Bates a écrit : > > > > > > On Wed, Jun 14, 2017 at 3:59 AM Serguei Sokol > wrote: > > > > Le 13/06/2017 à 18:24, Douglas Bates a écrit : > > > On Tue, Jun 13, 2017 at 1

Re: [Rcpp-devel] [RcppArmadillo] Result of Rcpp Wrap() for Sparse Matrix

2017-06-14 Thread Serguei Sokol
Le 14/06/2017 à 15:21, Douglas Bates a écrit : On Wed, Jun 14, 2017 at 3:59 AM Serguei Sokol mailto:[email protected]>> wrote: Le 13/06/2017 à 18:24, Douglas Bates a écrit : > On Tue, Jun 13, 2017 at 10:56 AM Binxiang Ni mailto:[email protected]>

Re: [Rcpp-devel] [RcppArmadillo] Result of Rcpp Wrap() for Sparse Matrix

2017-06-14 Thread Dirk Eddelbuettel
On 14 June 2017 at 11:00, Serguei Sokol wrote: | Le 13/06/2017 à 18:24, Douglas Bates a écrit : | > On Tue, Jun 13, 2017 at 10:56 AM Binxiang Ni mailto:[email protected]>> wrote: | > | > Hi, | > | > I am working on fixing sparse matrix conversion for RcppArmadillo. Now a problem come

Re: [Rcpp-devel] [RcppArmadillo] Result of Rcpp Wrap() for Sparse Matrix

2017-06-14 Thread Douglas Bates
On Wed, Jun 14, 2017 at 3:59 AM Serguei Sokol wrote: > Le 13/06/2017 à 18:24, Douglas Bates a écrit : > > On Tue, Jun 13, 2017 at 10:56 AM Binxiang Ni > wrote: > > > > Hi, > > > > I am working on fixing sparse matrix conversion for RcppArmadillo. > Now a prob

Re: [Rcpp-devel] [RcppArmadillo] Result of Rcpp Wrap() for Sparse Matrix

2017-06-14 Thread Serguei Sokol
Le 13/06/2017 à 18:24, Douglas Bates a écrit : On Tue, Jun 13, 2017 at 10:56 AM Binxiang Ni mailto:[email protected]>> wrote: Hi, I am working on fixing sparse matrix conversion for RcppArmadillo. Now a problem comes up to me: what kind of sparse matrix is expected to pass from

Re: [Rcpp-devel] [RcppArmadillo] Result of Rcpp Wrap() for Sparse Matrix

2017-06-13 Thread Douglas Bates
On Tue, Jun 13, 2017 at 10:56 AM Binxiang Ni wrote: > Hi, > > I am working on fixing sparse matrix conversion for RcppArmadillo. Now a > problem comes up to me: what kind of sparse matrix is expected to pass from > Armadillo to R? That is, what should the result of wrap() be? dgCMatrix(if > logic

[Rcpp-devel] [RcppArmadillo] Result of Rcpp Wrap() for Sparse Matrix

2017-06-13 Thread Binxiang Ni
Hi, I am working on fixing sparse matrix conversion for RcppArmadillo. Now a problem comes up to me: what kind of sparse matrix is expected to pass from Armadillo to R? That is, what should the result of wrap() be? dgCMatrix(if logical, lgCMatrix or ngCMatrix) or their original type? If you are

[Rcpp-devel] RcppArmadillo release (candidate) 0.7.900.1.0

2017-05-17 Thread Dirk Eddelbuettel
A new RcppArmadillo 0.7.900.1.0 release is in the rcpp drat repo as a candidate for a subsequent CRAN release. Please test it if you use RcppArmadillo more than casually. It has gone through a few complete reverse-depends checks and work as expected in almost all cases. Two packages no longer i

Re: [Rcpp-devel] RcppArmadillo::sample() multiple definition error

2016-04-28 Thread Dirk Eddelbuettel
On 28 April 2016 at 03:10, Subodh Acharya wrote: | Hello,  | I know this was once fixed in the RcppArmadillo, | As discussed here | | http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2013-August/006364.html | | But when I tried to compile my package today, that error showed up again. I |

[Rcpp-devel] RcppArmadillo::sample() multiple definition error

2016-04-27 Thread Subodh Acharya
Hello, I know this was once fixed in the RcppArmadillo, As discussed here http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2013-August/006364.html But when I tried to compile my package today, that error showed up again. I appreciate any insight/suggestion on solving this. Thanks Subodh

Re: [Rcpp-devel] RcppArmadillo, solve always requires zgels?

2015-05-31 Thread Baptiste Auguie
Hi, I attach a minimal sourceCpp file: Rcpp::sourceCpp('testzgels.cpp') provides extra debugging info, and shows my complete lack of understanding of c++ templates. It would appear that upon compilation, all cases (nrow == ncol, nrow > ncol, nrow < ncol) are considered (of course: the matrix A h

Re: [Rcpp-devel] RcppArmadillo, solve always requires zgels?

2015-05-31 Thread Dirk Eddelbuettel
On 1 June 2015 at 09:06, Baptiste Auguie wrote: | Hi, | | Thanks Dirk for your suggestions. Let me try to clarify a few things below. | Basically, | | - zgels should not be needed (probably, and if I was doing things correctly) | | - I believe the template mechanism is simply unaware of the squ

Re: [Rcpp-devel] RcppArmadillo, solve always requires zgels?

2015-05-31 Thread Baptiste Auguie
Hi, Thanks Dirk for your suggestions. Let me try to clarify a few things below. Basically, - zgels should not be needed (probably, and if I was doing things correctly) - I believe the template mechanism is simply unaware of the square format of my matrix, and defaults to the nrow < ncol case for

Re: [Rcpp-devel] RcppArmadillo, solve always requires zgels?

2015-05-31 Thread Dirk Eddelbuettel
Hi Baptiste, On 31 May 2015 at 20:47, Baptiste Auguie wrote: | Dear list, | | My cda package (https://github.com/baptiste/cda) solves a linear system Ax=b | with Armadillo; win-builder and CRAN complain about a missing "zgels_" when | trying to build on windows or mac, as it's not part of the su

[Rcpp-devel] RcppArmadillo, solve always requires zgels?

2015-05-31 Thread Baptiste Auguie
Dear list, My cda package (https://github.com/baptiste/cda) solves a linear system Ax=b with Armadillo; win-builder and CRAN complain about a missing "zgels_" when trying to build on windows or mac, as it's not part of the subset of LAPACK provided by R libraries (I asked about this in 2011). I ha

Re: [Rcpp-devel] RcppArmadillo test release

2015-05-12 Thread Dirk Eddelbuettel
On 9 May 2015 at 10:36, Dirk Eddelbuettel wrote: | | There is a test-release [0] of RcppArmadillo 0.5.100.2 available [1] in the | Rcpp drat repo. If you would to help test it do | |drat::addRepo("RcppCore") # maybe after install.packages("drat") |update.packages() | | or use a

[Rcpp-devel] RcppArmadillo test release

2015-05-09 Thread Dirk Eddelbuettel
There is a test-release [0] of RcppArmadillo 0.5.100.2 available [1] in the Rcpp drat repo. If you would to help test it do drat::addRepo("RcppCore") # maybe after install.packages("drat") update.packages() or use an explicit install.packages() pointing to the long-form URL via

[Rcpp-devel] RcppArmadillo preview release

2015-04-04 Thread Dirk Eddelbuettel
Conrad is aiming to release verion 5.000 of Armadillo next week and has cut a prerelease 4.999.preview1 (in his SVN). Now, the release will be better with more testing so I rolled this into a pre-release 0.4.999.1.0 of RcppArmadillo which is now in GitHub branch. I am currently running a full che

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-25 Thread Charles Determan Jr
William, To close this point on the use of Rdefines.h on the list it was my oversight to include all the R header files. I have now removed them. I initially only retained those headers as the initial package contained them. I was unaware that Rcpp includes the necessary components and I can us

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-25 Thread William Dunlap
Why do you include "Rdefines.h" in your Rcpp code? It contains errors (e.g., it leaves the initial Rf_ off of the length function). Also, in my opinion, it is obsolete, especially for Rcpp code, since it is for writing code that works in R and S (including S+) and Rcpp will never work in S+. Bil

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-25 Thread Dirk Eddelbuettel
On 25 February 2015 at 09:26, Charles Determan Jr wrote: | I have finally solved the problem.  After coming across another posting http:// | r.789695.n4.nabble.com/rtools-fstream-error-td4702713.html I discovered the | problem.  I needed to include #define R_NO_REMAP at the start of my file and |

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-25 Thread Charles Determan Jr
I have finally solved the problem. After coming across another posting http://r.789695.n4.nabble.com/rtools-fstream-error-td4702713.html I discovered the problem. I needed to include #define R_NO_REMAP at the start of my file and then append Rf_ to any function I use from Rdefines.h. The package

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-25 Thread Charles Determan Jr
My apologies, I should have just did this from the start. I thought it may be something simple. I create a git repo to access the stripped down package (just the first cpp function and a simple R function). If you clone it with: git clone https://github.com/cdeterman/test.git And try to build

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-24 Thread Dirk Eddelbuettel
Hi Charles, I understand this is frustrating for you but we are wasting everybody's time here. Can you please prepare a minimally reproducible example? Also, maybe try some bisection. Does the problem go away after you remove bigmemory/bigalgebra? Dirk -- http://dirk.eddelbuettel.com | @edde

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-24 Thread Charles Determan Jr
Adding the #ifdef test removes the error with INT but I don't follow if you are suggesting something else for the #ifdef test? I sadly continue to see the same "length" errors once I fix the INT error in the BigMatrix.h file. Current headers: #ifdef REFBLAS #include "refblas64longlong.h" #define

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-24 Thread Dirk Eddelbuettel
On 24 February 2015 at 15:06, Charles Determan Jr wrote: | Unfortunately I get the same errors with #include last as | well as #include "bigmemory/BigMatrix.h" next to last.  The latter results in | additional errors in BigMatrix.h with the expansion of INT.  Both scenarios | still have "length p

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-24 Thread Charles Determan Jr
Unfortunately I get the same errors with #include last as well as #include "bigmemory/BigMatrix.h" next to last. The latter results in additional errors in BigMatrix.h with the expansion of INT. Both scenarios still have "length passed 4 arguments" errors. On Tue, Feb 24, 2015 at 2:51 PM, Dirk

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-24 Thread Dirk Eddelbuettel
On 24 February 2015 at 14:41, Charles Determan Jr wrote: | Thank you for that clarification, I always seem to forget that Rcpp packages | have many libraries loaded by default.  I have trimmed the headers down to the | following to just  | | #include | | However, some further background, I am w

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-24 Thread Charles Determan Jr
Thank you for that clarification, I always seem to forget that Rcpp packages have many libraries loaded by default. I have trimmed the headers down to the following to just #include However, some further background, I am working on extending the bigalgebra package (hence the interest in RcppArm

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-24 Thread William Dunlap
Do you really need the macros like GET_LENGTH that are defined in #include ? It looks like they are meant to ease porting of C code written for S or S+, but very little code these days is written for S or S+ and certainly not Rcpp code. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Fe

Re: [Rcpp-devel] RcppArmadillo and Rdefines

2015-02-24 Thread Dirk Eddelbuettel
On 24 February 2015 at 12:30, Charles Determan Jr wrote: | Greetings, | | I have run in to an error when compiling an R package that has the following | headers in the only cpp file at the moment: | | #include | #include | #include | | #define R_NO_REMAP | | #include | #include | #include

[Rcpp-devel] RcppArmadillo and Rdefines

2015-02-24 Thread Charles Determan Jr
Greetings, I have run in to an error when compiling an R package that has the following headers in the only cpp file at the moment: #include #include #include #define R_NO_REMAP #include #include #include Now, I am also trying to use RcppArmadillo with: #include // [[Rcpp::depends(Rcpp

Re: [Rcpp-devel] RcppArmadillo generates warning with arma_rng::set_seed_random()

2015-02-20 Thread Dirk Eddelbuettel
On 20 February 2015 at 13:14, terrance savitsky wrote: | When using - arma_rng::set_seed_random(), | to initialize the RNG in RcppArmadillo, the following warning is generated, | | When called from R, the RNG seed has to be set at the R level via set.seed() | | | This warning seems appropriate

[Rcpp-devel] RcppArmadillo generates warning with arma_rng::set_seed_random()

2015-02-20 Thread terrance savitsky
When using - arma_rng::set_seed_random(), to initialize the RNG in RcppArmadillo, the following warning is generated, When called from R, the RNG seed has to be set at the R level via set.seed() This warning seems appropriate when using set_seed(), but not set_seed_random() since setting a rando

Re: [Rcpp-devel] RcppArmadillo release candidate 0.4.599.1.0

2014-12-25 Thread Dirk Eddelbuettel
On 23 December 2014 at 13:16, Dirk Eddelbuettel wrote: | | Conrad is nearing an Armadillo 4.600 release, and provided a 4.599.alpha.1 | candiate which I wrapped up as 0.4.599.1.0 -- after testing on the 101 CRAN | dependents. All good. | | So if you're bored over the holidays, feel free to play

[Rcpp-devel] RcppArmadillo release candidate 0.599.1.0

2014-12-23 Thread Dirk Eddelbuettel
Conrad is nearing an Armadillo 4.600 release, and provided a 4.599.alpha.1 candiate which I wrapped up as 0.4.599.1.0 -- after testing on the 101 CRAN dependents. All good. So if you're bored over the holidays, feel free to play with this. Release probably coming just before the end of the year.

Re: [Rcpp-devel] RcppArmadillo compilation failure

2014-11-13 Thread Dirk Eddelbuettel
On 13 November 2014 at 13:24, Jon Clayden wrote: | Dear all, | | After recently updating to OS X 10.10, "Yosemite", and recompiling R | 3.1.2, I'm reinstalling various packages, but running into trouble | with RcppArmadillo. | | I configured R with | | ./configure --with-blas="-framework Accele

[Rcpp-devel] RcppArmadillo compilation failure

2014-11-13 Thread Jon Clayden
Dear all, After recently updating to OS X 10.10, "Yosemite", and recompiling R 3.1.2, I'm reinstalling various packages, but running into trouble with RcppArmadillo. I configured R with ./configure --with-blas="-framework Accelerate" --with-lapack --enable-memory-profiling --with-system-zlib --w

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

[Rcpp-devel] RcppArmadillo pre-release at Github

2014-02-25 Thread Dirk Eddelbuettel
Conrad aims to release Armadillo 4.100 next week. He suggested that I prepare a pre-release of RcppArmadillo based on the current snapshot. This is now in Github (https://github.com/RcppCore/RcppArmadillo). I started this off in a branch which I since merged as all tests passed fine. As this is

Re: [Rcpp-devel] RcppArmadillo: Linking to OpenBLAS under Windows

2014-02-06 Thread Avraham Adler
On Thu, Feb 6, 2014 at 10:09 PM, Dirk Eddelbuettel wrote: > > RcppArmadillo uses whatever R uses. If you tell R to use different BLAS + > LAPACK, then RcppArmadillo will use then. Great! Unfortunately, under Windows, there is no "easy" way to feed in a different LAPACK as there is a BLAS (by foo

Re: [Rcpp-devel] RcppArmadillo: Linking to OpenBLAS under Windows

2014-02-06 Thread Dirk Eddelbuettel
On 6 February 2014 at 18:08, Avraham Adler wrote: | If I have compiled my installation of R linking to OpenBLAS so that Rblas.dll | is fast and not reference, if I install RcppArmadillo from source, will it take | advantage of that Fast Blas? RcppArmadillo uses whatever R uses. If you tell R to

Re: [Rcpp-devel] RcppArmadillo: Linking to OpenBLAS under Windows

2014-02-06 Thread Kevin Ushey
Hi Avraham, IIUC, when you install / compile RcppArmadillo, it sets the BLAS, LAPACK linker arguments based on the results of R CMD config BLAS_LIBS R CMD config LAPACK_LIBS So if you've compiled R using OpenBLAS, RcppArmadillo should also be using OpenBLAS. You can check R CMD config BL

[Rcpp-devel] RcppArmadillo: Linking to OpenBLAS under Windows

2014-02-06 Thread Avraham Adler
If I have compiled my installation of R linking to OpenBLAS so that Rblas.dll is fast and not reference, if I install RcppArmadillo from source, will it take advantage of that Fast Blas? Thank you, Avraham ___ Rcpp-devel mailing list [email protected]

[Rcpp-devel] RcppArmadillo: Solving triangular system using trimatu

2014-02-06 Thread Søren Højsgaard
Dear all, Consider solving Ax=b. According to the Armadillo docs it is so that if we know that A is upper triangular then declaring this should lead to a faster solution, i.e. (my understanding) solve( trimatu(A), b ) should be faster than solve( A, b ) My limited experience is that th

Re: [Rcpp-devel] RcppArmadillo test release available

2013-12-05 Thread Dirk Eddelbuettel
On 3 December 2013 at 05:32, Dirk Eddelbuettel wrote: | | Conrad is getting ready for a new release 3.930 and prepared a first beta | release -- from http://arma.sf.net : | | 2013-12-03 Version 3.929.beta1 (test release) | | added size() based specifications of submatrix view sizes | a

[Rcpp-devel] RcppArmadillo test release available

2013-12-03 Thread Dirk Eddelbuettel
Conrad is getting ready for a new release 3.930 and prepared a first beta release -- from http://arma.sf.net : 2013-12-03 Version 3.929.beta1 (test release) added size() based specifications of submatrix view sizes added element-wise variants of min() and max() added divide-and-conque

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread Steven Varga
t;> Gesendet über den BlackBerry® Service von E-Plus. >> >> -Original Message- >> From: Steven Varga >> Sender: [email protected]: Mon, 25 Nov >> 2013 23:23:24 >> To: >> Reply-To: [email protected] >>

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread Steven Varga
23:23:24 > To: > Reply-To: [email protected] > Subject: Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary > memory > > ___ > Rcpp-devel mailing list > [email protected]

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread Steven Varga
Thanks a lot again; I will look at the views and see how that works out. The matrix size is not modified inside of a layer but the content only (gradient) while the optimizer outside of the instances modifies the weight matrix accoding to gradients. Storing all layers gradients and weights at one

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread Dirk Eddelbuettel
Hi Steven On 25 November 2013 at 23:23, Steven Varga wrote: | Thank you Dirk for the quick response; | and for noting the memory handling. | | I am aware of it and there are other ways of obtaining a pointer to some memory | location. I used malloc/free to put focus on arma::mat copying data du

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread szehnder
fast. Best Simon Gesendet über den BlackBerry® Service von E-Plus. -Original Message- From: Steven Varga Sender: [email protected]: Mon, 25 Nov 2013 23:23:24 To: Reply-To: [email protected] Subject: Re: [Rcpp-devel] RcppArmadillo matrix with writ

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-25 Thread Steven Varga
Thank you Dirk for the quick response; and for noting the memory handling. I am aware of it and there are other ways of obtaining a pointer to some memory location. I used malloc/free to put focus on arma::mat copying data during assignment and/or not able to use reference as class member. Leaving

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-25 Thread Dirk Eddelbuettel
Steven, In a case like this I would try to set up a fist minimal working example using just plain C++, and no R. Once that works, try it with R. For Armadillo, the docs at http://arma.sourceforge.net/docs.html#Mat are your best shot. I presume you saw what it says about strict=true. Also, in

[Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-25 Thread Steven Varga
Hello, I am having trouble creating arma::mat with external writeable auxiliary memory as class member; ie: struct Example { Example( double *ptr ){ // . see provided minimal working example } arma::mat ExtPtr; // this is what I would like to have } What is it that I am doing wron

Re: [Rcpp-devel] RcppArmadillo Memory Leak?

2013-11-20 Thread Dirk Eddelbuettel
On 20 November 2013 at 19:24, Alessandro Vitale wrote: | I've done the new test (dense matrix with just Rcpp NumericMatrix, no RcppArmadillo) and in this case there is no leak. | | This is the code I used | | // [[Rcpp::export]] | NumericMatrix dense_numericMatrix(NumericMatrix A){ | A(0,0

Re: [Rcpp-devel] RcppArmadillo Memory Leak?

2013-11-20 Thread Alessandro Vitale
I've done the new test (dense matrix with just Rcpp NumericMatrix, no RcppArmadillo) and in this case there is no leak. This is the code I used // [[Rcpp::export]] NumericMatrix dense_numericMatrix(NumericMatrix A){ A(0,0) = 1; A(1,0) = 2; return A ; } testMatrix <- matrix(data=0,

Re: [Rcpp-devel] RcppArmadillo Memory Leak?

2013-11-20 Thread Dirk Eddelbuettel
On 18 November 2013 at 18:16, Alessandro Vitale wrote: | Dirk, I've run the code a couple times with valgrind, one time calling sparse 5 times, the other calling sparse 10 times. | Below is the main code and valgrind output. | What do you think, could it be an Armadillo / RcppArmadillo leak? Cou

Re: [Rcpp-devel] RcppArmadillo Memory Leak?

2013-11-18 Thread Alessandro Vitale
Dirk, I've run the code a couple times with valgrind, one time calling sparse 5 times, the other calling sparse 10 times. Below is the main code and valgrind output. What do you think, could it be an Armadillo / RcppArmadillo leak? testMatrix <- Matrix(data=0,nrow=1e7,ncol=1e7,sparse=TRUE) for(

Re: [Rcpp-devel] RcppArmadillo Memory Leak?

2013-11-18 Thread Alessandro Vitale
Thanks Dirk and Hadley. Dirk, asap I will try your b) and c) suggestions. While for suggestion a), I didn't really understand how to implement it. Hadley, I am determining rsession process memory looking at osx activity monitor utility, under Real Mem column. This is what I get (I am using your

Re: [Rcpp-devel] RcppArmadillo Memory Leak?

2013-11-18 Thread Hadley Wickham
> After every call, the memory from gc() is stable, while rsession process > memory keeps growing of around 100Mb at each call and doesn't decrease after > the garbage collection. You don't mention how you're determining the size of the rsession process, but you shouldn't necessarily expect it to

Re: [Rcpp-devel] RcppArmadillo Memory Leak?

2013-11-18 Thread Dirk Eddelbuettel
On 18 November 2013 at 12:41, Alessandro Vitale wrote: | Hi, | | I was trying RcppArmadillo sparse matrix and found an odd memory behavior. | | I used this code from Romain http://stackoverflow.com/questions/18336021/ | sparse-matrix-conversion-from-matrix-to-armadillo-with-rcpparmadilloextensi

[Rcpp-devel] RcppArmadillo Memory Leak?

2013-11-18 Thread Alessandro Vitale
Hi, I was trying RcppArmadillo sparse matrix and found an odd memory behavior. I used this code from Romain http://stackoverflow.com/questions/18336021/sparse-matrix-conversion-from-matrix-to-armadillo-with-rcpparmadilloextensions-s and added the first line to manage large matrices #define AR

Re: [Rcpp-devel] RcppArmadillo and the version of Rcpp

2013-11-08 Thread Dirk Eddelbuettel
On 8 November 2013 at 11:04, Weldon, Mat wrote: | If it helps, I recently had similar problems. In the end I realised that I needed to update my installation of R to 3.0.2 to get RcppArmadillo to work. Update R, then update Rcpp, then RcppArmadillo should install from CRAN no problem. We gener

Re: [Rcpp-devel] RcppArmadillo and the version of Rcpp

2013-11-08 Thread Weldon, Mat
- Message: 1 Date: Fri, 8 Nov 2013 07:14:39 + From: Greg Distiller To: "[email protected]" Subject: Re: [Rcpp-devel] RcppArmadillo and the version of Rcpp Message-ID: <[email protected]

Re: [Rcpp-devel] RcppArmadillo and the version of Rcpp

2013-11-07 Thread Romain Francois
Le 08/11/2013 08:14, Greg Distiller a écrit : Hi I hope its not inappropriate for me to post this as a follow up to my problems with getting RcppArmadillo to work. I tried to compile from source using R CMD INSTALL as Dirk suggested but am getting the error message below. I don’t know if this pa

Re: [Rcpp-devel] RcppArmadillo and the version of Rcpp

2013-11-07 Thread Greg Distiller
Hi I hope its not inappropriate for me to post this as a follow up to my problems with getting RcppArmadillo to work. I tried to compile from source using R CMD INSTALL as Dirk suggested but am getting the error message below. I don't know if this particular problem is related to a small issue

Re: [Rcpp-devel] RcppArmadillo and the version of Rcpp

2013-10-24 Thread Dirk Eddelbuettel
On 24 October 2013 at 13:06, Greg Distiller wrote: | I am new to the list and new to Cpp and Rcpp. I have run into a problem when | trying to load the RcppArmadillo package. Apparently I need at least version | 0.10.5 of Rcpp and I have version 0.10.4. If I try and update this from within | RStudi

[Rcpp-devel] RcppArmadillo and the version of Rcpp

2013-10-24 Thread Greg Distiller
Hi I am new to the list and new to Cpp and Rcpp. I have run into a problem when trying to load the RcppArmadillo package. Apparently I need at least version 0.10.5 of Rcpp and I have version 0.10.4. If I try and update this from within RStudio it doesn't offer 0.10.5 as an option, and when I tri

[Rcpp-devel] RcppArmadillo 0.3.900.0

2013-06-05 Thread Dirk Eddelbuettel
A new RcppArmadillo release is now out, below is a text copy (without links) of what is at http://dirk.eddelbuettel.com/blog/ RcppArmadillo 0.3.900.0 A Armadillo release 3.900.0 was provided by Conrad yeste

Re: [Rcpp-devel] RcppArmadillo trying to compile rcpparma_hello_world.cpp

2013-03-31 Thread Dirk Eddelbuettel
On 31 March 2013 at 22:47, Andre Mikulec wrote: | Thats good for right now. Yes. Your earlier mistake was to assume that you could do R CMD SHLIB on a file containing Rcpp and RcppArmadillo. And you cannot -- as one needs -I setting for includes, -L for libraries for Rcpp, for RcppArmadillo, et

Re: [Rcpp-devel] RcppArmadillo trying to compile rcpparma_hello_world.cpp

2013-03-31 Thread Andre Mikulec
[email protected] -------- > Date: Sun, 31 Mar 2013 09:39:41 -0500 > To: [email protected] > CC: [email protected] > Subject: Re: [Rcpp-devel] RcppArmadillo trying to compile > rcpparma_hello_world.cpp > From:

  1   2   3   >