-
Notifications
You must be signed in to change notification settings - Fork 13
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
PolyesterForwardDiff
automatic chunksize selection?
#546
Comments
I think this already happens here? Lines 25 to 33 in 88c48c1
|
Interesting. I got the error: [OOP] u0: SVector{2, Float64}: Error During Test at REPL[87]:7
Got exception outside of a @test
MethodError: no method matching rem(::Int64, ::Type{Union{Nothing, Int64}})
Closest candidates are:
rem(::Any, ::Any, ::RoundingMode{:FromZero})
@ Base div.jl:103
rem(::Any, ::Any, ::RoundingMode{:Nearest})
@ Base div.jl:100
rem(::Any, ::Any, ::RoundingMode{:Up})
@ Base div.jl:99
...
Stacktrace:
[1] cld_fast(a::Int64, b::Nothing)
@ PolyesterForwardDiff /mnt/.julia/packages/PolyesterForwardDiff/oqvIt/src/PolyesterForwardDiff.jl:10
[2] threaded_jacobian!(f::DifferentiationInterface.FixTail{NonlinearFunction{false, SciMLBase.FullSpecialize, typeof(quadratic_f), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing}, Tuple{Float64}}, Δx::Matrix{Float64}, x::SVector{2, Float64}, ::ForwardDiff.Chunk{nothing}, check::Val{false})
@ PolyesterForwardDiff /mnt/.julia/packages/PolyesterForwardDiff/oqvIt/src/PolyesterForwardDiff.jl:113
[3] threaded_jacobian!(f::DifferentiationInterface.FixTail{NonlinearFunction{false, SciMLBase.FullSpecialize, typeof(quadratic_f), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing}, Tuple{Float64}}, Δx::Matrix{Float64}, x::SVector{2, Float64}, ::ForwardDiff.Chunk{nothing})
@ PolyesterForwardDiff /mnt/.julia/packages/PolyesterForwardDiff/oqvIt/src/PolyesterForwardDiff.jl:112
[4] jacobian!(f::Function, jac::Matrix{Float64}, ::DifferentiationInterface.NoJacobianPrep, ::AutoPolyesterForwardDiff{nothing, Nothing}, x::SVector{2, Float64}, contexts::DifferentiationInterface.Constant{Float64})
@ DifferentiationInterfacePolyesterForwardDiffExt /mnt/.julia/packages/DifferentiationInterface/gPcSq/ext/DifferentiationInterfacePolyesterForwardDiffExt/onearg.jl:205
[5] jacobian(f::Function, prep::DifferentiationInterface.NoJacobianPrep, backend::AutoPolyesterForwardDiff{nothing, Nothing}, x::SVector{2, Float64}, contexts::DifferentiationInterface.Constant{Float64})
@ DifferentiationInterfacePolyesterForwardDiffExt /mnt/.julia/packages/DifferentiationInterface/gPcSq/ext/DifferentiationInterfacePolyesterForwardDiffExt/onearg.jl:229
[6] jacobian(f::NonlinearFunction{false, SciMLBase.FullSpecialize, typeof(quadratic_f), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing}, backend::AutoPolyesterForwardDiff{nothing, Nothing}, x::SVector{2, Float64}, contexts::DifferentiationInterface.Constant{Float64})
@ DifferentiationInterface /mnt/.julia/packages/DifferentiationInterface/gPcSq/src/fallbacks/no_prep.jl:49
[7] (::SimpleNonlinearSolve.Utils.var"#4#6"{ImmutableNonlinearProblem{SVector{2, Float64}, false, Float64, NonlinearFunction{false, SciMLBase.FullSpecialize, typeof(quadratic_f), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardNonlinearProblem}, AutoPolyesterForwardDiff{nothing, Nothing}})(u::SVector{2, Float64}, p::Float64)
@ SimpleNonlinearSolve.Utils /mnt/software/nonlinearsolve/NonlinearSolve.jl/lib/SimpleNonlinearSolve/src/utils.jl:228
[8] value_and_jacobian(f::Function, prep::DifferentiationInterface.NoJacobianPrep, backend::AutoPolyesterForwardDiff{nothing, Nothing}, x::SVector{2, Float64}, contexts::DifferentiationInterface.Constant{Float64})
@ DifferentiationInterfacePolyesterForwardDiffExt /mnt/.julia/packages/DifferentiationInterface/gPcSq/ext/DifferentiationInterfacePolyesterForwardDiffExt/onearg.jl:215
[9] value_and_jacobian(f::SimpleNonlinearSolve.Utils.var"#4#6"{ImmutableNonlinearProblem{SVector{2, Float64}, false, Float64, NonlinearFunction{false, SciMLBase.FullSpecialize, typeof(quadratic_f), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardNonlinearProblem}, AutoPolyesterForwardDiff{nothing, Nothing}}, backend::AutoPolyesterForwardDiff{nothing, Nothing}, x::SVector{2, Float64}, contexts::DifferentiationInterface.Constant{Float64})
@ DifferentiationInterface /mnt/.julia/packages/DifferentiationInterface/gPcSq/src/fallbacks/no_prep.jl:61 I can give you a better MWE once SciML/NonlinearSolve.jl#458 this massive PR is merged |
My bad, I see what you mean. My custom batch size selection is forwarded, but in methods like this one Lines 129 to 140 in 88c48c1
I should distinguish on whether the chunksize in the backend is |
It's an easy fix, I'll do it tomorrow |
Currently PolyesterForwardDiff forwards a chunksize of
nothing
. I think it would make sense to reuse the automatic chuunksize selection of ForwardDiff here as wellThe text was updated successfully, but these errors were encountered: