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

Perf: optimize rhog_symmetry #2171

Merged
merged 8 commits into from
Apr 4, 2023
Merged

Perf: optimize rhog_symmetry #2171

merged 8 commits into from
Apr 4, 2023

Conversation

maki49
Copy link
Collaborator

@maki49 maki49 commented Mar 30, 2023

solveing issue #2168

@dyzheng dyzheng added the Performance Issues related to fail running ABACUS label Apr 3, 2023
@maki49 maki49 marked this pull request as draft April 3, 2023 13:28
@maki49 maki49 marked this pull request as ready for review April 3, 2023 18:39
@maki49
Copy link
Collaborator Author

maki49 commented Apr 3, 2023

I extracted the gtrans-phase-factor outside of the ptrans-loop which make it slightly faster.

I find that the most time-consuming is these two adds in the ptrans-loop (that's what I left out in the last commit).
But now I have no idea to optimize this.
image
Or maybe I could add an if() before the the ptrans-loop to skip it when there are too many primitive cells? It just make the symmetrization incomplete and hardly affect the results.

@caic99 caic99 changed the title optimize rhog_symmetry Fix: optimize rhog_symmetry Apr 4, 2023
@dyzheng dyzheng changed the title Fix: optimize rhog_symmetry Perf: optimize rhog_symmetry Apr 4, 2023
@dyzheng
Copy link
Collaborator

dyzheng commented Apr 4, 2023

I will merge this PR and test the problem you mentioned.

@dyzheng dyzheng merged commit b67657d into deepmodeling:develop Apr 4, 2023
caic99 pushed a commit to caic99/abacus-develop that referenced this pull request Apr 6, 2023
* optimize rhog_symmetry

* move tmp_gdirect0.z after continue

* revert the quit assertion, important to put \!GAMMA inside

* use libm::sincos

* fix a wrong call of sincos

* extract gtrans-factor out of the ptrans-loop

* fix a cout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Issues related to fail running ABACUS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants