Set version 3.8.0

This commit is contained in:
Atsushi Togo 2024-11-25 13:40:01 +09:00
parent 5b6bffa7e2
commit d56960a89a
8 changed files with 65 additions and 7 deletions

View File

@ -2,6 +2,12 @@
# Change Log
## Nov-25-2024: Version 3.8.0
- Follow the change due to phonopy's refactoring of MLP interface.
- Experimental option (`BUILD_WITHOUT_LAPACKE=ON`) to compile phono3py without
LAPACKE in C
## Nov-13-2024: Version 3.7.0
- Update to follow the change of phonopy's internal functions

View File

@ -58,9 +58,9 @@ copyright = "2015, Atsushi Togo"
# built documents.
#
# The short X.Y version.
version = "3.7"
version = "3.8"
# The full version, including alpha/beta/rc tags.
release = "3.7.0"
release = "3.8.0"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -307,7 +307,7 @@ is used through them. Multithreaded OpenBLAS is installed by conda and can be
used via LAPACKE in phono3py. MKL LAPACK and BLAS are also able to be used via
LAPACKE in phono3py with appropriate setting in `setup.py`.
Using `--pinv-solver=[number]`, one of the following solver is chosen:
Using `--pinv-solver NUMBER`, one of the following solver is chosen:
1. Lapacke `dsyev`: Smaller memory consumption than `dsyevd`, but slower. This
is the default solver when MKL LAPACKE is integrated or scipy is not
@ -323,3 +323,8 @@ Using `--pinv-solver=[number]`, one of the following solver is chosen:
LAPACKE is not integrated.
5. Scipy's `dsyevd`: Similar to solver (2), this solver should be used
carefully.
```{note}
`pinv-solver` =3, 4, and 5 are only available when phono3py is compiled
without LAPACKE.
```

View File

@ -49,7 +49,7 @@ conda environment. Automatic search of required libraries and flags that are
already on the system is performed by cmake.
(install_with_cmake)=
### Build with automatic search of library configurations by cmake
### Building with automatic search of library configurations by cmake
With installed cmake and required libraries on the system, cmake tries to find
libraries to be linked and the compiler flags that are required during the build.
@ -61,6 +61,21 @@ See an example at {ref}`install_an_example`. In the standard output, flags and
libraries found by cmake are shown. Please carefully check if those
configurations are expected ones or not.
### Building without linking LAPACKE
**Experimental**
To compile phono3py without linking LAPACKE in C, use the following command:
```
% BUILD_WITHOUT_LAPACKE=ON pip install -e . -vvv
```
When this option is enabled, linking to BLAS and LAPACKE libraries is not
required, so installing these libraries for C compilation may not be necessary.
However, since numpy and scipy rely on BLAS and LAPACK libraries, their runtime
versions are still required.
(install_an_example)=
## Installation instruction of latest development version of phono3py

View File

@ -686,6 +686,13 @@ def select_colmat_solver(pinv_solver):
print("Phono3py C-routine is not compiled correctly.")
default_solver = 4
if not phono3c.include_lapacke():
if pinv_solver in (1, 2, 6):
raise RuntimeError(
"Use pinv-solver 3, 4, or 5 because "
"phono3py is not compiled with LAPACKE."
)
solver_numbers = (1, 2, 3, 4, 5, 6)
solver = pinv_solver

View File

@ -34,4 +34,4 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
__version__ = "3.7.0"
__version__ = "3.8.0"

View File

@ -16,7 +16,7 @@ dependencies = [
"matplotlib>=2.2.2",
"h5py>=3.0",
"spglib>=2.3",
"phonopy>=2.30,<2.31",
"phonopy>=2.31,<2.32",
]
license = { file = "LICENSE" }

View File

@ -1,11 +1,17 @@
"""Tests for direct solution of LBTE."""
import numpy as np
import pytest
import phono3py._phono3py as phono3c
from phono3py.api_phono3py import Phono3py
def test_kappa_LBTE(si_pbesol: Phono3py):
@pytest.mark.skipif(
not phono3c.include_lapacke(), reason="test for phono3py compliled with lapacke"
)
@pytest.mark.parametrize("pinv_solver", [1, 2, 3, 4, 5])
def test_kappa_LBTE(si_pbesol: Phono3py, pinv_solver: int):
"""Test for symmetry reduced collision matrix."""
if si_pbesol._make_r0_average:
ref_kappa = [110.896, 110.896, 110.896, 0, 0, 0]
@ -18,11 +24,30 @@ def test_kappa_LBTE(si_pbesol: Phono3py):
temperatures=[
300,
],
pinv_solver=pinv_solver,
)
kappa = si_pbesol.thermal_conductivity.kappa.ravel()
np.testing.assert_allclose(ref_kappa, kappa, atol=0.3)
@pytest.mark.skipif(
phono3c.include_lapacke(), reason="test for phono3py compliled without lapacke"
)
@pytest.mark.parametrize("pinv_solver", [1, 2])
def test_kappa_LBTE_witout_lapacke(si_pbesol: Phono3py, pinv_solver: int):
"""Test for symmetry reduced collision matrix."""
si_pbesol.mesh_numbers = [9, 9, 9]
si_pbesol.init_phph_interaction()
with pytest.raises(RuntimeError):
si_pbesol.run_thermal_conductivity(
is_LBTE=True,
temperatures=[
300,
],
pinv_solver=pinv_solver,
)
def test_kappa_LBTE_full_colmat(si_pbesol: Phono3py):
"""Test for full collision matrix."""
if si_pbesol._make_r0_average: