-
Notifications
You must be signed in to change notification settings - Fork 4
MOI wrapper doesn't implement full SemidefiniteOptInterface interface? #19
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
Comments
The way to go might be to enable this line https://github.com/JuliaOpt/SDPABuilder/blob/7b8593aad85cca1bd3d13439fb46764bac943c13/bundled/sdpawrap/sdpawrap.cpp#L72 (don't remember why I commented it) |
Thank you for the advice! My fork for SDPABuilder at https://github.com/JiazhengZhu/SDPABuilder works with the line https://github.com/JuliaOpt/SDPABuilder/blob/7b8593aad85cca1bd3d13439fb46764bac943c13/bundled/sdpawrap/sdpawrap.cpp#L72 commented, however if it is uncommented, Julia gives the following error. In both cases the package builds only if we manually add 'using CxxWrap' at the beginning of the generated 'build.jl'. But is this error related to the reason you commented the line?
|
Might be related to JuliaInterop/CxxWrap.jl#134, JuliaInterop/CxxWrap.jl#128 or JuliaInterop/CxxWrap.jl#115 |
I think this can be closed since SemidefiniteOptInterface.jl is deprecated. P.S. If someone ends up at this issue for some reason, @JiazhengZhu wrote the code we needed to read and write SDPA formatted files here: https://github.com/ericphanson/SDPAFamily.jl/blob/master/src/file_io.jl. |
Context: @JiazhengZhu and I are trying to translate (automatically) some problems from a Julia formulation to SDPA-format file in an effort to debug #17. It seems like some of the problem is a choice of parameters (and a SOC problem that snuck in), but I want to check that directly going to the binary (well, Convex -> MOI -> SDPA-formatted file -> binary) gives the same answers as Convex -> MBP -> SDPA.jl (or now Convex -> MOI -> SDPA.jl via https://github.com/ericphanson/Convex.jl/tree/MathOptInterface), to see if the "bad" parameters giving very wrong results is due to something in SDPA.jl or in the binary itself (I'm thinking it's not a bug in Convex.jl because the other solvers are fine). Being able to write SDPA-formatted files will help us later too, because we want to wrap SDPA-GMP, so we can use that for tests there too.
The problem: Trying to use the
MOI.write
method provided by SemiOptInterface givesMethodError: no method matching getnumberofconstraints(::SDPA.SDOptimizer)
and suggests onlygetnumberofconstraints(::SemidefiniteOptInterface.MockSDOptimizer)
. Looking through the code, I don't think SDPA provides a method forgetnumberofconstraints
, which I guess is the problem.So I think one way for us to resolve this is to write the methods to fill our the SemidefiniteOptInterface interface (from its
src/interface.jl
). But looking at JuliaOpt/SemidefiniteOptInterface.jl#30, it sounds like maybe the plan is to move SDPA to not depend on SemidefiniteOptInterface anyway, and to move the SDPA-format stuff to MathOptFormat.jl. In that case, what can we do to help? I think we'll want to follow whatever's done for SDPA anyway in our wrapping of SDPA-GMP, so if we can push that forward first, it'll probably be easier for us anyway.The text was updated successfully, but these errors were encountered: