Improving OS X OpenMx Performance with Default libRblas

Posted on
Picture of user. neale Joined: 07/31/2009
We have found that the default blas (basic linear algebra system) libraries supplied with R for MAC OS X have poor performance. Specifically, the following three commands, executed as root in a Terminal.app window reduces OpenMx execution time by 75% in some cases (ymmv).

cd /Library/Frameworks/R.framework/Libraries
sudo rm libRblas.dylib
sudo ln -s libRblas.0.dylib libRblas.dylib

Note that these commands simply reconfigure the link, they don't actually delete any libraries. To *undo* these commands one could do the following:

cd /Library/Frameworks/R.framework/Libraries
sudo rm libRblas.dylib
sudo ln -s libRblas.vecLib.dylib libRblas.dylib

Exactly why the vecLib version of libRblas is so slow is not clear; this is a problem for the R or OS X developers to tackle. Whether similar issues exist on linux and windows systems, I don't know, but perhaps others could experiment and comment.

Replied on Mon, 09/13/2010 - 11:17
Picture of user. mspiegel Joined: 07/31/2009

Umm, you don't need to do this if you're running the openmx binary on OS X using R 2.10 or 2.11. I reconfigured the package to load the non veclib shared library. We were messing around with the shared libraries because of libgfortran anyway. So you only need to follow the instructions if you are building from source code or running R 2.9.