Skip to content

fix: free intermediate arrays before second lh5.read in nopt#33

Open
gipert wants to merge 1 commit into
mainfrom
fix
Open

fix: free intermediate arrays before second lh5.read in nopt#33
gipert wants to merge 1 commit into
mainfrom
fix

Conversation

@gipert
Copy link
Copy Markdown
Member

@gipert gipert commented May 20, 2026

Summary

  • Explicitly del tb_data, dsp_data before the second lh5.read call in par_geds_dsp_nopt so the first read's memory is released before the second allocation, reducing peak RSS by ~2×
  • Fix no-plot branch passing raw_files instead of tb_data to noise_optimization
  • Extract n_events = opt_dict.pop("n_events") before the del so the value is available for the second read

Test plan

  • Run par-geds-dsp-nopt on a test channel and verify it completes without memory errors
  • Verify --plot-path and no-plot-path branches both produce correct output

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