Skip to content

Commit

Permalink
fix some bugs caused by deepmodeling#5134
Browse files Browse the repository at this point in the history
  • Loading branch information
a1henu committed Sep 26, 2024
1 parent c0f35ea commit 9e705b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions python/pyabacus/src/py_diago_dav_subspace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,14 @@ class PyDiagoDavSubspace
bool scf_type,
hsolver::diag_comm_info comm_info
) {
auto hpsi_func = [mm_op] (std::complex<double> *hpsi_out,
std::complex<double> *psi_in, const int nband_in,
const int nbasis_in, const int band_index1,
const int band_index2)
{
auto hpsi_func = [mm_op] (
std::complex<double> *psi_in,
std::complex<double> *hpsi_out,
const int nband_in,
const int nbasis_in,
const int band_index1,
const int band_index2
) {
// Note: numpy's py::array_t is row-major, but
// our raw pointer-array is column-major
py::array_t<std::complex<double>, py::array::f_style> psi({nbasis_in, band_index2 - band_index1 + 1});
Expand Down
4 changes: 2 additions & 2 deletions python/pyabacus/src/py_diago_david.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class PyDiagoDavid
hsolver::diag_comm_info comm_info
) {
auto hpsi_func = [mm_op] (
std::complex<double> *hpsi_out,
std::complex<double> *psi_in,
std::complex<double> *psi_in,
std::complex<double> *hpsi_out,
const int nband_in,
const int nbasis_in,
const int band_index1,
Expand Down

0 comments on commit 9e705b9

Please sign in to comment.