Skip to content

Release large PSLP presolve buffers early - #54

Merged
dance858 merged 2 commits into
dance858:mainfrom
hlinsen:reduce-transpose-memory
Aug 18, 2026
Merged

Release large PSLP presolve buffers early#54
dance858 merged 2 commits into
dance858:mainfrom
hlinsen:reduce-transpose-memory

Conversation

@hlinsen

@hlinsen hlinsen commented Aug 13, 2026

Copy link
Copy Markdown
Contributor
  • PSLP now frees its transpose matrix after presolve, removing approximately 12.1 GB on mcf_2500_100_500.
  • Expose an API to free the reduced problem free_reduced_problem
  • After cuOpt copies the reduced problem, it releases PSLP’s duplicate matrix, bounds, row sides, and objective arrays, removing another approximately 8.3 GB—about 20.4 GB total.
Presolver* p = new_presolver(...);
run_presolver(p);
free_presolver_reduced_problem(p);  // Optional early release after copying reduced LP
postsolve(p, ...);
free_presolver(p);        // Final free

hlinsen and others added 2 commits August 12, 2026 18:12
Signed-off-by: Hugo Linsenmaier <hlinsenmaier@gmail.com>

@dance858 dance858 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you for this very nice contribution. I made some small edits. Feel free to merge if you think my edit on line 762 of presolver.c looks good.

Many thanks!

@hlinsen

hlinsen commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Awesome! Thank you for this very nice contribution. I made some small edits. Feel free to merge if you think my edit on line 762 of presolver.c looks good.

Many thanks!

Awesome! Thanks for the review and final edits @dance858

@hlinsen

hlinsen commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@dance858 I believe I don't have merge permissions, could you merge it for me? Thanks!

@dance858
dance858 merged commit ae23189 into dance858:main Aug 18, 2026
18 checks passed
@dance858

Copy link
Copy Markdown
Owner

Merged and released in v0.0.11

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