Skip to content

Ambiguous method for jtprod! #111

@amontoison

Description

@amontoison

cc @frapac

[ Info: pglib_opf_case1354_pegase
ERROR: MethodError: jtprod_nln!(::ExaModel{Float64, Vector{Float64}, ExaModelsKernelAbstractions.KAExtension{Float64, Vector{Float64}, Nothing, Vector{Tuple{Int64, Int64}}, Vector{Int64}, CPU}, ExaModels.Objective{ExaModels.ObjectiveNull, ExaModels.SIMDFunction{ExaModels.Node2{typeof(+), ExaModels.Node2{typeof(+), ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 2}, ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 1}, Int64}}}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 3}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 1}, Int64}}}}, ExaModels.ParIndexed{ExaModels.ParSource, 4}}, ExaModels.Compressor{Tuple{Int64, Int64}}, ExaModels.Compressor{Tuple{Int64}}}, Vector{@NamedTuple{i::Int64, cost1::Float64, cost2::Float64, cost3::Float64, bus::Int64}}}, ExaModels.ConstraintAug{ExaModels.ConstraintAug{ExaModels.ConstraintAug{ExaModels.ConstraintAug{ExaModels.Constraint{ExaModels.Constraint{ExaModels.Constraint{ExaModels.Constraint{ExaModels.Constraint{ExaModels.Constraint{ExaModels.Constraint{ExaModels.Constraint{ExaModels.Constraint{ExaModels.Constraint{ExaModels.ConstraintNull, ExaModels.SIMDFunction{ExaModels.Var{ExaModels.ParSource}, ExaModels.Compressor{Tuple{Int64}}, ExaModels.Compressor{Tuple{}}}, Vector{Int64}, Int64}, ExaModels.SIMDFunction{ExaModels.Node2{typeof(-), ExaModels.Node2{typeof(-), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 3}, Int64}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 11}, ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}}}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 9}, ExaModels.Node2{typeof(*), ExaModels.Node2{typeof(*), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}}, ExaModels.Node1{typeof(cos), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 5}}, ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 6}}}}}}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 10}, ExaModels.Node2{typeof(*), ExaModels.Node2{typeof(*), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}}, ExaModels.Node1{typeof(sin), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 5}}, ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 6}}}}}}}, ExaModels.Compressor{NTuple{10, Int64}}, ExaModels.Compressor{NTuple{21, Int64}}}, Vector{@NamedTuple{i::Int64, j::Int64, f_idx::Int64, t_idx::Int64, f_bus::Int64, t_bus::Int64, c1::Float64, c2::Float64, c3::Float64, c4::Float64, c5::Float64, c6::Float64, c7::Float64, c8::Float64, rate_a_sq::Float64}}, Int64}, ExaModels.SIMDFunction{ExaModels.Node2{typeof(-), ExaModels.Node2{typeof(+), ExaModels.Node2{typeof(+), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 3}, Int64}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 12}, ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}}}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 10}, ExaModels.Node2{typeof(*), ExaModels.Node2{typeof(*), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}}, ExaModels.Node1{typeof(cos), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 5}}, ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 6}}}}}}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 9}, ExaModels.Node2{typeof(*), ExaModels.Node2{typeof(*), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}}, ExaModels.Node1{typeof(sin), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 5}}, ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 6}}}}}}}, ExaModels.Compressor{NTuple{10, Int64}}, ExaModels.Compressor{NTuple{21, Int64}}}, Vector{@NamedTuple{i::Int64, j::Int64, f_idx::Int64, t_idx::Int64, f_bus::Int64, t_bus::Int64, c1::Float64, c2::Float64, c3::Float64, c4::Float64, c5::Float64, c6::Float64, c7::Float64, c8::Float64, rate_a_sq::Float64}}, Int64}, ExaModels.SIMDFunction{ExaModels.Node2{typeof(-), ExaModels.Node2{typeof(-), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 4}, Int64}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 13}, ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}}}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 7}, ExaModels.Node2{typeof(*), ExaModels.Node2{typeof(*), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}}, ExaModels.Node1{typeof(cos), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 6}}, ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 5}}}}}}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 8}, ExaModels.Node2{typeof(*), ExaModels.Node2{typeof(*), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}}, ExaModels.Node1{typeof(sin), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 6}}, ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 5}}}}}}}, ExaModels.Compressor{NTuple{10, Int64}}, ExaModels.Compressor{NTuple{21, Int64}}}, Vector{@NamedTuple{i::Int64, j::Int64, f_idx::Int64, t_idx::Int64, f_bus::Int64, t_bus::Int64, c1::Float64, c2::Float64, c3::Float64, c4::Float64, c5::Float64, c6::Float64, c7::Float64, c8::Float64, rate_a_sq::Float64}}, Int64}, ExaModels.SIMDFunction{ExaModels.Node2{typeof(-), ExaModels.Node2{typeof(+), ExaModels.Node2{typeof(+), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 4}, Int64}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 14}, ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}}}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 8}, ExaModels.Node2{typeof(*), ExaModels.Node2{typeof(*), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}}, ExaModels.Node1{typeof(cos), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 6}}, ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 5}}}}}}}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 7}, ExaModels.Node2{typeof(*), ExaModels.Node2{typeof(*), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 6}, Int64}}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 5}, Int64}}}, ExaModels.Node1{typeof(sin), ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 6}}, ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 5}}}}}}}, ExaModels.Compressor{NTuple{10, Int64}}, ExaModels.Compressor{NTuple{21, Int64}}}, Vector{@NamedTuple{i::Int64, j::Int64, f_idx::Int64, t_idx::Int64, f_bus::Int64, t_bus::Int64, c1::Float64, c2::Float64, c3::Float64, c4::Float64, c5::Float64, c6::Float64, c7::Float64, c8::Float64, rate_a_sq::Float64}}, Int64}, ExaModels.SIMDFunction{ExaModels.Node2{typeof(-), ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 5}}, ExaModels.Var{ExaModels.ParIndexed{ExaModels.ParSource, 6}}}, ExaModels.Compressor{Tuple{Int64, Int64}}, ExaModels.Compressor{Tuple{}}}, Vector{@NamedTuple{i::Int64, j::Int64, f_idx::Int64, t_idx::Int64, f_bus::Int64, t_bus::Int64, c1::Float64, c2::Float64, c3::Float64, c4::Float64, c5::Float64, c6::Float64, c7::Float64, c8::Float64, rate_a_sq::Float64}}, Int64}, ExaModels.SIMDFunction{ExaModels.Node2{typeof(-), ExaModels.Node2{typeof(+), ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 3}, Int64}}}, ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 3}, Int64}}}}, ExaModels.ParIndexed{ExaModels.ParSource, 15}}, ExaModels.Compressor{Tuple{Int64, Int64}}, ExaModels.Compressor{Tuple{Int64, Int64}}}, Vector{@NamedTuple{i::Int64, j::Int64, f_idx::Int64, t_idx::Int64, f_bus::Int64, t_bus::Int64, c1::Float64, c2::Float64, c3::Float64, c4::Float64, c5::Float64, c6::Float64, c7::Float64, c8::Float64, rate_a_sq::Float64}}, Int64}, ExaModels.SIMDFunction{ExaModels.Node2{typeof(-), ExaModels.Node2{typeof(+), ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 4}, Int64}}}, ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 4}, Int64}}}}, ExaModels.ParIndexed{ExaModels.ParSource, 15}}, ExaModels.Compressor{Tuple{Int64, Int64}}, ExaModels.Compressor{Tuple{Int64, Int64}}}, Vector{@NamedTuple{i::Int64, j::Int64, f_idx::Int64, t_idx::Int64, f_bus::Int64, t_bus::Int64, c1::Float64, c2::Float64, c3::Float64, c4::Float64, c5::Float64, c6::Float64, c7::Float64, c8::Float64, rate_a_sq::Float64}}, Int64}, ExaModels.SIMDFunction{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 2}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 3}, ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 1}, Int64}}}}}, ExaModels.Compressor{Tuple{Int64}}, ExaModels.Compressor{Tuple{Int64}}}, Vector{@NamedTuple{i::Int64, pd::Float64, gs::Float64, qd::Float64, bs::Float64, bus_type::Int64}}, Int64}, ExaModels.SIMDFunction{ExaModels.Node2{typeof(-), ExaModels.ParIndexed{ExaModels.ParSource, 4}, ExaModels.Node2{typeof(*), ExaModels.ParIndexed{ExaModels.ParSource, 5}, ExaModels.Node1{typeof(abs2), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 1}, Int64}}}}}, ExaModels.Compressor{Tuple{Int64}}, ExaModels.Compressor{Tuple{Int64}}}, Vector{@NamedTuple{i::Int64, pd::Float64, gs::Float64, qd::Float64, bs::Float64, bus_type::Int64}}, Int64}, ExaModels.SIMDFunction{Pair{ExaModels.ParIndexed{ExaModels.ParSource, 3}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 1}, Int64}}}, ExaModels.Compressor{Tuple{Int64}}, ExaModels.Compressor{Tuple{}}}, Vector{@NamedTuple{i::Int64, rate_a::Float64, bus::Int64}}}, ExaModels.SIMDFunction{Pair{ExaModels.ParIndexed{ExaModels.ParSource, 3}, ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 1}, Int64}}}, ExaModels.Compressor{Tuple{Int64}}, ExaModels.Compressor{Tuple{}}}, Vector{@NamedTuple{i::Int64, rate_a::Float64, bus::Int64}}}, ExaModels.SIMDFunction{Pair{ExaModels.ParIndexed{ExaModels.ParSource, 5}, ExaModels.Node1{typeof(-), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 1}, Int64}}}}, ExaModels.Compressor{Tuple{Int64}}, ExaModels.Compressor{Tuple{}}}, Vector{@NamedTuple{i::Int64, cost1::Float64, cost2::Float64, cost3::Float64, bus::Int64}}}, ExaModels.SIMDFunction{Pair{ExaModels.ParIndexed{ExaModels.ParSource, 5}, ExaModels.Node1{typeof(-), ExaModels.Var{ExaModels.Node2{typeof(+), ExaModels.ParIndexed{ExaModels.ParSource, 1}, Int64}}}}, ExaModels.Compressor{Tuple{Int64}}, ExaModels.Compressor{Tuple{}}}, Vector{@NamedTuple{i::Int64, cost1::Float64, cost2::Float64, cost3::Float64, bus::Int64}}}}, ::Vector{Float64}, ::SubArray{Float64, 1, Vector{Float64}, Tuple{Vector{Int64}}, false}, ::Vector{Float64}) is ambiguous.

Candidates:
  jtprod_nln!(m::ExaModel{T, VT, E}, x::AbstractVector, v::AbstractVector, Jtv::AbstractVector) where {T, VT, E<:(ExaModelsKernelAbstractions.KAExtension{T, VT, Nothing})}
    @ ExaModelsKernelAbstractions ~/.julia/packages/ExaModels/tBDe7/ext/ExaModelsKernelAbstractions.jl:330
  jtprod_nln!(m::ExaModel{T, VT, E}, x::AbstractVector, v::AbstractVector, Jtv::AbstractVector) where {T, VT, E<:ExaModelsKernelAbstractions.KAExtension}
    @ ExaModelsKernelAbstractions ~/.julia/packages/ExaModels/tBDe7/ext/ExaModelsKernelAbstractions.jl:370

Possible fix, define
  jtprod_nln!(::ExaModel{T, VT, E}, ::AbstractVector, ::AbstractVector, ::AbstractVector) where {T, VT<:AbstractVector{T}, E<:(ExaModelsKernelAbstractions.KAExtension{T, VT, Nothing})}

Stacktrace:
 [1] jtprod!(nlp::ExaModel{Float64, Vector{…}, ExaModelsKernelAbstractions.KAExtension{…}, ExaModels.Objective{…}, ExaModels.ConstraintAug{…}}, x::Vector{Float64}, v::Vector{Float64}, Jtv::Vector{Float64})
   @ NLPModels ~/.julia/packages/NLPModels/XBcWL/src/nlp/api.jl:490
 [2] jtprod(nlp::ExaModel{Float64, Vector{…}, ExaModelsKernelAbstractions.KAExtension{…}, ExaModels.Objective{…}, ExaModels.ConstraintAug{…}}, x::Vector{Float64}, v::Vector{Float64})
   @ NLPModels ~/.julia/packages/NLPModels/XBcWL/src/nlp/api.jl:471
 [3] get_dual_residual(model::ExaModel{…}, stats::MadNLP.MadNLPExecutionStats{…})
   @ Main ~/Argonne/MadNCL.jl/benchmarks/common.jl:52
 [4] run_benchmark(name::String, solver::typeof(solve_madnlp), instances::Vector{Any}; options::@Kwargs{kkt_system::UnionAll, linear_solver::UnionAll, tol::Float64})
   @ Main ~/Argonne/MadNCL.jl/benchmarks/common.jl:292
 [5] main(name::String; tol::Float64, madnlp::Bool, madncl::Bool, hykkt::Bool, likkt::Bool)
   @ Main ~/Argonne/MadNCL.jl/benchmarks/OPF/main.jl:86
 [6] main
   @ ~/Argonne/MadNCL.jl/benchmarks/OPF/main.jl:77 [inlined]
 [7] top-level scope
   @ ./REPL[14]:48
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    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