Improving OS X OpenMx Performance with Default libRblas

4 replies [Last post]
neale's picture
Offline
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.

mspiegel's picture
Offline
Joined: 07/31/2009
Umm, you don't need to do

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.

tbates's picture
Online
Joined: 07/31/2009
if building from source, does

if building from source, does it need doing after each build?

tbrick's picture
Offline
Joined: 07/31/2009
You should only have to run

You should only have to run these commands once. The routes will stay there as OpenMx updates.

You might have to redo it if you reinstall R or upgrade to a new version of R, though.

neale's picture
Offline
Joined: 07/31/2009
Excellent! I might suggest

Excellent! I might suggest deleting the post, but perhaps some R guru will notice it and identify a better solution.