[R-sig-ME] Openblas and lme4

Christian Brauner christianvanbrauner at gmail.com
Sat Nov 15 15:09:35 CET 2014


Hello,

For testing/research purposes I compiled R from source with blas as a
shared library. I then went on to compile openblas from source, tuned it
to Sandybridge and linked R against. The crucial step being:

    cd /usr/local/lib/R/lib \
    && mv libRblas.so libRblas.so.old \
    && ln -s /usr/local/lib/libopenblas_sandybridgep-r0.2.12.so libRblas.so

It worked perfectly and I see as output from /cat/pid/status:
    Name:   R
    State:  S (sleeping)
    […]
    Threads:        4
    […]

Tests with the Matrix library confirm that threading works and the
increase in speed is significant for linear algebra operations such as
solve(), chol() etc.

I was wondering if lmer can make any use of this? I couldn't find a lot
on the internet. Just some posts from R-bloggers vaguely referencing
lme4 and some comments by Doug but I couldn't come to a conclusion
whether lme4 will see improvements in speed at least for larger models.
So far all my calls to lmer() on R with openblas run on a single core.
To pinpoint whether I did something wrong during compilation or if lme4
cannot reall profit from openblas I thought asking here might be a good
idea.

Best,
Christian




(For the sake of completeness: The exact compilation instructions I used
can also be found here
https://github.com/brauner/dockR/blob/master/r-patched-ivy-openblas/Dockerfile.
Someone who runs an ivy- or sandybridge cpu and uses docker can also
pull a docker image with "docker pull brauner/rblas" and check for
himself if I did something wrong.)



More information about the R-sig-mixed-models mailing list