Re: [Rd] Control multi-threading in standard matrix product

2017-08-21 Thread Stefan Evert
> On 21 Aug 2017, at 17:40, Ghislain Durif wrote: > > I understand why this is a BLAS related issue and not directly an R related > issue. Nonetheless, my concern was for non-advanced R users, that may don't > even know what BLAS is. For instance, I have a package on the CRAN that use > 'mcla

Re: [Rd] Control multi-threading in standard matrix product

2017-08-21 Thread Ghislain Durif
Hi Ista, Maybe a little comment in the 'matmult {base}' doc page or on the 'options {base}' in the field 'matprod' would be useful to remind users to be cautious regarding BLAS multi-threading? I understand why this is a BLAS related issue and not directly an R related issue. Nonetheless, my

Re: [Rd] Control multi-threading in standard matrix product

2017-08-21 Thread Ista Zahn
Hi Ghislain, The documentation at https://cran.r-project.org/doc/manuals/r-release/R-admin.html#BLAS provides a fair bit of information. What specifically would you like to see added? Best, Ista On Mon, Aug 21, 2017 at 10:13 AM, Ghislain Durif wrote: > Hi Tomas, > > Thanks for your answer. > >

Re: [Rd] Control multi-threading in standard matrix product

2017-08-21 Thread Ghislain Durif
Hi Tomas, Thanks for your answer. Indeed, I checked and my R-3.4.1 installed from the ubuntu repository use 'libopenblasp-r0.2.18.so' while my R-3.3.2 that I did compiled on my machine use 'libRblas.so' which explain the difference of behavior. I will use RhpcBLASctl to avoid issue when comb

Re: [Rd] Control multi-threading in standard matrix product

2017-08-21 Thread luke-tierney
Many, though not all, threaded BLAS honor the OpenMP environment variables; you might see whether setting OMP_THEAD_LIMIT or OMP_NUM_THREADS does what you want. Best, luke On Mon, 21 Aug 2017, Tomas Kalibera wrote: Hi Ghislain, I think you might be comparing two versions of R with different

Re: [Rd] Control multi-threading in standard matrix product

2017-08-21 Thread Tomas Kalibera
Hi Ghislain, I think you might be comparing two versions of R with different BLAS implementations, one that is single threaded (is your 3.3.2 used with reference blas?) and one that is multi threaded (3.4.1 with openblas). Could you check with "perf"? E.g. run your benchmark with "perf record"