SciML / NonlinearSolve.jl

High-performance and differentiation-enabled nonlinear solvers (Newton methods), bracketed rootfinding (bisection, Falsi), with sparsity and Newton-Krylov support.
https://docs.sciml.ai/NonlinearSolve/stable/
MIT License
216 stars 39 forks source link

Nolinearsolve returns error for documentation example in Julia 1.10,1 #386

Closed ay111 closed 4 months ago

ay111 commented 4 months ago

Kindly see the error in the julia REPL shown below.

using NonlinearSolve

f(u, p) = u .* u .- p
# f (generic function with 1 method)

u0 = [1.0, 1.0]
p = 2.0

prob = NonlinearProblem(f, u0, p)

sol = solve(prob)
#=
ERROR: MethodError: no method matching init(::NonlinearProblem{…})

Closest candidates are:
  init(::OptimizationProblem, ::Any, ::Any...; kwargs...)
   @ SciMLBase C:\Users\adeto\.julia\packages\SciMLBase\QqtZA\src\solve.jl:144

Stacktrace:
 [1] solve(args::NonlinearProblem{…}; kwargs::@Kwargs{})
   @ CommonSolve C:\Users\adeto\.julia\packages\CommonSolve\JfpfI\src\CommonSolve.jl:23
 [2] top-level scope
   @ REPL[6]:1
Some type information was truncated. Use `show(err)` to see complete types.
=#
avik-pal commented 4 months ago

what version of NonlinearSolve are you using?

ay111 commented 4 months ago

The version is 3.22. I update Julia every day but it refused to update it to 3.73.

Regards.

On Tue, 27 Feb 2024, 12:21 am Avik Pal, @.***> wrote:

what version of NonlinearSolve are you using?

— Reply to this email directly, view it on GitHub https://github.com/SciML/NonlinearSolve.jl/issues/386#issuecomment-1965408889, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4NBY5QCYWE47VYQPAW5OTYVUDHFAVCNFSM6AAAAABD27B5FCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGQYDQOBYHE . You are receiving this because you authored the thread.Message ID: @.***>

avik-pal commented 4 months ago

Please try in a fresh environment with 3.7

ChrisRackauckas commented 4 months ago

Share ]st

ay111 commented 4 months ago

This is the screenshot of the status.

On Tue, 27 Feb 2024, 8:59 am Christopher Rackauckas, < @.***> wrote:

Share ]st

— Reply to this email directly, view it on GitHub https://github.com/SciML/NonlinearSolve.jl/issues/386#issuecomment-1965903190, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4NBY76H3SYADYDEFOHV2LYVV76JAVCNFSM6AAAAABD27B5FCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVHEYDGMJZGA . You are receiving this because you authored the thread.Message ID: @.***>

avik-pal commented 4 months ago

The screenshot didn't get added

ay111 commented 4 months ago

See the attached screenshot.

On Tue, 27 Feb 2024, 3:07 pm Avik Pal, @.***> wrote:

The screenshot didn't get added

— Reply to this email directly, view it on GitHub https://github.com/SciML/NonlinearSolve.jl/issues/386#issuecomment-1966508277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4NBY5CFKZMAX4KTDYGOGTYVXK7LAVCNFSM6AAAAABD27B5FCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWGUYDQMRXG4 . You are receiving this because you authored the thread.Message ID: @.***>

ay111 commented 4 months ago

See the attached pdf for the status screenshot.

Regards.

On Tue, 27 Feb 2024, 4:15 pm Rasheed Adetona, @.***> wrote:

See the attached screenshot.

On Tue, 27 Feb 2024, 3:07 pm Avik Pal, @.***> wrote:

The screenshot didn't get added

— Reply to this email directly, view it on GitHub https://github.com/SciML/NonlinearSolve.jl/issues/386#issuecomment-1966508277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4NBY5CFKZMAX4KTDYGOGTYVXK7LAVCNFSM6AAAAABD27B5FCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWGUYDQMRXG4 . You are receiving this because you authored the thread.Message ID: @.***>

avik-pal commented 4 months ago

github doesn't forward attachments of email.

ay111 commented 4 months ago

Kindly send your email so that I can send it to you directly.

On Wed, Feb 28, 2024 at 4:37 PM Avik Pal @.***> wrote:

github doesn't forward attachments of email.

— Reply to this email directly, view it on GitHub https://github.com/SciML/NonlinearSolve.jl/issues/386#issuecomment-1969125046, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4NBY6VN34DWFFUH5UF55DYV46L7AVCNFSM6AAAAABD27B5FCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZGEZDKMBUGY . You are receiving this because you authored the thread.Message ID: @.***>

avik-pal commented 4 months ago

I had this error report from someone else as well, some packages are not updated and that pulls NonlinearSolve to [8913a72c] NonlinearSolve v0.3.22, note the "v0.". The current version is v3, so remove any package that is holding NonlinearSolve back and it should be fine.

ay111 commented 4 months ago

I have removed the differentialequations, mittagleffler and some Packages whose dependencies are preventing the update. Linear solve.jl is now updated to the latest version.

I think Julia should allow multiple versions of packages to co-exist so that one can call the latest version.

Thanks.

On Wed, 6 Mar 2024, 6:42 pm Avik Pal, @.***> wrote:

I had this error report from someone else as well, some packages are not updated and that pulls NonlinearSolve to [8913a72c] NonlinearSolve v0.3.22, note the "v0.". The current version is v3, so remove any package that is holding NonlinearSolve back and it should be fine.

— Reply to this email directly, view it on GitHub https://github.com/SciML/NonlinearSolve.jl/issues/386#issuecomment-1981307882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4NBY2OA3BC7YQEASOFFX3YW5BOBAVCNFSM6AAAAABD27B5FCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBRGMYDOOBYGI . You are receiving this because you authored the thread.Message ID: @.***>

ChrisRackauckas commented 4 months ago

DifferentialEquations.jl is fine with the latest NonlinearSolve. mittagleffler looks fine as well.