Giter VIP home page Giter VIP logo

Comments (7)

migarstka avatar migarstka commented on June 9, 2024

Thanks for opening an issue. I'll have a look.

from cosmo.jl.

migarstka avatar migarstka commented on June 9, 2024

I hope this fixes it 623a704 I will tag v0.8.5 shortly. Let me know if the issue persists.

from cosmo.jl.

thinh-le avatar thinh-le commented on June 9, 2024

Many thanks, this works but another error pops up:

ERROR: TypeError: in <:, expected Type, got a value of type COSMO.CliqueGraphMerge
Stacktrace:
  [1] COSMO.SparsityPattern(L::SparseArrays.SparseMatrixCSC{Float64, Int64}, N::Int64, ordering::Vector{Int64}, merge_strategy::COSMO.OptionsFactory{COSMO.CliqueGraphMerge}, row_range::UnitRange{Int64}, cone_ind::Int64, nz_ind_map::SparseArrays.SparseVector{Int64, Int64})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\types.jl:200
  [2] _analyse_sparsity_pattern(ci::COSMO.ChordalInfo{Float64}, csp::Vector{Int64}, sets::Vector{COSMO.AbstractConvexSet}, C::COSMO.PsdConeTriangle{Float64}, k::Int64, psd_row_range::UnitRange{Int64}, sp_ind::Int64, merge_strategy::COSMO.OptionsFactory{COSMO.CliqueGraphMerge})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\chordal_decomposition.jl:64
  [3] analyse_sparsity_pattern!(ci::COSMO.ChordalInfo{Float64}, csp::Vector{Int64}, sets::Vector{COSMO.AbstractConvexSet}, C::COSMO.PsdConeTriangle{Float64}, k::Int64, psd_row_range::UnitRange{Int64}, sp_ind::Int64, merge_strategy::COSMO.OptionsFactory{COSMO.CliqueGraphMerge})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\chordal_decomposition.jl:55
  [4] find_sparsity_patterns!(ws::COSMO.Workspace{Float64})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\chordal_decomposition.jl:47
  [5] chordal_decomposition!(ws::COSMO.Workspace{Float64})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\chordal_decomposition.jl:18
  [6] macro expansion
    @ .\timing.jl:299 [inlined]
  [7] optimize!(ws::COSMO.Workspace{Float64})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\solver.jl:90
  [8] optimize!
    @ C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\MOI_wrapper.jl:151 [inlined]
  [9] optimize!
    @ C:\Users\Miguel\.julia\packages\MathOptInterface\QxT5e\src\MathOptInterface.jl:81 [inlined]
 [10] optimize!(m::MathOptInterface.Utilities.CachingOptimizer{COSMO.Optimizer{Float64}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}})
    @ MathOptInterface.Utilities C:\Users\Miguel\.julia\packages\MathOptInterface\QxT5e\src\Utilities\cachingoptimizer.jl:285

PS: I am trying to debug this myself by overriding COSMO fundtions. Let me know if you need any variables in my session.

from cosmo.jl.

migarstka avatar migarstka commented on June 9, 2024

You can also try using a different merge strategy, e.g. pass in the setting merge_strategy = COSMO.ParentChildMerge or merge_strategy = COSMO.NoMerge. see: https://oxfordcontrol.github.io/COSMO.jl/dev/decomposition/

from cosmo.jl.

thinh-le avatar thinh-le commented on June 9, 2024

Thanks @migarstka. Btw, I can confirm that in the OP, my instance indeed has only one clique. Also your fix 623a704 still returns the correct result for a smaller instance. However, on the larger instance, using

COSMOOPTIMIZER = optimizer_with_attributes(
           COSMO.Optimizer,
           "max_iter" => 100_000,
           "verbose" => true,
           "verbose_timing" => true,
           "eps_abs" => 1e-8,
           "merge_strategy" => COSMO.NoMerge,
)

still returns error

ERROR: TypeError: in <:, expected Type, got a value of type COSMO.NoMerge
Stacktrace:
  [1] COSMO.SparsityPattern(L::SparseArrays.SparseMatrixCSC{Float64, Int64}, N::Int64, ordering::Vector{Int64}, merge_strategy::Type{COSMO.NoMerge}, row_range::UnitRange{Int64}, cone_ind::Int64, nz_ind_map::SparseArrays.SparseVector{Int64, Int64})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\types.jl:200
  [2] _analyse_sparsity_pattern(ci::COSMO.ChordalInfo{Float64}, csp::Vector{Int64}, sets::Vector{COSMO.AbstractConvexSet}, C::COSMO.PsdConeTriangle{Float64}, k::Int64, psd_row_range::UnitRange{Int64}, sp_ind::Int64, merge_strategy::Type{COSMO.NoMerge})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\chordal_decomposition.jl:64
  [3] analyse_sparsity_pattern!(ci::COSMO.ChordalInfo{Float64}, csp::Vector{Int64}, sets::Vector{COSMO.AbstractConvexSet}, C::COSMO.PsdConeTriangle{Float64}, k::Int64, psd_row_range::UnitRange{Int64}, sp_ind::Int64, merge_strategy::Type{COSMO.NoMerge})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\chordal_decomposition.jl:55
  [4] find_sparsity_patterns!(ws::COSMO.Workspace{Float64})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\chordal_decomposition.jl:47
  [5] chordal_decomposition!(ws::COSMO.Workspace{Float64})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\chordal_decomposition.jl:18
  [6] macro expansion
    @ .\timing.jl:299 [inlined]
  [7] optimize!(ws::COSMO.Workspace{Float64})
    @ COSMO C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\solver.jl:90
  [8] optimize!
    @ C:\Users\Miguel\.julia\packages\COSMO\6NlGI\src\MOI_wrapper.jl:151 [inlined]
  [9] optimize!
    @ C:\Users\Miguel\.julia\packages\MathOptInterface\QxT5e\src\MathOptInterface.jl:81 [inlined]
 [10] optimize!(m::MathOptInterface.Utilities.CachingOptimizer{COSMO.Optimizer{Float64}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}})
    @ MathOptInterface.Utilities C:\Users\Miguel\.julia\packages\MathOptInterface\QxT5e\src\Utilities\cachingoptimizer.jl:285

I'll try switching off the chordal decomposition completely and see what happens. Two questions:

  • should I open a separate issue for the type error?
  • the branch with_multi_threading is also up to date with v0.8.5 right?

from cosmo.jl.

migarstka avatar migarstka commented on June 9, 2024

should I open a separate issue for the type error?

It would be great if you could provide me with some code that I can use to reproduce the error.

the branch with_multi_threading is also up to date with v0.8.5 right?

I try to keep it in sync with the latest version

from cosmo.jl.

thinh-le avatar thinh-le commented on June 9, 2024

Fixed by @kalmarek in #164

from cosmo.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.