phonopy / phono3py

A simulation package of phonon-phonon interaction related properties
http://phonopy.github.io/phono3py/
BSD 3-Clause "New" or "Revised" License
125 stars 55 forks source link

[FEATURE] Add support for BLAS and LAPACK libraries discovery #227

Open ccoulombe opened 6 months ago

ccoulombe commented 6 months ago

Please add support for discovering BLAS and LAPACK libraries through cmake mechanisms.

We use Flexiblas and this is supported through -DBLA_VENDOR (https://cmake.org/cmake/help/latest/module/FindBLAS.html)

By asking CMake to find required libraries, this add flexibity and avoid custom patching of CMakeLists.txt

atztogo commented 6 months ago

I am not very familiar with cmake. Do you have anything in your mind how to modify the phono3py setup system?

LecrisUT commented 1 day ago

Note, FlexiBLAS does not support Lapacke. Other than that you can pass BLA_VENDOR as a environment variable during the pip install.

@atztogo I think one solution would be to conditionally use lapacke interface and if not found default to the original ones. But it's been quite some time since I looked into the difference between those, I could use some help explaining the differences.

atztogo commented 17 hours ago

I think one solution would be to conditionally use lapacke interface and if not found default to the original ones.

@LecrisUT, what do you mean the original ones?

LecrisUT commented 14 hours ago

I think one solution would be to conditionally use lapacke interface and if not found default to the original ones.

@LecrisUT, what do you mean the original ones?

Linking against the fortran interface or bundle the (relevant part of) lapacke library statically.