You are here

Improving OS X OpenMx Performance with Default libRblas

5 posts / 0 new
Last post
neale's picture
Offline
Joined: 07/31/2009 - 15:14
Improving OS X OpenMx Performance with Default libRblas

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 - 15:24
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.

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

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

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
if building from source, does

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

tbrick's picture
Offline
Joined: 07/31/2009 - 15:10
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.