| 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 | |
| cd /Library/Frameworks/R.framework/Resources/lib | |
| ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib | |
| # return to default settings | |
| cd /Library/Frameworks/R.framework/Resources/lib | |
| ln -sf libRblas.0.dylib libRblas.dylib | |
| # R script for benchmarking: | |
| # http://r.research.att.com/benchmarks/R-benchmark-25.R | |
| # On 2011 Macbook Pro (2.7 GHz Core i7): 43 sec. (Rblas) vs. 9 sec. (vecLib) |
This comment has been minimized.
This comment has been minimized.
|
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... |
This comment has been minimized.
This comment has been minimized.
|
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:
|
This comment has been minimized.
Do you know whether it's also possible to symlink the libLAPACK.dylib to R in place of the libRlapack.dylib?
I've tried:
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.dylibHowever R throws up an error upon launch.