Re: [R] Fast matrix multiplication

2018-08-14 Thread Ravi Varadhan
Does Microsoft open R come with pre-compiled BLAS that is optimized for matrix computations? Thanks, Ravi -Original Message- From: Ista Zahn Sent: Monday, August 13, 2018 3:18 PM To: Ravi Varadhan Cc: r-help@r-project.org Subject: Re: [R] Fast matrix multiplication On Mon, Aug 13

Re: [R] Fast matrix multiplication

2018-08-14 Thread Ista Zahn
e- > From: Ista Zahn > Sent: Monday, August 13, 2018 3:18 PM > To: Ravi Varadhan > Cc: r-help@r-project.org > Subject: Re: [R] Fast matrix multiplication > > > On Mon, Aug 13, 2018 at 2:41 PM Ravi Varadhan wrote: > > > > Hi Ista, > > Thank you for t

Re: [R] Fast matrix multiplication

2018-08-14 Thread Ravi Varadhan
Subject: Re: [R] Fast matrix multiplication Hi Ravi, You can achieve substantial speed up by using a faster BLAS (e.g., OpenBLAS or MKL), especially on systems with multiple CPUs. On my (6 year old, but 8 core) system your example takes 3.9 seconds with using the reference BLAS and only 0.9

Re: [R] Fast matrix multiplication

2018-08-13 Thread Peter Langfelder
On Mon, Aug 13, 2018 at 12:18 PM Ista Zahn wrote: > > On Mon, Aug 13, 2018 at 2:41 PM Ravi Varadhan wrote: > > > > Hi Ista, > > Thank you for the response. I use Windows. Is there a pre-compiled > > version of openBLAS for windows that would make it easy for me to use it? > > Not sure. If you

Re: [R] Fast matrix multiplication

2018-08-13 Thread Ista Zahn
nfo at https://mran.microsoft.com/rro#intelmkl1 --Ista > Thanks, > Ravi > > -Original Message- > From: Ista Zahn > Sent: Friday, August 10, 2018 12:20 PM > To: Ravi Varadhan > Cc: r-help@r-project.org > Subject: Re: [R] Fast matrix multiplication > > > Hi Ravi, &

Re: [R] Fast matrix multiplication

2018-08-12 Thread Peter Carbonetto
Hi Ravi, Like Ista, I have also had success in using R with OpenBLAS on our Linux compute cluster. This will involve installing R from source. If you'd like, I can send you the configure settings I used, as well as the environment settings used to control OpenBLAS multithreading. The CRAN site

Re: [R] Fast matrix multiplication

2018-08-10 Thread Doran, Harold
Yeah, you might not be able to go much faster here unless A has some specialized structure that you can take advantage of (e.g., sparsity)? On 8/10/18, 11:22 AM, "Ravi Varadhan" wrote: >Hi, > >I would like to compute: A %*% B %*% t(A) > > > >A is a mxn matrix and B is an nxn symmetric,

Re: [R] Fast matrix multiplication

2018-08-10 Thread Ista Zahn
Hi Ravi, You can achieve substantial speed up by using a faster BLAS (e.g., OpenBLAS or MKL), especially on systems with multiple CPUs. On my (6 year old, but 8 core) system your example takes 3.9 seconds with using the reference BLAS and only 0.9 seconds using OpenBLAS. Best, Ista On Fri, Aug

[R] Fast matrix multiplication

2018-08-10 Thread Ravi Varadhan
Hi, I would like to compute: A %*% B %*% t(A) A is a mxn matrix and B is an nxn symmetric, positive-definite matrix, where m is large relative to n (e.g., m=50,000 and n=100). Here is a sample code. M <- 1 N <- 100 A <- matrix(rnorm(M*N), M, N) B <- crossprod(matrix(rnorm(N*N),