Skip to content

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

Merged
ggmarshall merged 1 commit into
mainfrom
fix
Jun 1, 2026
Merged

ggmarshall merged 1 commit into
mainfrom
fix

Conversation

@gipert

@gipert gipert commented May 20, 2026

Copy link
Copy Markdown
Member

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

@gipert

gipert commented Jun 1, 2026

Copy link
Copy Markdown
Member Author

@ggmarshall what do you think about this? please close if wrong

@ggmarshall

Copy link
Copy Markdown
Contributor

don't think this does much, I think I need to update the pygama function

@ggmarshall

Copy link
Copy Markdown
Contributor

But I would include anyway

@ggmarshall
ggmarshall merged commit 72fafca into main Jun 1, 2026
10 checks passed
@ggmarshall
ggmarshall deleted the fix branch June 1, 2026 21:10
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.

2 participants