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

Fixed bug in writing checkpoint file in parallel mode #500

Merged
merged 4 commits into from
Jun 24, 2024

Conversation

sjhong6230
Copy link
Contributor

While computing various quantities using wannier90.x and WannierBerri, I reported the following issue.

wannier-berri/wannier-berri#325 (comment)

With more tests, I found out this also happens for postw90.x. Also, it happens only for parallel executions.

When I inspected the code, I noticed a bug in the write_chkpt subroutine in the wannier_prog.f90 file.
Since common_data%u_matrix and common_data%u_opt are global, they should not be reduced by MPI routines.

Fixing this point gives consistent results with Wannier90-3.1.0. I also suspect the reason for the above issue is the same.

The reason that this bug was not reported in tests is that the checkpoint files were generated from previous versions.

This bug needs an immediate fix and this PR should be considered urgent.

@sjhong6230
Copy link
Contributor Author

Comment on test-suite: To prevent such bugs, I recommend adding test sets that uses wannier90.x and postw90.x consecutively.

@JeromeCCP9 JeromeCCP9 self-assigned this May 13, 2024
Copy link
Collaborator

@JeromeCCP9 JeromeCCP9 left a comment

Choose a reason for hiding this comment

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

This bug fix is correct.

@JeromeCCP9
Copy link
Collaborator

Much appreciated, Seung-Ju! J.

@JeromeCCP9 JeromeCCP9 merged commit 829f9f6 into wannier-developers:develop Jun 24, 2024
5 checks passed
@sjhong6230 sjhong6230 deleted the chkpt branch June 24, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants