-
Notifications
You must be signed in to change notification settings - Fork 21
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
[feat] enable MPI for maxent_gf_imp #55
Conversation
@the-hampel, thanks for the commit. If I remember correctly, the reason why I did not implement this functionality is because it becomes a bit complicated when there are blocks of different sizes. Do the changes work for blocks that are not 1x1 and if there are different blocks of different sizes in the Green function? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, the results seems reasonable. Thanks for testing it! I'd have one small suggestion but otherwise, the commit looks good.
imps_blocks_indices = np.arange(len(imps_blocks)) | ||
|
||
# Initialize collective results | ||
data_linefit = [np.zeros(n_points_maxent)] * len(imps_blocks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what confused me with the block size. Does it still work when you change the initialization to [0] * len(imps_blocks)
? Because you anyway overwrite it later, I think it would be more robust to use an immutable type here, especially with the shallow copying of the list entry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now used
data_linefit = [0] * len(imps_blocks)
data_chi2 = [0] * len(imps_blocks)
which also works just fine for the init and the mpi gathering of data. Is that what you had in mind? The test were running just fine with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes exactly, looks perfect. Thanks a lot for implementing this!
I enabled MPI for the impurity Gf maxent routine. @merkelm could you check if this makes sense to you? I successfully checked the results for correctness with the integrated test, but also with other DMFT results.