Skip to content

SDPA reader errors on valid file #1541

@matbesancon

Description

@matbesancon

I am handling a bunch of SDPA files with which the CSDP native reader seems happy:

3 =mdim
2 =nblocks
{-4, 2}
-0.0 -0.3333333333333333 -0.6666666666666666
0 1 1 1 -1
1 1 1 1 -1
1 1 2 2 1
2 1 1 1 -1
2 1 3 3 1
3 1 1 1 -1
3 1 4 4 1
1 2 1 1 1.0
2 2 1 1 0.3333333333333333
2 2 1 2 0.3333333333333333
3 2 1 2 0.3333333333333333
3 2 2 2 0.3333333333333333

But MOF errors:

ERROR: ArgumentError: invalid base 10 digit '{' in "{-4,"
Stacktrace:
  [1] tryparse_internal(#unused#::Type{Int64}, s::SubString{String}, startpos::Int64, endpos::Int64, base_::Int64, raise::Bool)
    @ Base ./parse.jl:137
  [2] parse(::Type{Int64}, s::SubString{String}; base::Nothing)
    @ Base ./parse.jl:241
  [3] parse
    @ ./parse.jl:241 [inlined]
  [4] dim_to_set
    @ ~/.julia/packages/MathOptInterface/YDdD3/src/FileFormats/SDPA/SDPA.jl:253 [inlined]
  [5] _broadcast_getindex_evalf
    @ ./broadcast.jl:648 [inlined]
  [6] _broadcast_getindex
    @ ./broadcast.jl:621 [inlined]
  [7] getindex
    @ ./broadcast.jl:575 [inlined]
  [8] copy
    @ ./broadcast.jl:922 [inlined]
  [9] materialize
    @ ./broadcast.jl:883 [inlined]
 [10] read!(io::IOStream, model::MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.FileFormats.SDPA.ModelVectorConstraints{Float64, MathOptInterface.Utilities.VectorOfConstraints{MathOptInterface.VectorAffineFunction{Float64}, MathOptInterface.Nonnegatives}, MathOptInterface.Utilities.VectorOfConstraints{MathOptInterface.VectorAffineFunction{Float64}, MathOptInterface.PositiveSemidefiniteConeTriangle}}})
    @ MathOptInterface.FileFormats.SDPA ~/.julia/packages/MathOptInterface/YDdD3/src/FileFormats/SDPA/SDPA.jl:308
 [11] #7
    @ ~/.julia/packages/MathOptInterface/YDdD3/src/FileFormats/FileFormats.jl:101 [inlined]
 [12] open(::MathOptInterface.FileFormats.var"#7#8"{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.FileFormats.SDPA.ModelVectorConstraints{Float64, MathOptInterface.Utilities.VectorOfConstraints{MathOptInterface.VectorAffineFunction{Float64}, MathOptInterface.Nonnegatives}, MathOptInterface.Utilities.VectorOfConstraints{MathOptInterface.VectorAffineFunction{Float64}, MathOptInterface.PositiveSemidefiniteConeTriangle}}}}, ::String, ::Vararg{String, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base ./io.jl:330
 [13] open(::Function, ::String, ::String)
    @ Base ./io.jl:328
 [14] compressed_open(f::Function, filename::String, mode::String, #unused#::MathOptInterface.FileFormats.NoCompression)
    @ MathOptInterface.FileFormats ~/.julia/packages/MathOptInterface/YDdD3/src/FileFormats/utils.jl:178
 [15] compressed_open(f::Function, filename::String, mode::String, #unused#::MathOptInterface.FileFormats.AutomaticCompression)
    @ MathOptInterface.FileFormats ~/.julia/packages/MathOptInterface/YDdD3/src/FileFormats/utils.jl:216
 [16] read_from_file
    @ ~/.julia/packages/MathOptInterface/YDdD3/src/FileFormats/FileFormats.jl:100 [inlined]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions