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

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

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

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

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)]] | | //