Remove unused q_start and current_q arrays from Ensemble#412
Open
mesonepigreco wants to merge 1 commit intomasterfrom
Open
Remove unused q_start and current_q arrays from Ensemble#412mesonepigreco wants to merge 1 commit intomasterfrom
mesonepigreco wants to merge 1 commit intomasterfrom
Conversation
These two arrays (N_configs x 3*nat_sc float64 each) were allocated in Ensemble.__init__ but never read anywhere in the active codebase. All usages were commented out after the weight-update code was refactored to use the uYu direct computation instead of the old get_gaussian_weight Fortran path. For a typical simulation (N=20000, nat_sc=320, 4x4x4 supercell), this saves ~293 MB of persistent memory per ensemble.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
q_startandcurrent_qarrays from theEnsembleclass — these were allocated but never actively used anywhere in the codebase.uYucomputation instead of the oldget_gaussian_weightFortran path.Memory savings
For a typical simulation (N=20000, nat_sc=320, 4×4×4 supercell), this saves ~293 MB of persistent memory per ensemble — roughly 12% of the total ensemble memory footprint.
What was removed
self.q_start = np.zeros((self.N, Nsc * 3))— allocation in__init__self.current_q = np.zeros((self.N, Nsc * 3))— allocation in__init__GetQ_vectorscalls, old weight-update paths)Notes
__DEBUG_RHO__debug block was preserved in both locations.