Skip to content
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

Slow read_from_file for .cbf files containing SDP constraints #135

Closed
mipals opened this issue Apr 30, 2024 · 2 comments · Fixed by #136
Closed

Slow read_from_file for .cbf files containing SDP constraints #135

mipals opened this issue Apr 30, 2024 · 2 comments · Fixed by #136
Assignees

Comments

@mipals
Copy link

mipals commented Apr 30, 2024

Hi there,

I am currently solving a few models with PSD constraints using MosekTools.jl. The models are all read from .cbf files using JuMP.read_from_file, but there seem to be a large overhead in the reading of the models.

As an example one the models look as follows

julia> model_mosek
A JuMP Model
Maximization problem with:
Variables: 100750
Objective function type: AffExpr
`Vector{VariableRef}`-in-`MathOptInterface.Nonnegatives`: 1 constraint
`Vector{VariableRef}`-in-`MathOptInterface.PositiveSemidefiniteConeTriangle`: 9632 constraints
`Vector{AffExpr}`-in-`MathOptInterface.Zeros`: 3 constraints
`Vector{AffExpr}`-in-`MathOptInterface.Nonpositives`: 1 constraint
Model mode: AUTOMATIC
CachingOptimizer state: ATTACHED_OPTIMIZER
Solver name: Mosek

Using @time optimize!(model_mosek) I get the following

 43.853957 seconds (2.12 G allocations: 142.302 GiB, 13.44% gc time)

The model itself is solved in around 6 seconds, so the main issue here seem to be in the conversion of the model.

When reading and solving the same models using Clarabel there is no overhead when reading in the .cbf files, which is making me think there is an issue hiding somewhere here.

@blegat
Copy link
Member

blegat commented Apr 30, 2024

Thanks for reporting the issue. Could you share the cbf file (or an alternative version that reproduces the issue if you have sensitive information) ?

@mipals
Copy link
Author

mipals commented Apr 30, 2024

Yes, I can share a few files over email if that is okay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants