Re: [Rcpp-devel] OpenMP and Parallel BLAS

2015-05-31 Thread Balamuta, James Joseph
Greetings and Salutations, The answer is yes, multiple processes can concurrently modify different parts of the object. So, the object is not “locked.” In this case, it’s important to note the scope of the object being “shared” and not “private.” Also, the object is not being used in any compu

Re: [Rcpp-devel] OpenMP and Parallel BLAS

2015-05-27 Thread Saurabh B
Thank you both. I'm trying out these excellent suggestions and reading through the material. It really helps my understanding of how these two things work together. I will update with my findings for everyone's benefit. To clarify my second question James, can multiple processes concurrently modif

Re: [Rcpp-devel] OpenMP and Parallel BLAS

2015-05-26 Thread Balamuta, James Joseph
Greetings and Salutations, I would suggest the following modifications: 1. Use the Rcpp omp plugin // [[Rcpp::plugins(openmp)] Instead of using set flags. (assuming you are on Rcpp >= 0.10.5 ) 2. Modify the function parameters to include: int cores This allows you to specify cores during run

Re: [Rcpp-devel] OpenMP and Parallel BLAS

2015-05-26 Thread Dirk Eddelbuettel
On 26 May 2015 at 17:53, Saurabh B wrote: | Hi there, | | I am using gradient descent to reduce a large matrix of users and items. For | this I am trying to use all 40 available cores but unfortunately my performance | is no better than when I was using just one. I am new to openMP and | RcppArm