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

write_rmn broken with MPI #509

Open
jaemolihm opened this issue Jul 17, 2024 · 2 comments
Open

write_rmn broken with MPI #509

jaemolihm opened this issue Jul 17, 2024 · 2 comments

Comments

@jaemolihm
Copy link
Contributor

jaemolihm commented Jul 17, 2024

When run with multiple cores, seedname_r.dat file written with write_rmn = .true. contains NaN. When run with 1 core, the result is fine. I used develop branch commit dd450c6.

Example output (diam_r.dat, 8 cores):

 written on 18Jul2024 at 00:41:09 
           8
          93
   -3    1    1    1    1    0.056618    0.106395    0.016255   -0.040207    0.024689   -0.024178
   -3    1    1    2    1************************************************************************
   -3    1    1    3    1         NaN         NaN         NaN         NaN         NaN         NaN
   -3    1    1    4    1         NaN         NaN         NaN         NaN         NaN         NaN

Example output (diam_r.dat, 1 core)

 written on 18Jul2024 at 00:45:46 
           8
          93
   -3    1    1    1    1    0.000000    0.000000   -0.000000   -0.000000   -0.000000    0.000000
   -3    1    1    2    1   -0.000528    0.000000    0.000528   -0.000000    0.001362   -0.000000
   -3    1    1    3    1    0.001362    0.000000   -0.000528   -0.000000   -0.000528   -0.000000
   -3    1    1    4    1   -0.000528   -0.000000    0.001362   -0.000000    0.000528    0.000000
   -3    1    1    5    1   -0.000369   -0.000000    0.000369    0.000000    0.000369    0.000000
mpirun -np 8 pw.x -in scf.in
mpirun -np 1 wannier90.x -pp diam
mpirun -np 8 pw2wannier90.x -in pw2wan.in
mpirun -np 8 wannier90.x diam

Input files
diam.tar.gz

@JeromeCCP9
Copy link
Collaborator

JeromeCCP9 commented Jul 18, 2024

Hi Jae-Mo!

Thank you for finding this and sending the inputs to work with!

This revealed an important bug--that the write_rmn code required the full m_matrix, which was not available in parrallel.

I have fixed this by parallelizing the algorithm, in PR "make write_rmn parallel" #510 and hopefully we'll review and merge this rapidly.

Thank you again for your careful issue post!
Yours, Jerome

@jaemolihm
Copy link
Contributor Author

Hi Jerome,

Thanks a lot for the quick fix! I confirm that the MR fixes the problem.

Best,
Jae-Mo

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

No branches or pull requests

2 participants