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
330 stars 70 forks source link

Adjoint crash to desktop on v1.7-beta3 without autodiff #479

Closed ArnoStrouwen closed 2 years ago

ArnoStrouwen commented 3 years ago
using OrdinaryDiffEq
using DiffEqSensitivity

function fb(du,u,p,t)
  du[1] = dx = p[1]*u[1] - p[2]*u[1]*u[2]*t
  du[2] = dy = -p[3]*u[2] + t*p[4]*u[1]*u[2]
end
p = [1.5,1.0,3.0,1.0]; u0 = [1.0;1.0]
prob = ODEProblem(fb,u0,(0.0,10.0),p)
sol = solve(prob,Tsit5(),abstol=1e-14,reltol=1e-14)
t = 0.0:0.5:10.0
function dg(out,u,p,t,i)
  (out.=2.0.-u)
end
_,easy_res3 = adjoint_sensitivities(sol,Tsit5(),dg,t,abstol=1e-14,
                                          reltol=1e-14,
                                          sensealg=InterpolatingAdjoint(autojacvec=DiffEqSensitivity.EnzymeVJP())) #works
_,easy_res3 = adjoint_sensitivities(sol,Tsit5(),dg,t,abstol=1e-14,
                                  reltol=1e-14,
                                  sensealg=InterpolatingAdjoint(autodiff=false)) #crashes to desktop
_,easy_res3 = adjoint_sensitivities(sol,Tsit5(),dg,t,abstol=1e-14,
                                  reltol=1e-14,
                                  sensealg=InterpolatingAdjoint(autojacvec=false)) #crashes to desktop

When I step through it with a debugger it works fine. It then does not go into this branch as Chris suggested https://github.com/SciML/DiffEqSensitivity.jl/blob/master/src/adjoint_common.jl#L125

julia> versioninfo()
Julia Version 1.7.0-beta3.0
Commit e76c9dad42 (2021-07-07 08:12 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: AMD Ryzen 9 5900X 12-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.0 (ORCJIT, znver3)
Environment:
  JULIA_PKG_DEVDIR = C:/Users/arno/Koofr/dev
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 12
ChrisRackauckas commented 3 years ago

Yeah, it seems that if the compiler even sees that branch it will crash on v1.7-beta3. This is documented in https://github.com/SciML/DiffEqFlux.jl/issues/586#issuecomment-893363469 but seems to be known in Base as https://github.com/JuliaLang/julia/issues/41503 . It was most likely fixed in https://github.com/JuliaLang/julia/pull/41516, but it would be good to check on the latest v1.7 (i.e. build from source) to make sure.

ArnoStrouwen commented 3 years ago

It works on the latest nightly.

ArnoStrouwen commented 3 years ago

Nightly still crashes on steady state adjoints for me https://github.com/SciML/DiffEqSensitivity.jl/blob/de64151aa3a19edac32737436601fffac91948ff/test/steady_state.jl#L88-L94

ChrisRackauckas commented 3 years ago

What does the crash look like? Post the segfault and let's get a Julia Base issue open.

ArnoStrouwen commented 3 years ago

If I remove res2a to res2e it does not crash.

using DiffEqSensitivity, SteadyStateDiffEq, OrdinaryDiffEq
function f!(du, u, p, t)
    du[1] = p[1] + p[2] * u[1]
    du[2] = p[3] * u[1] + p[4] * u[2]
end

function jac!(J, u, p, t) # df/dx
    J[1,1] = p[2]
    J[2,1] = p[3]
    J[1,2] = 0
    J[2,2] = p[4]
    nothing
end

function paramjac!(fp, u, p, t) # df/dp
    fp[1,1] = 1
    fp[2,1] = 0
    fp[1,2] = u[1]
    fp[2,2] = 0
    fp[1,3] = 0
    fp[2,3] = u[1]
    fp[1,4] = 0
    fp[2,4] = u[2]
    nothing
end

function dg!(out, u, p, t, i)
    (out .= -2.0 .+ u)
end

function g(u, p, t)
    sum((2.0 .- u).^2) / 2 + sum(p.^2) / 2
end

u0 = zeros(2)
p = [2.0,-2.0,1.0,-4.0]

f2 = ODEFunction(f!;jac=jac!)
prob2 = SteadyStateProblem(f2,u0,p)
sol2 = solve(prob2,DynamicSS(Rodas5()))
res2a = adjoint_sensitivities(sol2,DynamicSS(Rodas5()),sensealg=SteadyStateAdjoint(),g,dg!)
res2b = adjoint_sensitivities(sol2,DynamicSS(Rodas5()),sensealg=SteadyStateAdjoint(),g,nothing)
res2c = adjoint_sensitivities(sol2,DynamicSS(Rodas5()),sensealg=SteadyStateAdjoint(autodiff=false),g,nothing)
res2d = adjoint_sensitivities(sol2,DynamicSS(Rodas5()),sensealg=SteadyStateAdjoint(autojacvec=TrackerVJP()),g,nothing)
res2e = adjoint_sensitivities(sol2,DynamicSS(Rodas5()),sensealg=SteadyStateAdjoint(autojacvec=ReverseDiffVJP()),g,nothing)
res2f = adjoint_sensitivities(sol2,DynamicSS(Rodas5()),sensealg=SteadyStateAdjoint(autojacvec=ZygoteVJP()),g,nothing)
(@v1.8) pkg> status
      Status `C:\Users\arno\.julia\environments\v1.8\Project.toml`
  [41bf760c] DiffEqSensitivity v6.58.0 `https://github.com/SciML/DiffEqSensitivity.jl.git#master`
  [1dea7af3] OrdinaryDiffEq v5.63.3
  [9672c7b4] SteadyStateDiffEq v1.6.4
julia> versioninfo()
Julia Version 1.8.0-DEV.394
Commit 3d058b205e (2021-08-24 12:35 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: AMD Ryzen 9 5900X 12-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, znver3)
Internal error: encountered unexpected error in runtime:
BoundsError(a=Array{Any, (3,)}[
  Core.Compiler.VarState(typ=Core.Const(val=ZygoteRules._pullback), undef=false),
  Core.Compiler.VarState(typ=Zygote.Context, undef=false),
  Core.Compiler.VarState(typ=DiffEqSensitivity.var"#53#57"{Nothing, SciMLBase.ODEFunction{true, typeof(Main.f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, typeof(Main.jac!), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}}, undef=false)], i=(4,))
jl_bounds_error_ints at /cygdrive/c/buildbot/worker/package_win64/build/src\rtutils.c:194
getindex at .\array.jl:895 [inlined]
abstract_eval_special_value at .\compiler\abstractinterpretation.jl:1458 [inlined]
abstract_eval_value at .\compiler\abstractinterpretation.jl:1470 [inlined]
collect_argtypes at .\compiler\abstractinterpretation.jl:1483
abstract_eval_statement at .\compiler\abstractinterpretation.jl:1506
typeinf_local at .\compiler\abstractinterpretation.jl:1902
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1992
_typeinf at .\compiler\typeinfer.jl:226
typeinf at .\compiler\typeinfer.jl:209
typeinf_edge at .\compiler\typeinfer.jl:817 [inlined]
abstract_call_method at .\compiler\abstractinterpretation.jl:507
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:105
abstract_call_known at .\compiler\abstractinterpretation.jl:1316
abstract_call at .\compiler\abstractinterpretation.jl:1371
abstract_apply at .\compiler\abstractinterpretation.jl:974
abstract_call_known at .\compiler\abstractinterpretation.jl:1235
abstract_call at .\compiler\abstractinterpretation.jl:1371
abstract_call at .\compiler\abstractinterpretation.jl:1356
abstract_eval_statement at .\compiler\abstractinterpretation.jl:1510
typeinf_local at .\compiler\abstractinterpretation.jl:1902
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1992
_typeinf at .\compiler\typeinfer.jl:226
typeinf at .\compiler\typeinfer.jl:209
typeinf_edge at .\compiler\typeinfer.jl:817 [inlined]
abstract_call_method at .\compiler\abstractinterpretation.jl:507
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:105
abstract_call_known at .\compiler\abstractinterpretation.jl:1316
abstract_call at .\compiler\abstractinterpretation.jl:1371
abstract_apply at .\compiler\abstractinterpretation.jl:974
abstract_call_known at .\compiler\abstractinterpretation.jl:1235
abstract_call at .\compiler\abstractinterpretation.jl:1371
abstract_call at .\compiler\abstractinterpretation.jl:1356
abstract_eval_statement at .\compiler\abstractinterpretation.jl:1510
typeinf_local at .\compiler\abstractinterpretation.jl:1902
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1992
_typeinf at .\compiler\typeinfer.jl:226
typeinf at .\compiler\typeinfer.jl:209
typeinf_edge at .\compiler\typeinfer.jl:817 [inlined]
abstract_call_method at .\compiler\abstractinterpretation.jl:507
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:105
abstract_call_known at .\compiler\abstractinterpretation.jl:1316
abstract_call at .\compiler\abstractinterpretation.jl:1371
abstract_call at .\compiler\abstractinterpretation.jl:1356
abstract_eval_statement at .\compiler\abstractinterpretation.jl:1510
typeinf_local at .\compiler\abstractinterpretation.jl:1902
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1992
_typeinf at .\compiler\typeinfer.jl:226
typeinf at .\compiler\typeinfer.jl:209
typeinf_edge at .\compiler\typeinfer.jl:817 [inlined]
abstract_call_method at .\compiler\abstractinterpretation.jl:507
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:105
abstract_call_known at .\compiler\abstractinterpretation.jl:1316
abstract_call at .\compiler\abstractinterpretation.jl:1371
abstract_call at .\compiler\abstractinterpretation.jl:1356
abstract_eval_statement at .\compiler\abstractinterpretation.jl:1510
typeinf_local at .\compiler\abstractinterpretation.jl:1902
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1992
_typeinf at .\compiler\typeinfer.jl:226
typeinf at .\compiler\typeinfer.jl:209
typeinf_edge at .\compiler\typeinfer.jl:817 [inlined]
abstract_call_method at .\compiler\abstractinterpretation.jl:507
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:105
abstract_call_known at .\compiler\abstractinterpretation.jl:1316
abstract_call at .\compiler\abstractinterpretation.jl:1371
abstract_call at .\compiler\abstractinterpretation.jl:1356
abstract_eval_statement at .\compiler\abstractinterpretation.jl:1510
typeinf_local at .\compiler\abstractinterpretation.jl:1902
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1992
_typeinf at .\compiler\typeinfer.jl:226
typeinf at .\compiler\typeinfer.jl:209
typeinf_ext at .\compiler\typeinfer.jl:903
typeinf_ext_toplevel at .\compiler\typeinfer.jl:936
typeinf_ext_toplevel at .\compiler\typeinfer.jl:932
jfptr_typeinf_ext_toplevel_9355.clone_1 at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\lib\julia\sys.dll (unknown line)
_jl_invoke at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2245 [inlined]
jl_apply_generic at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2427 [inlined]
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
jl_type_infer at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:295
jl_generate_fptr at /cygdrive/c/buildbot/worker/package_win64/build/src\jitlayers.cpp:336
jl_compile_method_internal at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:1978
jl_compile_method_internal at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:1932 [inlined]
_jl_invoke at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2237 [inlined]
jl_apply_generic at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2427
#SteadyStateAdjointProblem#283 at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\steadystate_adjoint.jl:66
SteadyStateAdjointProblem at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\steadystate_adjoint.jl:27
#_adjoint_sensitivities#72 at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\sensitivity_interface.jl:58 [inlined]
_adjoint_sensitivities at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\sensitivity_interface.jl:58
unknown function (ip: 00000000072f7b83)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:713
#adjoint_sensitivities#70 at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\sensitivity_interface.jl:6
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:713
adjoint_sensitivities##kw at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\sensitivity_interface.jl:6
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
do_call at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:126
eval_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:215
eval_stmt_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:166 [inlined]
eval_body at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:580
jl_interpret_toplevel_thunk at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:728
top-level scope at REPL[19]:1
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:885
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:830
jl_toplevel_eval at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:894 [inlined]
jl_toplevel_eval_in at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:944
eval at .\boot.jl:373 [inlined]
eval_user_input at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:151
repl_backend_loop at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:245
start_repl_backend at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:230
#run_repl#47 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:363
run_repl at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:350
#933 at .\client.jl:394
jfptr_YY.933_39690.clone_1 at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\lib\julia\sys.dll (unknown line)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
jl_f__call_latest at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:757
#invokelatest#2 at .\essentials.jl:718 [inlined]
invokelatest at .\essentials.jl:716 [inlined]
run_main_repl at .\client.jl:379
exec_options at .\client.jl:309
_start at .\client.jl:495
jfptr__start_24447.clone_1 at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\lib\julia\sys.dll (unknown line)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
true_main at /cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:548
jl_repl_entrypoint at /cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:690
mainCRTStartup at /cygdrive/c/buildbot/worker/package_win64/build/cli\loader_exe.c:58
BaseThreadInitThunk at C:\Windows\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!", file /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/Support/Casting.h, line 269

signal (22): SIGABRT
in expression starting at REPL[19]:1
crt_sig_handler at /cygdrive/c/buildbot/worker/package_win64/build/src\signals-win.c:93
raise at C:\Windows\System32\msvcrt.dll (unknown line)
abort at C:\Windows\System32\msvcrt.dll (unknown line)
assert at C:\Windows\System32\msvcrt.dll (unknown line)
cast<llvm::PointerType, llvm::Type> at /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/Support\Casting.h:269 [inlined]
getPointerAddressSpace at /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/IR\DerivedTypes.h:715 [inlined]
visitMemop at /cygdrive/c/buildbot/worker/package_win64/build/src\llvm-propagate-addrspaces.cpp:237
visitStoreInst at /cygdrive/c/buildbot/worker/package_win64/build/src\llvm-propagate-addrspaces.cpp:251 [inlined]
visitStore at /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/IR\Instruction.def:173 [inlined]
visit at /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/IR\Instruction.def:173 [inlined]
visit at /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/IR\InstVisitor.h:116 [inlined]
visit<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, false> > at /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/IR\InstVisitor.h:90 [inlined]
visit at /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/IR\InstVisitor.h:105 [inlined]
visit<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::BasicBlock, false, false, void>, false, false> > at /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/IR\InstVisitor.h:90 [inlined]
visit at /cygdrive/c/buildbot/worker/package_win64/build/usr/include/llvm/IR\InstVisitor.h:101 [inlined]
runOnFunction at /cygdrive/c/buildbot/worker/package_win64/build/src\llvm-propagate-addrspaces.cpp:67
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
operator() at /cygdrive/c/buildbot/worker/package_win64/build/src\jitlayers.cpp:611
.text at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc31BasicIRLayerMaterializationUnit11materializeESt10unique_ptrINS0_29MaterializationResponsibilityESt14default_deleteIS3_EE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc16ExecutionSession26materializeOnCurrentThreadESt10unique_ptrINS0_19MaterializationUnitESt14default_deleteIS3_EES2_INS0_29MaterializationResponsibilityES4_IS7_EE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZNSt17_Function_handlerIFvSt10unique_ptrIN4llvm3orc19MaterializationUnitESt14default_deleteIS3_EES0_INS2_29MaterializationResponsibilityES4_IS7_EEEPSA_E9_M_invokeERKSt9_Any_dataOS6_OS9_ at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc16ExecutionSession22dispatchOutstandingMUsEv at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc16ExecutionSession17OL_completeLookupESt10unique_ptrINS0_21InProgressLookupStateESt14default_deleteIS3_EESt10shared_ptrINS0_23AsynchronousSymbolQueryEESt8functionIFvRKNS_8DenseMapIPNS0_8JITDylibENS_8DenseSetINS0_15SymbolStringPtrENS_12DenseMapInfoISF_EEEENSG_ISD_EENS_6detail12DenseMapPairISD_SI_EEEEEE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc25InProgressFullLookupState8completeESt10unique_ptrINS0_21InProgressLookupStateESt14default_deleteIS3_EE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc16ExecutionSession19OL_applyQueryPhase1ESt10unique_ptrINS0_21InProgressLookupStateESt14default_deleteIS3_EENS_5ErrorE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc16ExecutionSession6lookupENS0_10LookupKindERKSt6vectorISt4pairIPNS0_8JITDylibENS0_19JITDylibLookupFlagsEESaIS8_EENS0_15SymbolLookupSetENS0_11SymbolStateENS_15unique_functionIFvNS_8ExpectedINS_8DenseMapINS0_15SymbolStringPtrENS_18JITEvaluatedSymbolENS_12DenseMapInfoISI_EENS_6detail12DenseMapPairISI_SJ_EEEEEEEEESt8functionIFvRKNSH_IS6_NS_8DenseSetISI_SL_EENSK_IS6_EENSN_IS6_SV_EEEEEE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc16ExecutionSession6lookupERKSt6vectorISt4pairIPNS0_8JITDylibENS0_19JITDylibLookupFlagsEESaIS7_EERKNS0_15SymbolLookupSetENS0_10LookupKindENS0_11SymbolStateESt8functionIFvRKNS_8DenseMapIS5_NS_8DenseSetINS0_15SymbolStringPtrENS_12DenseMapInfoISK_EEEENSL_IS5_EENS_6detail12DenseMapPairIS5_SN_EEEEEE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc16ExecutionSession6lookupERKSt6vectorISt4pairIPNS0_8JITDylibENS0_19JITDylibLookupFlagsEESaIS7_EENS0_15SymbolStringPtrENS0_11SymbolStateE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc16ExecutionSession6lookupENS_8ArrayRefIPNS0_8JITDylibEEENS0_15SymbolStringPtrENS0_11SymbolStateE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
_ZN4llvm3orc16ExecutionSession6lookupENS_8ArrayRefIPNS0_8JITDylibEEENS_9StringRefENS0_11SymbolStateE at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\bin\libLLVM.dll (unknown line)
addModule at /cygdrive/c/buildbot/worker/package_win64/build/src\jitlayers.cpp:778
jl_add_to_ee at /cygdrive/c/buildbot/worker/package_win64/build/src\jitlayers.cpp:1057
jl_add_to_ee at /cygdrive/c/buildbot/worker/package_win64/build/src\jitlayers.cpp:1101
jl_add_to_ee at /cygdrive/c/buildbot/worker/package_win64/build/src\jitlayers.cpp:1123 [inlined]
_jl_compile_codeinst at /cygdrive/c/buildbot/worker/package_win64/build/src\jitlayers.cpp:152
jl_generate_fptr_for_unspecialized at /cygdrive/c/buildbot/worker/package_win64/build/src\jitlayers.cpp:392
jl_compile_method_internal at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:1984
jl_compile_method_internal at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:1932 [inlined]
_jl_invoke at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2237 [inlined]
jl_apply_generic at /cygdrive/c/buildbot/worker/package_win64/build/src\gf.c:2427
_pullback at C:\Users\arno\.julia\packages\Zygote\TaBlo\src\compiler\interface.jl:34
pullback at C:\Users\arno\.julia\packages\Zygote\TaBlo\src\compiler\interface.jl:40
_vecjacobian! at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\derivative_wrappers.jl:435
#vecjacobian!#36 at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\derivative_wrappers.jl:224
vecjacobian!##kw at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\derivative_wrappers.jl:224
#SteadyStateAdjointProblem#283 at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\steadystate_adjoint.jl:66
SteadyStateAdjointProblem at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\steadystate_adjoint.jl:27
#_adjoint_sensitivities#72 at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\sensitivity_interface.jl:58 [inlined]
_adjoint_sensitivities at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\sensitivity_interface.jl:58
unknown function (ip: 00000000072f7b83)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:713
#adjoint_sensitivities#70 at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\sensitivity_interface.jl:6
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
do_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:713
adjoint_sensitivities##kw at C:\Users\arno\.julia\packages\DiffEqSensitivity\0XJQz\src\sensitivity_interface.jl:6
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
do_call at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:126
eval_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:215
eval_stmt_value at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:166 [inlined]
eval_body at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:580
jl_interpret_toplevel_thunk at /cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:728
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:885
jl_toplevel_eval_flex at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:830
jl_toplevel_eval at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:894 [inlined]
jl_toplevel_eval_in at /cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:944
eval at .\boot.jl:373 [inlined]
eval_user_input at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:151
repl_backend_loop at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:245
start_repl_backend at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:230
#run_repl#47 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:363
run_repl at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.8\REPL\src\REPL.jl:350
#933 at .\client.jl:394
jfptr_YY.933_39690.clone_1 at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\lib\julia\sys.dll (unknown line)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
jl_f__call_latest at /cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:757
#invokelatest#2 at .\essentials.jl:718 [inlined]
invokelatest at .\essentials.jl:716 [inlined]
run_main_repl at .\client.jl:379
exec_options at .\client.jl:309
_start at .\client.jl:495
jfptr__start_24447.clone_1 at C:\Users\arno\AppData\Local\Programs\Julia-1.8.0-DEV\lib\julia\sys.dll (unknown line)
jl_apply at /cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1771 [inlined]
true_main at /cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:548
jl_repl_entrypoint at /cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:690
mainCRTStartup at /cygdrive/c/buildbot/worker/package_win64/build/cli\loader_exe.c:58
BaseThreadInitThunk at C:\Windows\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
Allocations: 203932592 (Pool: 203898487; Big: 34105); GC: 133
ChrisRackauckas commented 3 years ago

@DhairyaLGandhi @simeonschaub is this failure known? Looks like a core Zygote/IRTools kind of failure?

ArnoStrouwen commented 2 years ago

This no longer crashes to desktop on 1.7.1 (did not test on 1.7).