Skip to content

Heads up about test error in JuMP for upcoming 1.3 RC-2. #2054

@KristofferC

Description

@KristofferC

When running this package test on what will be Julia 1.3-RC2 an error occured which is reproduced by the script below:

julia> using JuMP, SparseArrays

julia> ModelType = Model; VariableRefType = VariableRef

julia> model = ModelType()

julia> @variable(model, x[1:3])

julia> A = [2 1 0
            1 2 1
            0 1 2]

julia> B = sparse(A)

julia> @variable(model, X11)

julia> @variable(model, X23)

julia> X = sparse([1, 2], [1, 3], [X11, X23], 3, 3)

julia> A * X'

julia> A * X'
ERROR: MethodError: no method matching _mul!(::Array{GenericAffExpr{Float64,VariableRef},2}, ::Array{Int64,2}, ::LinearAlgebra.Adjoint{VariableRef,SparseMatrixCSC{VariableRef,Int64}}, ::GenericAffExpr{Float64,VariableRef}, ::GenericAffExpr{Float64,VariableRef})
Closest candidates are:
  _mul!(::Union{AbstractArray{#s38,1}, AbstractArray{#s38,2}} where #s38<:(Union{GenericAffExpr{C,V}, GenericQuadExpr{C,V}} where V where C), ::Union{LinearAlgebra.Adjoint{#s37,#s27}, LinearAlgebra.Transpose{#s37,#s27}} where #s27<:SparseMatrixCSC where #s37, ::Union{AbstractArray{T,1}, AbstractArray{T,2}} where T, ::Any, ::Any) at /home/kristofferc/.julia/dev/JuMP/src/operators.jl:404
  _mul!(::Union{AbstractArray{#s90,1}, AbstractArray{#s90,2}} where #s90<:(Union{GenericAffExpr{C,V}, GenericQuadExpr{C,V}} where V where C), ::SparseMatrixCSC, ::Union{AbstractArray{T,1}, AbstractArray{T,2}} where T, ::Any, ::Any) at /home/kristofferc/.julia/dev/JuMP/src/operators.jl:430
  _mul!(::Union{AbstractArray{#s89,1}, AbstractArray{#s89,2}} where #s89<:(Union{GenericAffExpr{C,V}, GenericQuadExpr{C,V}} where V where C), ::Union{LinearAlgebra.Adjoint{#s87,#s53}, LinearAlgebra.Transpose{#s87,#s53}} where #s53<:SparseMatrixCSC where #s87, ::Union{AbstractArray{T,1}, AbstractArray{T,2}} where T, ::Any) at /home/kristofferc/.julia/dev/JuMP/src/operators.jl:404
  ...
Stacktrace:
 [1] mul!(::Array{GenericAffExpr{Float64,VariableRef},2}, ::Array{Int64,2}, ::LinearAlgebra.Adjoint{VariableRef,SparseMatrixCSC{VariableRef,Int64}}, ::GenericAffExpr{Float64,VariableRef}, ::GenericAffExpr{Float64,VariableRef}) at /home/kristofferc/.julia/dev/JuMP/src/operators.jl:534
 [2] *(::Array{Int64,2}, ::LinearAlgebra.Adjoint{VariableRef,SparseMatrixCSC{VariableRef,Int64}}) at /home/kristofferc/julia/usr/share/julia/stdlib/v1.3/SparseArrays/src/linalg.jl:154
 [3] top-level scope at REPL[20]:1

It is likely that JuMP need to update due to changes in the mul! signatures.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions