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

Skip slow calculation of reference C6 #39

Merged
merged 9 commits into from
Dec 17, 2023
Merged

Skip slow calculation of reference C6 #39

merged 9 commits into from
Dec 17, 2023

Conversation

marvinfriede
Copy link
Member

@marvinfriede marvinfriede commented Dec 14, 2023

The loops in the _load_c6 function are actually really slow and create a bottleneck for the whole calculation. Since the output of this function is not dependent on the system, we only use it to store the tensor (".pt" file) and now skip the calculation and directly load the tensor from the "reference-c6.pt" file.

This gives a speed-up of more than one order of magnitude for small systems.

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (583c5a1) 99.48% compared to head (d48be67) 99.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   99.48%   99.48%   -0.01%     
==========================================
  Files          20       20              
  Lines         391      390       -1     
  Branches       43       44       +1     
==========================================
- Hits          389      388       -1     
  Misses          1        1              
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

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

We can also replace the npy file with the one that is already unpacked from the composite indices rather than storing a packed and an unpacked Version in two different files next to each other.

tests/test_dftd3.py Fixed Show fixed Hide fixed
@marvinfriede marvinfriede requested a review from awvwgk December 15, 2023 14:34
Copy link
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

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

LGTM

@marvinfriede marvinfriede merged commit d8d76d9 into main Dec 17, 2023
18 checks passed
@marvinfriede marvinfriede deleted the load-pt branch December 17, 2023 17:54
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