Skip to content

step! on init(NonlinearProblem(...) with NonlinearSolvePolyAlgorithmCache shows method error #363

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jamblejoe opened this issue Feb 1, 2024 · 2 comments · Fixed by #378
Labels
bug Something isn't working

Comments

@jamblejoe
Copy link

No method error for step! on init(NonlinearProblem(...) with NonlinearSolvePolyAlgorithmCache.

Minimal Reproducible Example 👇

From README:

f(u, p) = u .* u .- 2
u0 = @SVector[1.0, 1.0]
prob = NonlinearProblem(f, u0)
nlcache = init(prob);
step!(nlcache)

Error & Stacktrace ⚠️

ERROR: MethodError: no method matching __step!(::NonlinearSolve.NonlinearSolvePolyAlgorithmCache{false, 7, Tuple{…}, NonlinearSolvePolyAlgorithm{…}})

Closest candidates are:
  __step!(::NonlinearSolve.GeneralizedDFSaneCache{iip}; recompute_jacobian, kwargs...) where iip
   @ NonlinearSolve ~/.julia/packages/NonlinearSolve/UPIol/src/core/spectral_methods.jl:157
  __step!(::NonlinearSolve.GeneralizedFirstOrderAlgorithmCache{iip, GB}; recompute_jacobian, kwargs...) where {iip, GB}
   @ NonlinearSolve ~/.julia/packages/NonlinearSolve/UPIol/src/core/generalized_first_order.jl:203
  __step!(::NonlinearSolve.ApproximateJacobianSolveCache{INV, GB, iip}; recompute_jacobian) where {INV, GB, iip}
   @ NonlinearSolve ~/.julia/packages/NonlinearSolve/UPIol/src/core/approximate_jacobian.jl:220

Stacktrace:
 [1] step!(::NonlinearSolve.NonlinearSolvePolyAlgorithmCache{…}; kwargs::@Kwargs{})
   @ NonlinearSolve ~/.julia/packages/NonlinearSolve/UPIol/src/core/generic.jl:52
 [2] step!(::NonlinearSolve.NonlinearSolvePolyAlgorithmCache{false, 7, Tuple{…}, NonlinearSolvePolyAlgorithm{…}})
   @ NonlinearSolve ~/.julia/packages/NonlinearSolve/UPIol/src/core/generic.jl:48
 [3] top-level scope
   @ REPL[85]:1
Some type information was truncated. Use `show(err)` to see complete types.

Environment (please complete the following information):

  • Output of using Pkg; Pkg.status()
  [8913a72c] NonlinearSolve v3.5.3 `https://github.com/SciML/NonlinearSolve.jl.git#master`
  • Output of versioninfo()
julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores
@jamblejoe jamblejoe added the bug Something isn't working label Feb 1, 2024
@avik-pal
Copy link
Member

avik-pal commented Feb 1, 2024

This one is kind of expected because it was not clear to me what a single step of a polyalgorithm means.

  1. Is it single step of the current algorithm?
  2. Is it a single step of all the algorithms?

Based on how solve works it should be the former but i was not too confident about this.

cc @ChrisRackauckas

@ChrisRackauckas
Copy link
Member

Single step of the current algorithm I think makes the most sense.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants