SciML / SciMLSensitivity.jl

A component of the DiffEq ecosystem for enabling sensitivity analysis for scientific machine learning (SciML). Optimize-then-discretize, discretize-then-optimize, adjoint methods, and more for ODEs, SDEs, DDEs, DAEs, etc.
https://docs.sciml.ai/SciMLSensitivity/stable/
Other
332 stars 70 forks source link

Simple SciML case - core dumped after switching from julia 1.7 to 1.8 #733

Closed schlichtanders closed 2 years ago

schlichtanders commented 2 years ago

Hi there, I am starting with SciML and getting a core dumped when switching from julia 1.7.2 to julia 1.8.1

It is a simple combination of ODEProblem and Optimization, worked before, now fails dramatically.

import DifferentialEquations, DiffEqSensitivity, DiffEqFlux
import Symbolics, ModelingToolkit, DataDrivenDiffEq
import Optimization, OptimizationOptimisers, OptimizationOptimJL
import Lux, ComponentArrays
import Plots, Random, Statistics, StatsBase, DelimitedFiles

using CommonSolve: solve

rng = Random.default_rng()
Random.seed!(rng, 12345)

function lotka_volterra(du, u, p, t)
    x, y = u
    α, β, δ, γ = p
    du[1] = dx = α*x - β*x*y
    du[2] = dy = -δ*y + γ*x*y
end
u0 = [1.0, 1.0]
tspan = (0.0, 10.0)
p = [1.5, 1.0, 3.0, 1.0]
ode_prob = DifferentialEquations.ODEProblem(lotka_volterra, u0, tspan, p)
ode_sol = solve(ode_prob, saveat=0.1)

function predict(parameters, ode_prob=ode_prob, t=ode_sol.t)
    solve(ode_prob, saveat = t, p = parameters)
end
function loss_function(parameters, data)
    pred = Array(predict(parameters))[1,:]
    return sum(abs2, pred .- data)
end

ps_initial = ode_prob.p
data = 1.0
loss_function(ps_initial, data)

losses = Float64[]
function callback(p, l)
    push!(losses, l)
    if length(losses) % 50 == 0
        Plots.plot(losses, show = :inline, yscale = :log10,
            label = "loss", xlabel = "#epochs", ylabel="loss (log10 scale)")
    end
    return false  # return bool `halt`
end

ps_trained = let data = data
    minimizer = ps_initial
    opt_function = Optimization.OptimizationFunction(
        (ps, data) -> loss_function(ps, data),
        Optimization.AutoZygote(),
    )
    for (optimizer, maxiters) = [
            (OptimizationOptimisers.Adam(0.1), 300),
            (OptimizationOptimisers.Adam(0.01), 500),
        ]
        opt_prob = Optimization.OptimizationProblem(opt_function, minimizer, data)
        opt_sol = solve(opt_prob, optimizer,
            callback = callback, maxiters = maxiters)
        minimizer = opt_sol.minimizer
    end
    minimizer
end

This will throw julia: /workspace/srcdir/Enzyme/enzyme/Enzyme/GradientUtils.h:2093: llvm::SmallVector<llvm::SelectInst*, 4> DiffeGradientUtils::addToDiffe(llvm::Value*, llvm::Value*, llvm::IRBuilder<>&, llvm::Type*, llvm::ArrayRef<llvm::Value*>, llvm::Value*): Assertion!isConstantValue(val)' failed.`

here all the details:

```julia ; Function Attrs: mustprogress willreturn define internal void @diffejulia__220_12422_inner.1([1 x { { [1 x [4 x {} addrspace(10)*]], [1 x i8] }, {} addrspace(10)*, [2 x double], {} addrspace(10)* }] %0, {} addrspace(10)* nonnull align 16 dereferenceable(40) %1, {} addrspace(10)* %"'", {} addrspace(10)* nonnull align 16 dereferenceable(40) %2, {} addrspace(10)* nonnull align 16 dereferenceable(40) %3, double %4) local_unnamed_addr SciML/Optimization.jl#9 !dbg !109 { entry: %.fca.0.0.0.0.0.extract = extractvalue [1 x { { [1 x [4 x {} addrspace(10)*]], [1 x i8] }, {} addrspace(10)*, [2 x double], {} addrspace(10)* }] %0, 0, 0, 0, 0, 0, !dbg !110 %_replacementA = phi {}*** call void @llvm.assume(i1 noundef true) SciML/Optimization.jl#14 %5 = bitcast {} addrspace(10)* %.fca.0.0.0.0.0.extract to i64 addrspace(10)*, !dbg !111 %6 = addrspacecast i64 addrspace(10)* %5 to i64 addrspace(11)*, !dbg !111 %7 = load i64, i64 addrspace(11)* %6, align 8, !dbg !111, !tbaa !38 %.not = icmp eq i64 %7, 0, !dbg !120 br i1 %.not, label %L12.i, label %L13.i, !dbg !123 L12.i: ; preds = %entry %_augmented = call fastcc { { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }, i64, i64 } @augmented_julia_reinit_wrapper_12426({} addrspace(10)* %.fca.0.0.0.0.0.extract), !dbg !124 %subcache = extractvalue { { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }, i64, i64 } %_augmented, 0, !dbg !124 store { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* } %subcache, { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }* %subcache_cache, align 1, !dbg !124, !invariant.group !125 %8 = extractvalue { { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }, i64, i64 } %_augmented, 1, !dbg !124 %"'ac" = extractvalue { { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }, i64, i64 } %_augmented, 2, !dbg !124 br label %L13.i, !dbg !124 L13.i: ; preds = %L12.i, %entry %9 = phi i64 [ %"'ac", %L12.i ], [ %7, %entry ] %value_phi.i = phi i64 [ %8, %L12.i ], [ %7, %entry ] call fastcc void @julia__220_12422u12425() SciML/Optimization.jl#15, !dbg !126 %.not7 = icmp eq i64 %value_phi.i, 0, !dbg !128 br i1 %.not7, label %fail.i, label %julia__220_12422_inner.exit, !dbg !128 fail.i: ; preds = %L13.i call void @ijl_throw({} addrspace(12)* noundef addrspacecast ({}* inttoptr (i64 140567845548720 to {}*) to {} addrspace(12)*)) SciML/Optimization.jl#16, !dbg !128 unreachable julia__220_12422_inner.exit: ; preds = %L13.i %10 = bitcast {} addrspace(10)* %.fca.0.0.0.0.0.extract to i8 addrspace(10)*, !dbg !129 %11 = addrspacecast i8 addrspace(10)* %10 to i8 addrspace(11)*, !dbg !129 %12 = getelementptr inbounds i8, i8 addrspace(11)* %11, i64 8, !dbg !129 %13 = bitcast i8 addrspace(11)* %12 to i64 addrspace(11)*, !dbg !129 %14 = load i64, i64 addrspace(11)* %13, align 8, !dbg !129, !tbaa !38 %"'il_phi1" = phi i64 , !dbg !128 %"'ipc" = inttoptr i64 %9 to void (i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double)*, !dbg !128 %15 = inttoptr i64 %value_phi.i to void (i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double)*, !dbg !128 %16 = bitcast void (i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double)* %"'ipc" to { i8* } (i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double)**, !dbg!128 %17 = load { i8* } (i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double)*, { i8* } (i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double)** %16, align 8, !dbg !128 %_augmented2 = call { i8* } %17(i64 %14, i64 %14, {} addrspace(10)* %1, {} addrspace(10)* %"'", {} addrspace(10)* %2, {} addrspace(10)* %2, {} addrspace(10)* %3, {} addrspace(10)* %3, double %4) [ "jl_roots"({} addrspace(10)* %3, {} addrspace(10)* %2, {} addrspace(10)* %1, {} addrspace(10)* %"'") ], !dbg !128 %subcache3 = extractvalue { i8* } %_augmented2, 0, !dbg !128 br label %invertjulia__220_12422_inner.exit, !dbg !110 allocsForInversion: ; No predecessors! %subcache_cache = alloca { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }, align 1 store { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* } zeroinitializer, { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }* %subcache_cache, align 8 invertentry: ; preds = %invertL13.i, %invertL12.i ret void invertL12.i: ; preds = %invertL13.i %18 = load { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }, { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* }* %subcache_cache, align 1, !invariant.group !125 call fastcc void @diffejulia_reinit_wrapper_12426({} addrspace(10)* %.fca.0.0.0.0.0.extract, { {} addrspace(10)*, {} addrspace(10)*, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)* } %18), !dbg !124 br label %invertentry invertL13.i: ; No predecessors! br i1 %.not, label %invertL12.i, label %invertentry invertfail.i: ; No predecessors! invertjulia__220_12422_inner.exit: ; preds = %julia__220_12422_inner.exit %19 = bitcast void (i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double)* %"'ipc" to { double } (i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double, i8*)** %20 = getelementptr { double } (i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double, i8*)*, { double } (i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double, i8*)** %19, i64 1 %21 = load { double } (i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double, i8*)*, { double } (i64, i64, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, double, i8*)** %20, align 8 %22 = call { double } %21(i64 %14, i64 %14, {} addrspace(10)* %1, {} addrspace(10)* %"'", {} addrspace(10)* %2, {} addrspace(10)* %2, {} addrspace(10)* %3, {} addrspace(10)* %3, double %4, i8* %subcache3) [ "jl_roots"({} addrspace(10)* %3, {} addrspace(10)* %2, {} addrspace(10)* %1, {} addrspace(10)* %"'") ], !dbg !128 %23 = extractvalue { double } %22, 0 } double %4 julia: /workspace/srcdir/Enzyme/enzyme/Enzyme/GradientUtils.h:2093: llvm::SmallVector DiffeGradientUtils::addToDiffe(llvm::Value*, llvm::Value*, llvm::IRBuilder<>&, llvm::Type*, llvm::ArrayRef, llvm::Value*): Assertion `!isConstantValue(val)' failed. signal (6): Aborted in expression starting at REPL[30]:1 __pthread_kill_implementation at /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libc.so.6 (unknown line) raise at /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libc.so.6 (unknown line) abort at /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libc.so.6 (unknown line) __assert_fail_base.cold.0 at /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libc.so.6 (unknown line) __assert_fail at /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libc.so.6 (unknown line) addToDiffe at /workspace/srcdir/Enzyme/enzyme/Enzyme/GradientUtils.h:2093 addToDiffe at /workspace/srcdir/Enzyme/enzyme/Enzyme/AdjointGenerator.h:1754 [inlined] visitCallInst at /workspace/srcdir/Enzyme/enzyme/Enzyme/AdjointGenerator.h:12285 delegateCallInst at /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/local/include/llvm/IR/InstVisitor.h:302 [inlined] visitCall at /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/local/include/llvm/IR/Instruction.def:209 [inlined] visit at /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/local/include/llvm/IR/Instruction.def:209 visit at /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/local/include/llvm/IR/InstVisitor.h:112 [inlined] CreatePrimalAndGradient at /workspace/srcdir/Enzyme/enzyme/Enzyme/EnzymeLogic.cpp:3646 EnzymeCreatePrimalAndGradient at /workspace/srcdir/Enzyme/enzyme/Enzyme/CApi.cpp:439 EnzymeCreatePrimalAndGradient at /home/ssahm/.julia/packages/Enzyme/di3zM/src/api.jl:111 enzyme! at /home/ssahm/.julia/packages/Enzyme/di3zM/src/compiler.jl:3271 unknown function (ip: 0x7fd83e51f92d) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 #codegen#80 at /home/ssahm/.julia/packages/Enzyme/di3zM/src/compiler.jl:4158 codegen##kw at /home/ssahm/.julia/packages/Enzyme/di3zM/src/compiler.jl:3878 [inlined] _thunk at /home/ssahm/.julia/packages/Enzyme/di3zM/src/compiler.jl:4599 unknown function (ip: 0x7fd83e8d422d) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 cached_compilation at /home/ssahm/.julia/packages/Enzyme/di3zM/src/compiler.jl:4637 unknown function (ip: 0x7fd83e8949d5) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 #s565#115 at /home/ssahm/.julia/packages/Enzyme/di3zM/src/compiler.jl:4697 [inlined] #s565#115 at ./none:0 _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 GeneratedFunctionStub at ./boot.jl:582 _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] jl_call_staged at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/method.c:520 ijl_code_for_staged at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/method.c:571 get_staged at ./compiler/utilities.jl:114 retrieve_code_info at ./compiler/utilities.jl:126 [inlined] InferenceState at ./compiler/inferencestate.jl:284 typeinf_edge at ./compiler/typeinfer.jl:868 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2340 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2340 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2340 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2340 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_apply at ./compiler/abstractinterpretation.jl:1339 abstract_call_known at ./compiler/abstractinterpretation.jl:1600 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_edge at ./compiler/typeinfer.jl:877 abstract_call_method at ./compiler/abstractinterpretation.jl:641 abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:153 abstract_call_known at ./compiler/abstractinterpretation.jl:1696 abstract_call at ./compiler/abstractinterpretation.jl:1766 abstract_call at ./compiler/abstractinterpretation.jl:1733 abstract_eval_statement at ./compiler/abstractinterpretation.jl:1890 typeinf_local at ./compiler/abstractinterpretation.jl:2366 typeinf_nocycle at ./compiler/abstractinterpretation.jl:2462 _typeinf at ./compiler/typeinfer.jl:230 typeinf at ./compiler/typeinfer.jl:213 typeinf_ext at ./compiler/typeinfer.jl:967 typeinf_ext_toplevel at ./compiler/typeinfer.jl:1000 typeinf_ext_toplevel at ./compiler/typeinfer.jl:996 jfptr_typeinf_ext_toplevel_18807.clone_1 at /nix/store/ca4hhym3f57vpmhgvylvqp86cmz9gbis-julia-bin-1.8.1/lib/julia/sys.so (unknown line) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] jl_type_infer at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:319 jl_generate_fptr_impl at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/jitlayers.cpp:319 jl_compile_method_internal at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2081 [inlined] jl_compile_method_internal at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2025 _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2359 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] do_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/builtins.c:730 _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] do_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/builtins.c:730 _apply at ./boot.jl:816 adjoint at /home/ssahm/.julia/packages/Zygote/PD12J/src/lib/lib.jl:203 [inlined] _pullback at /home/ssahm/.julia/packages/ZygoteRules/AIbCs/src/adjoint.jl:65 [inlined] _pullback at /home/ssahm/.julia/packages/DiffEqBase/JGGTu/src/solve.jl:791 [inlined] _pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface2.jl:0 _pullback at ./REPL[21]:2 [inlined] _pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface2.jl:0 unknown function (ip: 0x7fd83e87e50d) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 _pullback at ./REPL[21]:2 [inlined] _pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface2.jl:0 unknown function (ip: 0x7fd83e8377c8) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 _pullback at ./REPL[21]:2 [inlined] _pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface2.jl:0 _pullback at ./REPL[22]:2 [inlined] _pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface2.jl:0 _pullback at ./REPL[30]:4 [inlined] _pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface2.jl:0 _apply at ./boot.jl:816 [inlined] adjoint at /home/ssahm/.julia/packages/Zygote/PD12J/src/lib/lib.jl:203 [inlined] _pullback at /home/ssahm/.julia/packages/ZygoteRules/AIbCs/src/adjoint.jl:65 [inlined] _pullback at /home/ssahm/.julia/packages/SciMLBase/idlaI/src/scimlfunctions.jl:3101 [inlined] _pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface2.jl:0 unknown function (ip: 0x7fd83e8369a1) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] do_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/builtins.c:730 _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] do_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/builtins.c:730 _apply at ./boot.jl:816 adjoint at /home/ssahm/.julia/packages/Zygote/PD12J/src/lib/lib.jl:203 [inlined] _pullback at /home/ssahm/.julia/packages/ZygoteRules/AIbCs/src/adjoint.jl:65 [inlined] _pullback at /home/ssahm/.julia/packages/Optimization/6nIwk/src/function/zygote.jl:30 [inlined] _pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface2.jl:0 unknown function (ip: 0x7fd83e82c668) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] do_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/builtins.c:730 _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] do_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/builtins.c:730 _apply at ./boot.jl:816 adjoint at /home/ssahm/.julia/packages/Zygote/PD12J/src/lib/lib.jl:203 [inlined] _pullback at /home/ssahm/.julia/packages/ZygoteRules/AIbCs/src/adjoint.jl:65 [inlined] _pullback at /home/ssahm/.julia/packages/Optimization/6nIwk/src/function/zygote.jl:32 [inlined] _pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface2.jl:0 unknown function (ip: 0x7fd83e828cc8) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface.jl:44 pullback at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface.jl:42 [inlined] gradient at /home/ssahm/.julia/packages/Zygote/PD12J/src/compiler/interface.jl:96 SciML/Optimization.jl#137 at /home/ssahm/.julia/packages/Optimization/6nIwk/src/function/zygote.jl:32 unknown function (ip: 0x7fd83e828849) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] do_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/builtins.c:730 macro expansion at /home/ssahm/.julia/packages/OptimizationOptimisers/XLPqT/src/OptimizationOptimisers.jl:35 [inlined] macro expansion at /home/ssahm/.julia/packages/Optimization/6nIwk/src/utils.jl:35 [inlined] #__solve#1 at /home/ssahm/.julia/packages/OptimizationOptimisers/XLPqT/src/OptimizationOptimisers.jl:33 __solve##kw at /home/ssahm/.julia/packages/OptimizationOptimisers/XLPqT/src/OptimizationOptimisers.jl:10 [inlined] __solve##kw at /home/ssahm/.julia/packages/OptimizationOptimisers/XLPqT/src/OptimizationOptimisers.jl:10 [inlined] #solve#489 at /home/ssahm/.julia/packages/SciMLBase/idlaI/src/solve.jl:71 [inlined] solve##kw at /home/ssahm/.julia/packages/SciMLBase/idlaI/src/solve.jl:70 unknown function (ip: 0x7fd83f58b57d) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] do_call at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/interpreter.c:126 eval_value at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/interpreter.c:215 eval_body at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/interpreter.c:467 jl_interpret_toplevel_thunk at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/interpreter.c:750 jl_toplevel_eval_flex at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/toplevel.c:906 jl_toplevel_eval_flex at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/toplevel.c:850 eval_body at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/interpreter.c:556 eval_body at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/interpreter.c:522 jl_interpret_toplevel_thunk at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/interpreter.c:750 jl_toplevel_eval_flex at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/toplevel.c:906 ijl_toplevel_eval_in at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/toplevel.c:965 eval at ./boot.jl:368 [inlined] eval_user_input at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:151 repl_backend_loop at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:247 start_repl_backend at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:232 #run_repl#47 at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:369 run_repl at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/REPL/src/REPL.jl:355 jfptr_run_repl_66557.clone_1 at /nix/store/ca4hhym3f57vpmhgvylvqp86cmz9gbis-julia-bin-1.8.1/lib/julia/sys.so (unknown line) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 #967 at ./client.jl:419 jfptr_YY.967_49700.clone_1 at /nix/store/ca4hhym3f57vpmhgvylvqp86cmz9gbis-julia-bin-1.8.1/lib/julia/sys.so (unknown line) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] jl_f__call_latest at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/builtins.c:774 #invokelatest#2 at ./essentials.jl:729 [inlined] invokelatest at ./essentials.jl:726 [inlined] run_main_repl at ./client.jl:404 exec_options at ./client.jl:318 _start at ./client.jl:522 jfptr__start_61720.clone_1 at /nix/store/ca4hhym3f57vpmhgvylvqp86cmz9gbis-julia-bin-1.8.1/lib/julia/sys.so (unknown line) _jl_invoke at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2367 [inlined] ijl_apply_generic at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/gf.c:2549 jl_apply at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined] true_main at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/jlapi.c:575 jl_repl_entrypoint at /cache/build/default-amdci5-0/julialang/julia-release-1-dot-8/src/jlapi.c:719 main at julia (unknown line) __libc_start_call_main at /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libc.so.6 (unknown line) __libc_start_main at /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libc.so.6 (unknown line) unknown function (ip: 0x401098) Allocations: 401837661 (Pool: 401721260; Big: 116401); GC: 101 [1] 441621 abort (core dumped) julia --project ```

Here my manifest.toml (as txt because github won't allow .toml files): Manifest.toml.txt

ChrisRackauckas commented 2 years ago

Looks like there is an issue with the setting of the Enzyme activity I need to handle here, but @wsmoses this also is a case of an uncaught LLVM assertion.

ChrisRackauckas commented 2 years ago

Is the issue that you're running an older DiffEqSensitivity and not SciMLSensitivity? There was a name change when we did the breaking update to v7 in June. When I updated the script it seems to run fine:

import DifferentialEquations, SciMLSensitivity
import Optimization, OptimizationOptimisers
using DifferentialEquations: solve

rng = Random.default_rng()
Random.seed!(rng, 12345)

function lotka_volterra(du, u, p, t)
    x, y = u
    α, β, δ, γ = p
    du[1] = dx = α*x - β*x*y
    du[2] = dy = -δ*y + γ*x*y
end
u0 = [1.0, 1.0]
tspan = (0.0, 10.0)
p = [1.5, 1.0, 3.0, 1.0]
ode_prob = DifferentialEquations.ODEProblem(lotka_volterra, u0, tspan, p)
ode_sol = solve(ode_prob, saveat=0.1)

function predict(parameters, ode_prob=ode_prob, t=ode_sol.t)
    solve(ode_prob, saveat = t, p = parameters)
end
function loss_function(parameters, data)
    pred = Array(predict(parameters))[1,:]
    return sum(abs2, pred .- data)
end

ps_initial = ode_prob.p
data = 1.0
loss_function(ps_initial, data)

losses = Float64[]
function callback(p, l)
    push!(losses, l)
    if length(losses) % 50 == 0
        #Plots.plot(losses, show = :inline, yscale = :log10,
        #    label = "loss", xlabel = "#epochs", ylabel="loss (log10 scale)")
    end
    return false  # return bool `halt`
end

ps_trained = let data = data
    minimizer = ps_initial
    opt_function = Optimization.OptimizationFunction(
        (ps, data) -> loss_function(ps, data),
        Optimization.AutoZygote(),
    )
    for (optimizer, maxiters) = [
            (OptimizationOptimisers.Adam(0.1), 300),
            (OptimizationOptimisers.Adam(0.01), 500),
        ]
        opt_prob = Optimization.OptimizationProblem(opt_function, minimizer, data)
        opt_sol = solve(opt_prob, optimizer,
            callback = callback, maxiters = maxiters)
        minimizer = opt_sol.minimizer
    end
    minimizer
end

Are there any tutorials left out there that mention DiffEqSensitivity? I think all of those should've been updated already, but let me know if I missed one.

schlichtanders commented 2 years ago

thank you very much for your help - yes switching to SciMLSensitivity worked for me. You can close the ticket if you don't need it to track other problems related to the original failure.

ChrisRackauckas commented 2 years ago

Thanks, and thanks for pointing out the old UDE tutorials. We just changed the SciMLSensitivity docs to build via Buildkite so that we could use more dedicated compute resources (these docs are big 😅) so hopefully we will soon merge the UDE paper repo pieces into tested tutorials here.