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

Interpolation routines and iterative cycle #96

Merged
merged 2 commits into from
Jun 8, 2023

Conversation

mrm24
Copy link
Contributor

@mrm24 mrm24 commented Jun 8, 2023

Dear Nakib,

I've changed the interpolation routine within the computation of the phonon drag contribution, so that the corners and the weights are precomputed, which prevents successive recomputation for the same point (misc.f90: precompute_interpolation_corners_and_weights). Moreover, I've removed the LAPACK algorithm and worked out the successive linear interpolations as well as allowed for N simultaneous interpolations, so the precomputed weights and corners ids can be used (misc.f90: interpolate_using_precomputed). In this last, there is the caveat of an array slicing when calling interpolate_using_precomputed, as I am calling it with response_ph(:, s, :); and might be not the best slicing especially if computed in each successive call. How is the memory here for non-toy problem in this point of the code? because it might be worth trying a reorder moving bands to first index.

I did a fast test on toy problem with Si (input.nml), with old (old.log) and the new version (new.log); and I've found a speed-up of 1.85 in the whole execution time of the code and 7 in the coupled iterative part of the code. My guess it is that as the number of calls to the interpolation routine increases, it becomes much worthier to precompute the corners-id and the weights.

I see that the interpolation routine is used for 4ph, do you feel worth moving those also to that scheme?

Best regards,

Martí

@nakib
Copy link
Owner

nakib commented Jun 8, 2023

Dear Marti. Thanks for this PR! This is really impressive stuff. As I want to do some internal tests, it would be great if you could target the branch Marti_interp (which I have created just now).

Yes, I will adapt the 4-phonon part to use your new method.

Thanks again!

@mrm24 mrm24 changed the base branch from develop to Marti_interp June 8, 2023 12:39
@mrm24
Copy link
Contributor Author

mrm24 commented Jun 8, 2023

Dear Nakib,

I've targeted the new branch.

Martí

@nakib nakib merged commit 251c1d0 into nakib:Marti_interp Jun 8, 2023
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