Skip to content

Commit

Permalink
fixes bug in parallel checkpoint read
Browse files Browse the repository at this point in the history
edge cases allow u_matrix_opt to be uninitialised on non-root ranks
fixed by broadcasting at read always
  • Loading branch information
Jerome Jackson committed Jan 15, 2025
1 parent cc21f4d commit 5bf85ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/readwrite.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2434,18 +2434,18 @@ subroutine w90_readwrite_chkpt_dist(dis_manifold, wannier_data, u_matrix, u_matr
return
endif
endif

end if

call comms_bcast(u_matrix_opt(1, 1, 1), num_bands*num_wann*num_kpts, error, comm)
if (allocated(error)) return
call comms_bcast(dis_manifold%lwindow(1, 1), num_bands*num_kpts, error, comm)
if (allocated(error)) return
call comms_bcast(dis_manifold%ndimwin(1), num_kpts, error, comm)
if (allocated(error)) return
call comms_bcast(omega_invariant, 1, error, comm)
if (allocated(error)) return
end if

call comms_bcast(u_matrix_opt(1, 1, 1), num_bands*num_wann*num_kpts, error, comm)
if (allocated(error)) return
call comms_bcast(wannier_data%centres(1, 1), 3*num_wann, error, comm)
if (allocated(error)) return
call comms_bcast(wannier_data%spreads(1), num_wann, error, comm)
Expand Down

0 comments on commit 5bf85ed

Please sign in to comment.