Skip to content

Fix allocations test errors#151

Merged
MaxenceGollier merged 5 commits intoJuliaSmoothOptimizers:masterfrom
MaxenceGollier:test-allocs
Dec 9, 2025
Merged

Fix allocations test errors#151
MaxenceGollier merged 5 commits intoJuliaSmoothOptimizers:masterfrom
MaxenceGollier:test-allocs

Conversation

@MaxenceGollier
Copy link
Copy Markdown
Collaborator

@MaxenceGollier MaxenceGollier commented Dec 3, 2025

closes #145

See #145 (comment).

I guess that test will fail on lts with this but we should try to make 0 allocations on lts and not the other way around.

@MaxenceGollier MaxenceGollier changed the title Fix allocations test errors [WIP] Fix allocations test errors Dec 3, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.32%. Comparing base (753a97f) to head (a0bdae1).
⚠️ Report is 20 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #151      +/-   ##
==========================================
+ Coverage   73.71%   77.32%   +3.60%     
==========================================
  Files          22       24       +2     
  Lines         898      966      +68     
==========================================
+ Hits          662      747      +85     
+ Misses        236      219      -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MaxenceGollier
Copy link
Copy Markdown
Collaborator Author

💪 QRMumps.jl#136 should fix for Julia 1 now.

Just need to solve on nightly.

@amontoison
Copy link
Copy Markdown
Member

amontoison commented Dec 4, 2025

@MaxenceGollier I suggest to use pre (for pre-release) instead of nightly for the unit tests.

@MaxenceGollier MaxenceGollier changed the title [WIP] Fix allocations test errors Fix allocations test errors Dec 6, 2025
@MaxenceGollier
Copy link
Copy Markdown
Collaborator Author

For your info @amontoison, I was able to solve the issue on Julia pre by updating the wrappedallocs macro, I don't know if you use it in other packages, you might find it useful if you run into similar errors.
I just call the function twice and use the allocated macro on the second call.

I only have the QRMumps.jl related failures now.

Comment thread test/test_allocs.jl
argnames = [gensym() for a in expr.args]
quote
function g($(argnames...))
$(Expr(expr.head, argnames...))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, do you do the warm-start this way?
It is neat!

Fixes the memory issue in ShiftedComposite
@MaxenceGollier MaxenceGollier merged commit b3035c4 into JuliaSmoothOptimizers:master Dec 9, 2025
12 of 13 checks passed
@MaxenceGollier MaxenceGollier deleted the test-allocs branch December 9, 2025 14:01
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.

Fix allocation tests

2 participants