[R-sig-ME] Openblas and lme4

Douglas Bates bates at stat.wisc.edu
Sat Nov 15 17:12:20 CET 2014

The bulk of the linear algebra calculations in lme4 are done using the
Eigen C++ library which does not rely on the BLAS.  Thus a multi-threaded
BLAS will not affect lme4 speed to any great extent.  I believe that Eigen
has its own multi-thread capabilities but it has been a while since I

On Sat Nov 15 2014 at 8:05:00 AM Christian Brauner <
christianvanbrauner at gmail.com> wrote:

> 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.)
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

	[[alternative HTML version deleted]]

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