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

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

Closed
KristofferC opened this issue Sep 5, 2019 · 0 comments · Fixed by #2063
Closed

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

KristofferC opened this issue Sep 5, 2019 · 0 comments · Fixed by #2063
Assignees

Comments

@KristofferC
Copy link

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.

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