Skip to content

Commit

Permalink
add PW_DIAG_NDIM parameter for users to adjust efficiency. (#3998)
Browse files Browse the repository at this point in the history
  • Loading branch information
haozhihan committed Apr 16, 2024
1 parent 324e36f commit db23a2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/module_hsolver/diago_dav_subspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void Diago_DavSubspace<T, Device>::diag_once(hamilt::Hamilt<T, Device>* phm_in,
this->n_band = psi.get_nbands();

// maximum dimension of the reduced basis set
this->nbase_x = 2 * this->n_band;
this->nbase_x = Diago_DavSubspace::PW_DIAG_NDIM * this->n_band;

psi::Psi<T, Device> basis(1, this->nbase_x, this->dim, &(psi.get_ngk(0)));
ModuleBase::Memory::record("DAV::basis", this->nbase_x * this->dim * sizeof(T));
Expand Down Expand Up @@ -916,4 +916,4 @@ template class Diago_DavSubspace<double, psi::DEVICE_GPU>;
#endif

#endif
} // namespace hsolver
} // namespace hsolver

0 comments on commit db23a2b

Please sign in to comment.