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

452 Views Asked by At

I'm trying to figure out the interaction between the following library packages in Debian 11 and Ubuntu 20.04:

  • libatlas3-base
  • liblapacke
  • OpenBLAS
    • libopenblas0-openmp
    • libopenblas0-pthread
    • libopenblas0-serial

It looks like the OpenBLAS packages can only be used one at a time because they are in different subdirs shown here. How do I select the active one?

  • /usr/lib/x86_64-linux-gnu/openblas-openmp/libopenblas.so.0
  • /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblas.so.0
  • /usr/lib/x86_64-linux-gnu/openblas-serial/libopenblas.so.0

Once I've selected the active OpenBLAS implementation, will libatlas3 or liblapacke use the active implementation? How can you tell what they are using?

1

There are 1 best solutions below

1
KJ7LNW On BEST ANSWER
  • 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.