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

Invalid Bandind error / Manifolds.jl #148

Closed
mateuszbaran opened this issue Dec 14, 2023 · 11 comments
Closed

Invalid Bandind error / Manifolds.jl #148

mateuszbaran opened this issue Dec 14, 2023 · 11 comments
Assignees
Labels

Comments

@mateuszbaran
Copy link

BoundaryValueDiffEq.jl is again causing test failures in Manifolds.jl:

  Invalid Bandind
  Stacktrace:
    [1] _bandsize
      @ ~/.julia/packages/ArrayInterface/Ic7Rb/ext/ArrayInterfaceBandedMatricesExt.jl:46 [inlined]
    [2] #1
      @ ./none:0 [inlined]
    [3] iterate(g::Base.Generator, s::Vararg{Any})
      @ Base ./generator.jl:47 [inlined]
    [4] collect(itr::Base.Generator{StepRange{Int64, Int64}, ArrayInterfaceBandedMatricesExt.var"#1#2"{Int64, Int64}})
      @ Base ./array.jl:834
    [5] ArrayInterface.BandedMatrixIndex(rowsize::Int64, colsize::Int64, lowerbandwidth::Int64, upperbandwidth::Int64, isrow::Bool)
      @ ArrayInterfaceBandedMatricesExt ~/.julia/packages/ArrayInterface/Ic7Rb/ext/ArrayInterfaceBandedMatricesExt.jl:59
    [6] findstructralnz
      @ ~/.julia/packages/ArrayInterface/Ic7Rb/ext/ArrayInterfaceBandedMatricesExt.jl:66 [inlined]
    [7] #_#94
      @ ~/.julia/packages/SparseDiffTools/PsgQF/src/highlevel/coloring.jl:29 [inlined]
    [8] PrecomputedJacobianColorvec
      @ ~/.julia/packages/SparseDiffTools/PsgQF/src/highlevel/coloring.jl:26 [inlined]
    [9] sparse_jacobian_cache(ad::AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, sd::PrecomputedJacobianColorvec{BandedMatrices.BandedMatrix{Float64, Matrix{Float64}, Base.OneTo{Int64}}, Vector{Int64}, Vector{Int64}}, f!::BoundaryValueDiffEq.var"#135#141"{BoundaryValueDiffEq.MIRKCache{true, Float64, Tuple{Int64}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, BVProblem{Vector{Vector{Float64}}, Tuple{Float64, Float64}, true, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, SciMLBase.StandardBVProblem, @Kwargs{}}, SciMLBase.StandardBVProblem, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, MIRK4{Nothing, BVPJacobianAlgorithm{AutoForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}}}, BoundaryValueDiffEq.MIRKTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}}, BoundaryValueDiffEq.MIRKInterpTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{PreallocationTools.DiffCache{Matrix{Float64}, Vector{Float64}}}, Vector{Matrix{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, Vector{Vector{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}, Vector{Float64}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Tuple{Int64}, @NamedTuple{defect_threshold::Float64, MxNsub::Int64, abstol::Float64, dt::Float64, adaptive::Bool}}, BoundaryValueDiffEq.var"#117#123"{BoundaryValueDiffEq.MIRKCache{true, Float64, Tuple{Int64}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, BVProblem{Vector{Vector{Float64}}, Tuple{Float64, Float64}, true, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, SciMLBase.StandardBVProblem, @Kwargs{}}, SciMLBase.StandardBVProblem, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, MIRK4{Nothing, BVPJacobianAlgorithm{AutoForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}}}, BoundaryValueDiffEq.MIRKTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}}, BoundaryValueDiffEq.MIRKInterpTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{PreallocationTools.DiffCache{Matrix{Float64}, Vector{Float64}}}, Vector{Matrix{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, Vector{Vector{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}, Vector{Float64}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Tuple{Int64}, @NamedTuple{defect_threshold::Float64, MxNsub::Int64, abstol::Float64, dt::Float64, adaptive::Bool}}}}, fx::Vector{Float64}, x::Vector{Float64})
      @ SparseDiffTools ~/.julia/packages/SparseDiffTools/PsgQF/src/highlevel/forward_mode.jl:41
   [10] __sparse_jacobian_cache
      @ ~/.julia/packages/BoundaryValueDiffEq/ComOY/src/sparse_jacobians.jl:17 [inlined]
   [11] __construct_nlproblem(cache::BoundaryValueDiffEq.MIRKCache{true, Float64, Tuple{Int64}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, BVProblem{Vector{Vector{Float64}}, Tuple{Float64, Float64}, true, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, SciMLBase.StandardBVProblem, @Kwargs{}}, SciMLBase.StandardBVProblem, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, MIRK4{Nothing, BVPJacobianAlgorithm{AutoForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}}}, BoundaryValueDiffEq.MIRKTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}}, BoundaryValueDiffEq.MIRKInterpTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{PreallocationTools.DiffCache{Matrix{Float64}, Vector{Float64}}}, Vector{Matrix{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, Vector{Vector{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}, Vector{Float64}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Tuple{Int64}, @NamedTuple{defect_threshold::Float64, MxNsub::Int64, abstol::Float64, dt::Float64, adaptive::Bool}}, y::Vector{Float64}, loss_bc::BoundaryValueDiffEq.var"#115#121"{BoundaryValueDiffEq.MIRKCache{true, Float64, Tuple{Int64}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, BVProblem{Vector{Vector{Float64}}, Tuple{Float64, Float64}, true, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, SciMLBase.StandardBVProblem, @Kwargs{}}, SciMLBase.StandardBVProblem, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, MIRK4{Nothing, BVPJacobianAlgorithm{AutoForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}}}, BoundaryValueDiffEq.MIRKTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}}, BoundaryValueDiffEq.MIRKInterpTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{PreallocationTools.DiffCache{Matrix{Float64}, Vector{Float64}}}, Vector{Matrix{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, Vector{Vector{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}, Vector{Float64}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Tuple{Int64}, @NamedTuple{defect_threshold::Float64, MxNsub::Int64, abstol::Float64, dt::Float64, adaptive::Bool}}, SciMLBase.StandardBVProblem}, loss_collocation::BoundaryValueDiffEq.var"#117#123"{BoundaryValueDiffEq.MIRKCache{true, Float64, Tuple{Int64}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, BVProblem{Vector{Vector{Float64}}, Tuple{Float64, Float64}, true, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, SciMLBase.StandardBVProblem, @Kwargs{}}, SciMLBase.StandardBVProblem, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, MIRK4{Nothing, BVPJacobianAlgorithm{AutoForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}}}, BoundaryValueDiffEq.MIRKTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}}, BoundaryValueDiffEq.MIRKInterpTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{PreallocationTools.DiffCache{Matrix{Float64}, Vector{Float64}}}, Vector{Matrix{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, Vector{Vector{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}, Vector{Float64}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Tuple{Int64}, @NamedTuple{defect_threshold::Float64, MxNsub::Int64, abstol::Float64, dt::Float64, adaptive::Bool}}}, loss::BoundaryValueDiffEq.var"#119#125"{BoundaryValueDiffEq.MIRKCache{true, Float64, Tuple{Int64}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, BVProblem{Vector{Vector{Float64}}, Tuple{Float64, Float64}, true, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, SciMLBase.StandardBVProblem, @Kwargs{}}, SciMLBase.StandardBVProblem, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, MIRK4{Nothing, BVPJacobianAlgorithm{AutoForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}}}, BoundaryValueDiffEq.MIRKTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}}, BoundaryValueDiffEq.MIRKInterpTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{PreallocationTools.DiffCache{Matrix{Float64}, Vector{Float64}}}, Vector{Matrix{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, Vector{Vector{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}, Vector{Float64}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Tuple{Int64}, @NamedTuple{defect_threshold::Float64, MxNsub::Int64, abstol::Float64, dt::Float64, adaptive::Bool}}, SciMLBase.StandardBVProblem}, ::SciMLBase.StandardBVProblem)
      @ BoundaryValueDiffEq ~/.julia/packages/BoundaryValueDiffEq/ComOY/src/solve/mirk.jl:315
   [12] __construct_nlproblem
      @ BoundaryValueDiffEq ~/.julia/packages/BoundaryValueDiffEq/ComOY/src/solve/mirk.jl:214 [inlined]
   [13] solve!(cache::BoundaryValueDiffEq.MIRKCache{true, Float64, Tuple{Int64}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, BVProblem{Vector{Vector{Float64}}, Tuple{Float64, Float64}, true, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, SciMLBase.StandardBVProblem, @Kwargs{}}, SciMLBase.StandardBVProblem, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, MIRK4{Nothing, BVPJacobianAlgorithm{AutoForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}, AutoSparseForwardDiff{nothing, BoundaryValueDiffEq.BoundaryValueDiffEqTag}}}, BoundaryValueDiffEq.MIRKTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}}, BoundaryValueDiffEq.MIRKInterpTableau{Int64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{PreallocationTools.DiffCache{Matrix{Float64}, Vector{Float64}}}, Vector{Matrix{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, Vector{Vector{Float64}}, Vector{PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{Float64}}, Vector{Float64}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Tuple{Int64}, @NamedTuple{defect_threshold::Float64, MxNsub::Int64, abstol::Float64, dt::Float64, adaptive::Bool}})
      @ BoundaryValueDiffEq ~/.julia/packages/BoundaryValueDiffEq/ComOY/src/solve/mirk.jl:144
   [14] #__solve#157
      @ ~/.julia/packages/BoundaryValueDiffEq/ComOY/src/BoundaryValueDiffEq.jl:47 [inlined]
   [15] __solve
      @ ~/.julia/packages/BoundaryValueDiffEq/ComOY/src/BoundaryValueDiffEq.jl:45 [inlined]
   [16] #solve_call#34
      @ ~/.julia/packages/DiffEqBase/a6p43/src/solve.jl:561 [inlined]
   [17] solve_call
      @ ~/.julia/packages/DiffEqBase/a6p43/src/solve.jl:527 [inlined]
   [18] solve_up(prob::BVProblem{Vector{Vector{Float64}}, Tuple{Float64, Float64}, true, Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, BVPFunction{true, SciMLBase.FullSpecialize, false, typeof(ManifoldsBoundaryValueDiffEqExt.chart_log_problem!), ManifoldsBoundaryValueDiffEqExt.var"#bc1!#2"{Vector{Float64}, Vector{Float64}}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing}, SciMLBase.StandardBVProblem, @Kwargs{}}, sensealg::Nothing, u0::Vector{Vector{Float64}}, p::Tuple{Manifolds.EmbeddedTorus{Int64}, Manifolds.DefaultTorusAtlas, Tuple{Int64, Int64}}, args::MIRK4{Nothing, BVPJacobianAlgorithm{Nothing, Nothing, Nothing}}; kwargs::@Kwargs{dt::Float64})
      @ DiffEqBase ~/.julia/packages/DiffEqBase/a6p43/src/solve.jl:1010
   [19] solve_up
      @ DiffEqBase ~/.julia/packages/DiffEqBase/a6p43/src/solve.jl:996 [inlined]
   [20] #solve#40
      @ DiffEqBase ~/.julia/packages/DiffEqBase/a6p43/src/solve.jl:933 [inlined]
   [21] solve_chart_log_bvp(M::Manifolds.EmbeddedTorus{Int64}, a1::Vector{Float64}, a2::Vector{Float64}, A::Manifolds.DefaultTorusAtlas, i::Tuple{Int64, Int64}; solver::MIRK4{Nothing, BVPJacobianAlgorithm{Nothing, Nothing, Nothing}}, dt::Float64, kwargs::@Kwargs{})
      @ ManifoldsBoundaryValueDiffEqExt ~/work/Manifolds.jl/Manifolds.jl/ext/ManifoldsBoundaryValueDiffEqExt.jl:70
   [22] solve_chart_log_bvp(M::Manifolds.EmbeddedTorus{Int64}, a1::Vector{Float64}, a2::Vector{Float64}, A::Manifolds.DefaultTorusAtlas, i::Tuple{Int64, Int64})
      @ ManifoldsBoundaryValueDiffEqExt ~/work/Manifolds.jl/Manifolds.jl/ext/ManifoldsBoundaryValueDiffEqExt.jl:51
   [23] macro expansion
      @ ~/work/Manifolds.jl/Manifolds.jl/test/manifolds/embedded_torus.jl:92 [inlined]
   [24] macro expansion
      @ /opt/hostedtoolcache/julia/1.10.0-rc2/x64/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [25] top-level scope
      @ ~/work/Manifolds.jl/Manifolds.jl/test/manifolds/embedded_torus.jl:11
   [26] include
      @ ./client.jl:489 [inlined]
   [27] macro expansion
      @ ./timing.jl:279 [inlined]
   [28] include_test(path::String)
      @ Main ~/work/Manifolds.jl/Manifolds.jl/test/utils.jl:27
   [29] macro expansion
      @ ~/work/Manifolds.jl/Manifolds.jl/test/runtests.jl:191 [inlined]
   [30] macro expansion
      @ /opt/hostedtoolcache/julia/1.10.0-rc2/x64/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [31] top-level scope
      @ ~/work/Manifolds.jl/Manifolds.jl/test/runtests.jl:11
   [32] include(fname::String)
      @ Base.MainInclude ./client.jl:489
   [33] top-level scope
      @ none:6
   [34] eval
      @ Core ./boot.jl:385 [inlined]
   [35] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:291
   [36] _start()
      @ Base ./client.jl:552

See here: https://github.com/JuliaManifolds/Manifolds.jl/actions/runs/7211150273/job/19646434007?pr=692 .
I could write an MWE but at this point I think our use case should be just added to your test suite? It keeps failing so often and it's not too complex.

@mateuszbaran mateuszbaran changed the title Invalid Bandid error / Manifolds.jl Invalid Bandind error / Manifolds.jl Dec 14, 2023
@ChrisRackauckas
Copy link
Member

I could write an MWE but at this point I think our use case should be just added to your test suite? It keeps failing so often and it's not too complex.

That would be good yes. It sounds like we're missing something.

@mateuszbaran
Copy link
Author

mateuszbaran commented Dec 14, 2023

Here is a full independent example:

using BoundaryValueDiffEq

struct EmbeddedTorus
    R::Float64
    r::Float64
end

function affine_connection!(M::EmbeddedTorus, Zc, i, a, Xc, Yc)
    θ = a[1] .+ i[1]
    sinθ, cosθ = sincos(θ)
    Γ¹₂₂ = (M.R + M.r * cosθ) * sinθ / M.r
    Γ²₁₂ = -M.r * sinθ / (M.R + M.r * cosθ)

    Zc[1] = Xc[2] * Γ¹₂₂ * Yc[2]
    Zc[2] = Γ²₁₂ * (Xc[1] * Yc[2] + Xc[2] * Yc[1])
    return Zc
end

M = EmbeddedTorus(3, 2)
a1 = [0.5, -1.2]
a2 = [-0.5, 0.3]
i = (0, 0)
solver=MIRK4()
dt=0.05
tspan = (0.0, 1.0)
function bc1!(residual, u, p, t)
    mid = div(length(u[1]), 2)
    residual[1:mid] = u[1][1:mid] - a1
    return residual[(mid + 1):end] = u[end][1:mid] - a2
end
function chart_log_problem!(du, u, params, t)
    M, i = params
    mid = div(length(u), 2)
    a = u[1:mid]
    dx = u[(mid + 1):end]
    ddx = similar(dx)
    affine_connection!(M, ddx, i, a, dx, dx)
    ddx .*= -1
    du[1:mid] .= dx
    du[(mid + 1):end] .= ddx
    return du
end
u0 = [vcat(a1, zero(a1)), vcat(a2, zero(a1))]
bvp1 = BVProblem(chart_log_problem!, bc1!, u0, tspan, (M, i))
sol1 = solve(bvp1, solver, dt=dt)

I get the error locally with

  [4fba245c] ArrayInterface v7.6.1
  [764a87c0] BoundaryValueDiffEq v5.5.0
  [2b5f629d] DiffEqBase v6.143.0
  [459566f4] DiffEqCallbacks v2.35.0
⌃ [1dea7af3] OrdinaryDiffEq v6.59.3
⌅ [731186ca] RecursiveArrayTools v2.38.10

@avik-pal
Copy link
Member

@mateuszbaran I will add this in our test suite. What is ddx supposed to be in affine_connection!(M, ddx, i, a, dx, dx)?

@mateuszbaran
Copy link
Author

Thanks! This is essentially the geodesic equation on a torus in R^3, see https://en.wikipedia.org/wiki/Geodesic#Affine_geodesics . ddx is the second derivative in that equation. I'm using BoundaryValueDiffEq.jl to find the shortest geodesic between two points.

@avik-pal
Copy link
Member

I meant is ddx = zeros(2)? it is missing in the code

@mateuszbaran
Copy link
Author

ddx is filled by affine_connection!(M::EmbeddedTorus, Zc, i, a, Xc, Yc), where it's called Zc.

@mateuszbaran
Copy link
Author

Ah, sorry, I understand now what you mean. It was supposed to be ddx = similar(dx). I've fixed that and tried re-running the example and now I get

Arrays with non-number element types, such as
`Array{Array{Float64}}`, are not supported by the
solvers.

which I guess is a breaking change introduced at some point recently without making a breaking release?

@avik-pal
Copy link
Member

I am fixing that. Basically the order of fixes will be:

  1. Upper Bound DiffEqBase and Patch a few failures in Upper bound diffeqbase and patch bandind error #152
  2. Then we release Upper bound diffeqbase and patch bandind error #152. The new way for initial guess will be VectorOfArray(...)

@mateuszbaran
Copy link
Author

I see, thanks!

@avik-pal
Copy link
Member

@mateuszbaran I will also add a downstream test on Manifolds.jl. Is there a particular group I should test https://github.com/JuliaManifolds/Manifolds.jl/blob/b2d83b337e214158f64d22a39776b9a80ffd2981/test/utils.jl#L4 for boundaryvaluediffeq?

@mateuszbaran
Copy link
Author

test_integration group has the test for BoundaryValueDiffEq but currently the example I've pasted above is the only use case we have for BVP and we don't have any plans to add new functionality relying on BVP. Adding the test case I've posted above should be enough IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants