-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: remove unused and untested code #86
Conversation
Codecov ReportBase: 56.96% // Head: 93.26% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #86 +/- ##
===========================================
+ Coverage 56.96% 93.26% +36.30%
===========================================
Files 9 4 -5
Lines 811 416 -395
===========================================
- Hits 462 388 -74
+ Misses 349 28 -321
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Okaaaaay. Now I understand things. We had +2,300 lines of stuff floating around not actually doing anything. There are also two separate APIs.
Here's the calls used by MOI: https://github.com/jump-dev/CSDP.jl/blob/od/rm-code/src/c_api.jl |
Making things worse, for MOI we're not actually calling CSDP, but this patch of @blegat: so that could be the cause of the issue. |
end | ||
|
||
struct PrimalSolutionMatrix <: MOI.AbstractModelAttribute end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to keep this feature ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the motivation? Where/when is it used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I am solving an SDP and why to understand better the behavior of the solver, it is useful to get a peak at the internal primal and dual solutions.
Yes, that patch provides an API for CSDP that is more natural to call from Julia and also fixed the segfault we had in #39 |
My tentative conclusion is that a better fix is to switch to a one-shot Having these two APIs, especially because the current MOI one is undocumented, is confusing, to say the least. It took me longer than I'd like to admit to find the patch in CSDP_jll. I was like, wtf, how come |
What would that achieve. The current solution works, copies directly the MOI data into the CSDP internal datastructure by passing scalar values so it's quite simple and easy to be segfault-free and reason about in terms of pointers, references and so on. However, I think it's best to keep using that interface, I designed it specifically to make the MOI wrapper simple and efficient and clean. Indeed, we could document better that we are using a patch but I don't think using |
I think there's a problem somewhere in it: #74 (comment) |
Might be but then from experience, working with the patch will be easier than with the |
Closing as won't implement. |
I'm trying to make sense of the C code, but I am hitting a wall of unused and untested methods with a massive variety of input arguments. I don't think we should merge this (yet), but I'm going to have a go at pruning everything. If we merge some variation of this, it could be v2.0.0.