-
Notifications
You must be signed in to change notification settings - Fork 8
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
MOI failure on nightly #260
Comments
julia> x = MOI.VariableIndex(1)
MOI.VariableIndex(1)
julia> f = LinearAlgebra.Symmetric([2*x*x 0; 0 0])
2×2 LinearAlgebra.Symmetric{MathOptInterface.ScalarQuadraticFunction{Int64}, Matrix{MathOptInterface.ScalarQuadraticFunction{Int64}}}:
(0) + 2.0 MOI.VariableIndex(1)² (0)
(0) (0)
julia> 2 * (f * 2)
ERROR: UndefRefError: access to undefined reference
Stacktrace:
[1] getindex
@ ./essentials.jl:892 [inlined]
[2] getindex
@ ./array.jl:915 [inlined]
[3] getindex
@ ./multidimensional.jl:700 [inlined]
[4] _broadcast_getindex
@ ./broadcast.jl:639 [inlined]
[5] _getindex
@ ./broadcast.jl:670 [inlined]
[6] _getindex
@ ./broadcast.jl:669 [inlined]
[7] _broadcast_getindex
@ ./broadcast.jl:645 [inlined]
[8] getindex
@ ./broadcast.jl:605 [inlined]
[9] macro expansion
@ ./broadcast.jl:968 [inlined]
[10] macro expansion
@ ./simdloop.jl:77 [inlined]
[11] copyto!
@ ./broadcast.jl:967 [inlined]
[12] copyto!
@ ./broadcast.jl:920 [inlined]
[13] copy
@ ./broadcast.jl:892 [inlined]
[14] materialize
@ ./broadcast.jl:867 [inlined]
[15] broadcast_preserving_zero_d
@ ./broadcast.jl:856 [inlined]
[16] *(A::Int64, B::Matrix{MathOptInterface.ScalarQuadraticFunction{Int64}})
@ Base ./arraymath.jl:21
[17] *(α::Int64, A::LinearAlgebra.Symmetric{MathOptInterface.ScalarQuadraticFunction{Int64}, Matrix{MathOptInterface.ScalarQuadraticFunction{Int64}}})
@ MutableArithmetics ~/.julia/packages/MutableArithmetics/NIXlP/src/dispatch.jl:478
[18] top-level scope
@ REPL[102]:1 |
julia> (2 * f).data
2×2 Matrix{MathOptInterface.ScalarQuadraticFunction{Int64}}:
(0) + 4.0 MOI.VariableIndex(1)² (0)
(0) (0)
julia> (f * 2).data
2×2 Matrix{MathOptInterface.ScalarQuadraticFunction{Int64}}:
(0) + 4.0 MOI.VariableIndex(1)² (0)
#undef (0) |
Merged
On Julia 1.10 julia> (f * 2).data
2×2 Matrix{MathOptInterface.ScalarQuadraticFunction{Int64}}:
(0) + 4.0 MOI.VariableIndex(1)² (0)
(0) (0)
julia> (2 * f).data
2×2 Matrix{MathOptInterface.ScalarQuadraticFunction{Int64}}:
(0) + 4.0 MOI.VariableIndex(1)² (0)
(0) (0) |
Looks like the cause was JuliaLang/julia#52942, which added an optimization to only modify the relevant upper or lower triangle. That's probably fair. We need to update: MutableArithmetics.jl/src/dispatch.jl Lines 475 to 497 in 48569d2
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When
2 * f
is notf *2
...The text was updated successfully, but these errors were encountered: