Skip to content

Remove unused q_start and current_q arrays from Ensemble#412

Open
mesonepigreco wants to merge 1 commit intomasterfrom
remove-unused-q-start-current-q-arrays
Open

Remove unused q_start and current_q arrays from Ensemble#412
mesonepigreco wants to merge 1 commit intomasterfrom
remove-unused-q-start-current-q-arrays

Conversation

@mesonepigreco
Copy link
Copy Markdown
Collaborator

Summary

  • Remove q_start and current_q arrays from the Ensemble class — these were allocated but never actively used anywhere in the codebase.
  • All prior usages were commented out after the weight-update code was refactored to use the direct uYu computation instead of the old get_gaussian_weight Fortran 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__
  • All commented-out code referencing these attributes (timing stubs, GetQ_vectors calls, old weight-update paths)

Notes

  • No functional changes — no active code paths were using these attributes.
  • The __DEBUG_RHO__ debug block was preserved in both locations.

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.
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.

1 participant