Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: recover the wannier90 interface for lcao_in_pw case #5177

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

kirk0830
Copy link
Collaborator

@kirk0830 kirk0830 commented Sep 26, 2024

What's changed?

  • the memory allocation for PW expansion of numerical orbitals should be reduced as much as possible. In previous PR for PW wavefunction initialization, because this task is done at kpoint one-by-one, therefore only allocate memory for one kpoint with the largest number of pw is enough. However for representation transformation tasks, more often all kpoints are needed according to present impl. of towannier90 interface, therefore I change the determination of kpoints that used to allocate memory for pw expansion of orbs to
const int nks_psig = (PARAM.inp.basis_type == "pw")? 1 : nks_psi;

Linked Issue

Fix #5174

Others

  • The logic of resetting parameters in wannier90 case is quite complex, this increase the cost to maintain the code. To throughfully solve this problem, can support ELPA and ScaLAPACK for LCAOINPW. However I find towannier90 in LCAOINPW case really use ELPA, I will investigate this in the future.
  • The towannier90 interface may need more unittests and integrated test, so that once there are changes on code related, developer can ensure the function will not be voilated as early as possible.

@kirk0830 kirk0830 added Bugs (Exclude input and output) Bugs that only solvable with sufficient knowledge of DFT Input&Output Suitable for coders without knowing too many DFT details and removed Bugs (Exclude input and output) Bugs that only solvable with sufficient knowledge of DFT labels Sep 26, 2024
Copy link
Collaborator

@WHUweiqingzhou WHUweiqingzhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@WHUweiqingzhou WHUweiqingzhou merged commit ba0cb21 into deepmodeling:develop Sep 26, 2024
14 checks passed
@kirk0830 kirk0830 deleted the fix-wannier90-1 branch September 26, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input&Output Suitable for coders without knowing too many DFT details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The interface to wannier90 is error
2 participants