|These code snippets have been tested on R 3.1.0 and Mac OS 10.9.3. They presumably do *not* work on R 2.X!|
|## Enter these commands in the Mac OS Terminal|
|# use faster vecLib library|
|ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib|
|# return to default settings|
|ln -sf libRblas.0.dylib libRblas.dylib|
|# R script for benchmarking:|
|# On 2011 Macbook Pro (2.7 GHz Core i7): 43 sec. (Rblas) vs. 9 sec. (vecLib)|
Do you know whether it's also possible to symlink the libLAPACK.dylib to R in place of the libRlapack.dylib?
cd /Library/Frameworks/R.framework/Resources/lib mv libRlapack.dylib libRlapack.dylib.backup ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libLAPACK.dylib libRlapack.dylib
However R throws up an error upon launch.
I tried the same thing and it also failed.
However, I am wondering whether linking to BLAS only may be enough.
On my computer, the default BLAS from R gives:
And veclib's BLAS gives:
Assuming that the crossprod is from BLAS and the SVD from LAPACK, I wonder how to interpret the results above...
Actually, it seems that the brewed install points toward veclib's lapack:
However, when using the standard R with linking to veclib's BLAS only, I obtain comparable performances: