@@ -750,7 +750,7 @@ u0[109] = 0.0
750750
751751tspan = (0.0 ,100.0 )
752752
753- prob = ODEProblem (sbml_model!, u0, tspan, par)
753+ prob = ODEProblem {true,SciMLBase.FullSpecialize} (sbml_model!, u0, tspan, par)
754754
755755sys = modelingtoolkitize (prob)
756756
@@ -759,8 +759,8 @@ sys = structural_simplify(sys)
759759
760760const to = TimerOutput ()
761761
762- @timeit to " ODEProb No Jac" oprob = ODEProblem (sys, Float64[], tspan, Float64[])
763- @timeit to " ODEProb DenseJac" densejacprob = ODEProblem (sys, Float64[], tspan, Float64[], jac= true )
762+ @timeit to " ODEProb No Jac" oprob = ODEProblem {true,SciMLBase.FullSpecialize} (sys, Float64[], tspan, Float64[])
763+ @timeit to " ODEProb DenseJac" densejacprob = ODEProblem {true,SciMLBase.FullSpecialize} (sys, Float64[], tspan, Float64[], jac= true )
764764```
765765
766766```
@@ -792,7 +792,7 @@ u0: 109-element Vector{Float64}:
792792
793793
794794``` julia
795- @timeit to " ODEProb SparseJac" sparsejacprob = ODEProblem (sys, Float64[], tspan, Float64[], jac= true , sparse= true )
795+ @timeit to " ODEProb SparseJac" sparsejacprob = ODEProblem {true,SciMLBase.FullSpecialize} (sys, Float64[], tspan, Float64[], jac= true , sparse= true )
796796show (to)
797797```
798798
@@ -803,19 +803,19 @@ show(to)
803803
804804 ─────────────────────── ────────────────────
805805────
806- Tot / % measured: 14.2s / 99 .3% 1.60GiB / 99.5 %
806+ Tot / % measured: 39.9s / 96 .3% 5.74GiB / 97.6 %
807807
808808
809809 Section ncalls time %tot avg alloc %tot
810810 avg
811811 ──────────────────────────────────────────────────────────────────────────
812812────
813- ODEProb DenseJac 1 10.2s 72 .6% 10.2s 1.20GiB 75.1 % 1.2
814- 0GiB
815- ODEProb No Jac 1 2.06s 14.7 % 2.06s 233MiB 14.3 % 23
816- 3MiB
817- ODEProb SparseJac 1 1.79s 12.7 % 1.79s 175MiB 10.7 % 17
818- 5MiB
813+ ODEProb No Jac 1 18.3s 47 .6% 18.3s 2.93GiB 52.4 % 2.9
814+ 3GiB
815+ ODEProb DenseJac 1 14.2s 37.1 % 14.2s 1.95GiB 34.8 % 1.9
816+ 5GiB
817+ ODEProb SparseJac 1 5.87s 15.3 % 5.87s 736MiB 12.8 % 73
818+ 6MiB
819819 ──────────────────────────────────────────────────────────────────────────
820820────
821821```
@@ -863,8 +863,8 @@ test_sol = TestSolution(sol)
863863```
864864
865865```
866- 0.119121 seconds (108.06 k allocations: 8.883 MiB, 81.57 % compilation tim
867- e )
866+ 0.218112 seconds (625.67 k allocations: 35.934 MiB, 90.59 % compilation ti
867+ me )
868868retcode: Success
869869Interpolation: 3rd order Hermite
870870t: nothing
@@ -936,11 +936,7 @@ plot(wp, title = "Implicit Methods: SBML Model",legend=:outertopleft,size = (100
936936 bottom_margin= 5 Plots. mm)
937937```
938938
939- ```
940- "No matching function wrapper was found!"
941- ```
942-
943-
939+ ![ ] ( figures/Bidkhori2012_8_1.png )
944940
945941
946942
@@ -986,6 +982,8 @@ plot(wp, title = "Implicit Methods: SBML Model",legend=:outertopleft,size = (100
986982## Sparse Jacobian
987983Finally we test using the generated sparse analytic Jacobian function.
988984
985+ Note that the extrapolation methods currently do not support sparse Jacobians.
986+
989987``` julia
990988setups = [
991989 # Dict(:alg=>CVODE_BDF()), #Fails!
@@ -995,16 +993,17 @@ setups = [
995993 # Dict(:alg=>lsoda()),
996994 # Dict(:alg=>radau()),
997995 # Dict(:alg=>seulex()),
998- Dict (:alg => ImplicitEulerExtrapolation (autodiff = false ,min_order = 8 , init_order = 9 ,threading = OrdinaryDiffEq. PolyesterThreads ())),
999- Dict (:alg => ImplicitEulerExtrapolation (autodiff = false ,min_order = 8 , init_order = 9 ,threading = false )),
1000- Dict (:alg => ImplicitEulerBarycentricExtrapolation (autodiff = false ,min_order = 7 , init_order = 8 ,threading = OrdinaryDiffEq. PolyesterThreads ())),
1001- Dict (:alg => ImplicitEulerBarycentricExtrapolation (autodiff = false ,min_order = 7 , init_order = 8 ,threading = false )),
1002- Dict (:alg => ImplicitHairerWannerExtrapolation (autodiff = false ,init_order = 5 ,threading = OrdinaryDiffEq. PolyesterThreads ())),
1003- Dict (:alg => ImplicitHairerWannerExtrapolation (autodiff = false ,init_order = 5 , threading = false )),
996+ # Dict(:alg=>ImplicitEulerExtrapolation(autodiff = false,min_order = 8, init_order = 9,threading = OrdinaryDiffEq.PolyesterThreads())),
997+ # Dict(:alg=>ImplicitEulerExtrapolation(autodiff = false,min_order = 8, init_order = 9,threading = false)),
998+ # Dict(:alg=>ImplicitEulerBarycentricExtrapolation(autodiff = false,min_order = 7, init_order = 8,threading = OrdinaryDiffEq.PolyesterThreads())),
999+ # Dict(:alg=>ImplicitEulerBarycentricExtrapolation(autodiff = false,min_order = 7, init_order = 8,threading = false)),
1000+ # Dict(:alg=>ImplicitHairerWannerExtrapolation(autodiff = false,init_order = 5,threading = OrdinaryDiffEq.PolyesterThreads())),
1001+ # Dict(:alg=>ImplicitHairerWannerExtrapolation(autodiff = false,init_order = 5, threading = false)),
10041002 ]
10051003
1006- solnames = [" KenCarp4" ," Rodas4" ," QNDF" ," ImplEulerExtpl (threaded)" , " ImplEulerExtpl (non-threaded)" ,
1007- " ImplEulerBaryExtpl (threaded)" ," ImplEulerBaryExtpl (non-threaded)" ," ImplHWExtpl (threaded)" ," ImplHWExtpl (non-threaded)" ]
1004+ solnames = [" KenCarp4" ," Rodas4" ," QNDF" ,# "ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)",
1005+ # "ImplEulerBaryExtpl (threaded)","ImplEulerBaryExtpl (non-threaded)","ImplHWExtpl (threaded)","ImplHWExtpl (non-threaded)"
1006+ ]
10081007
10091008wp = WorkPrecisionSet (sparsejacprob ,abstols,reltols,setups;
10101009 names = solnames,appxsol= test_sol,save_everystep= false ,maxiters= Int (1e5 ),numruns= 10 )
@@ -1015,29 +1014,7 @@ plot(wp, title = "Implicit Methods: SBML Model",legend=:outertopleft,size = (100
10151014 bottom_margin= 5 Plots. mm)
10161015```
10171016
1018- ```
1019- Error: MethodError: no method matching OrdinaryDiffEq.WOperator(::SciMLBase
1020- .ODEFunction{true, SciMLBase.FullSpecialize, ModelingToolkit.var"#f#462"{Ru
1021- ntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), Mo
1022- delingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0xe3b0
1023- 0ccf, 0x8aadcfe4, 0x4e71a901, 0xab8fb55e, 0x0a41efc9)}, RuntimeGeneratedFun
1024- ctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToo
1025- lkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0xe72c7916, 0x6
1026- b74e98f, 0x0dde803e, 0x1b675738, 0x5e15b059)}}, LinearAlgebra.UniformScalin
1027- g{Bool}, Nothing, Nothing, ModelingToolkit.var"#_jac#466"{RuntimeGeneratedF
1028- unctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.v
1029- ar"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x195537d6, 0x0cf0f75
1030- 0, 0x1b705c87, 0x16521c3f, 0x1d0feb38)}, RuntimeGeneratedFunctions.RuntimeG
1031- eneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_
1032- ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x38f7dfcb, 0xed502c96, 0xf9c5
1033- b648, 0x175af9d5, 0xb55167c0)}}, Nothing, Nothing, SparseArrays.SparseMatri
1034- xCSC{Float64, Int64}, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, S
1035- ymbol, Vector{Symbol}, ModelingToolkit.var"#482#generated_observed#469"{Boo
1036- l, ModelingToolkit.ODESystem, Dict{Any, Any}}, Nothing, ModelingToolkit.ODE
1037- System}, ::Float64, ::Bool)
1038- ```
1039-
1040-
1017+ ![ ] ( figures/Bidkhori2012_10_1.png )
10411018
10421019
10431020## Appendix
@@ -1073,7 +1050,7 @@ Environment:
10731050Package Information:
10741051
10751052```
1076- Status `/cache/build/exclusive-amdci3 -0/julialang/scimlbenchmarks-dot-jl/benchmarks/Bio/Project.toml`
1053+ Status `/cache/build/exclusive-amdci1 -0/julialang/scimlbenchmarks-dot-jl/benchmarks/Bio/Project.toml`
10771054⌃ [6e4b80f9] BenchmarkTools v1.3.1
10781055⌃ [479239e8] Catalyst v12.3.0
10791056⌃ [2b5f629d] DiffEqBase v6.105.0
@@ -1098,7 +1075,7 @@ Warning The project dependencies or compat requirements have changed since the m
10981075And the full manifest:
10991076
11001077```
1101- Status `/cache/build/exclusive-amdci3 -0/julialang/scimlbenchmarks-dot-jl/benchmarks/Bio/Manifest.toml`
1078+ Status `/cache/build/exclusive-amdci1 -0/julialang/scimlbenchmarks-dot-jl/benchmarks/Bio/Manifest.toml`
11021079⌃ [c3fe647b] AbstractAlgebra v0.27.4
11031080⌃ [1520ce14] AbstractTrees v0.4.2
11041081 [79e6a3ab] Adapt v3.4.0
@@ -1214,7 +1191,7 @@ Status `/cache/build/exclusive-amdci3-0/julialang/scimlbenchmarks-dot-jl/benchma
12141191⌃ [10f19ff3] LayoutPointers v0.1.10
12151192 [d3d80556] LineSearches v7.2.0
12161193⌃ [7ed4a6bd] LinearSolve v1.26.0
1217- [2ab3a3ac] LogExpFunctions v0.3.18
1194+ ⌃ [2ab3a3ac] LogExpFunctions v0.3.18
12181195⌅ [e6f89c97] LoggingExtras v0.4.9
12191196⌃ [bdcacae8] LoopVectorization v0.12.132
12201197 [1914dd2f] MacroTools v0.5.10
@@ -1229,15 +1206,15 @@ Status `/cache/build/exclusive-amdci3-0/julialang/scimlbenchmarks-dot-jl/benchma
12291206 [102ac46a] MultivariatePolynomials v0.4.6
12301207 [ffc61752] Mustache v1.0.14
12311208⌃ [d8a4904e] MutableArithmetics v1.0.4
1232- [d41bc354] NLSolversBase v7.8.2
1209+ ⌃ [d41bc354] NLSolversBase v7.8.2
12331210 [2774e3e8] NLsolve v4.5.1
12341211 [77ba4419] NaNMath v1.0.1
12351212 [8913a72c] NonlinearSolve v0.3.22
12361213 [54ca160b] ODEInterface v0.5.0
12371214 [09606e27] ODEInterfaceDiffEq v3.11.0
12381215⌃ [6fe1bfb0] OffsetArrays v1.12.7
12391216⌃ [4d8831e6] OpenSSL v1.2.1
1240- [429524aa] Optim v1.7.3
1217+ ⌃ [429524aa] Optim v1.7.3
12411218 [bac558e1] OrderedCollections v1.4.1
12421219⌃ [1dea7af3] OrdinaryDiffEq v6.28.0
12431220 [90014a1f] PDMats v0.11.16
@@ -1294,7 +1271,7 @@ Status `/cache/build/exclusive-amdci3-0/julialang/scimlbenchmarks-dot-jl/benchma
12941271 [82ae8749] StatsAPI v1.5.0
12951272 [2913bbd2] StatsBase v0.33.21
12961273 [4c63d2b9] StatsFuns v1.0.1
1297- ⌃ [7792a7ef] StrideArraysCore v0.3.15
1274+ ⌅ [7792a7ef] StrideArraysCore v0.3.15
12981275 [69024149] StringEncodings v0.3.5
12991276⌃ [c3572dad] Sundials v4.10.1
13001277 [d1185830] SymbolicUtils v0.19.11
0 commit comments