-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add timers for Hubbard symmetrization #1008
Conversation
I'm almost sure it's the same issue that we solved in symmetrize_mt_function(): generation of |
3e31e77
to
379a5b2
Compare
There is some room for improvment here ^^. I've cherry picked the changes and compiled on todi, At least it seems to fix the bulk of the performance issue. |
@@ -46,6 +48,19 @@ symmetrize_occupation_matrix(Occupation_matrix& om__) | |||
} | |||
} | |||
|
|||
std::vector<std::vector<mdarray<double, 2>>> rotms(sym.size()); |
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.
but why not passing it as argument? it is already computed in sim.ctx.
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.
Aren't the ones in sim ctx different? https://github.com/electronic-structure/SIRIUS/blob/sirius-md/src/context/simulation_context.cpp#L834
It does the following at the end:
https://github.com/electronic-structure/SIRIUS/blob/sirius-md/src/core/sht/sht.cpp#L98
In symmetrize_occupation_matrix
for each symmetry
https://github.com/electronic-structure/SIRIUS/blob/sirius-md/src/core/sht/sht.cpp#L115
was called, which returns a vector of rotations matrices.
I didn't look at the for loops below, perhaps one can rearrange things and use the ctx.rotm().
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 checked the code and I found a TODO that perfectly fits this refactoring. I'll add my changes to this PR
This reverts commit 84c492b.
…IUS into hubbard-profile
cscs-ci run |
@simonpintarelli @gsavva is it good to be merged? |
* profile symmetrize_occupation_matrix * use precomputed block rotation matrices for real spherical harmonics everywhere --------- Co-authored-by: Anton Kozhevnikov <toxa81@gmail.com>
Add
sirus::symmetrize_occupation_matrix
.@gsavva encountered a SCF+U calculation which spent the bulk of the time in
symmetrize_occupation_matrix
inDensity::generate
.