installing openBLAS for R on macbook

I am looking for a faster way of calculating cosine similarity (because I have a large matrix of 2.8Gb).

I found a coop package where was written something about "A good BLAS library," so I started digging and found out that I should use openBLAS library to make it faster. I read the installation guide and many other articles.

How can I install and run it in R on macbook?

Upvotes: 3

Views: 2669

Answers (2)

Pedro Rafael
Pedro Rafael

Reputation: 522

Do not use OpenBLAS on osX. Apple already has a very optimized version of BLAS which is vecLib.

Upvotes: 0

dlampart
dlampart

Reputation: 81

osX has a great blas library already installed which you can use as an alternative. you only need to link it:

# use faster vecLib library
cd /Library/Frameworks/R.framework/Resources/lib
ln -sf  /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib

see here for source and details

Upvotes: 2

Related Questions