Lapack/Blas/Openblas Proper Installation from Source - Replace System Libraries with New Ones

Installing LAPACK and BLAS Libraries for C on Mac OS

You can use Homebrew to take care of this for you. Just install Homebrew and then:

brew install openblas
brew install lapack

But you don't even need that: macOS already ships with BLAS and LAPACK implementations in its vecLib framework. So if your software is vecLib-aware, or you pass it the right compiler options, you don't even need to install a separate BLAS and LAPACK.

Can't build Octave from source

The problem was that OpenBLAS was under /usr/lib and not /usr/lib64. This led to dynamic link problems.

How do libatlas3, liblapacke, and libopenblas0 interact with eachother?

  • Libraries are selected with alternatives:

    • ~# update-alternatives --config libblas.so.3-x86_64-linux-gnu
    • ~# update-alternatives --config liblapack.so.3-x86_64-linux-gnu
  • liblapacke.so.3 will use whichever pair of liblapack.so.3 and libblas.so.3 libraries are currently selected from above.

  • libatlas3-base provides liblapack_atlas.so.3 which will always use the ATLAS implementation.

Installing OpenBLAS on CentOS / Fedora

This article proposes installing openblas-compat via Yum. That fixes the issue for me. After installing the default blas package my software was still using OpenBLAS.



Related Topics



Leave a reply



Submit