Skip to content
This repository was archived by the owner on Dec 30, 2025. It is now read-only.

Commit 058e3b2

Browse files
Automatic build\nPublished by build of: SciML/SciMLTutorials.jl@cab3a34
1 parent 3eacd73 commit 058e3b2

3 files changed

Lines changed: 147 additions & 144 deletions

File tree

html/advanced/02-advanced_ODE_solving.html

Lines changed: 75 additions & 74 deletions
Large diffs are not rendered by default.

markdown/advanced/02-advanced_ODE_solving.md

Lines changed: 70 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ the number of physical cores and not the number of logical cores. See
5151
To check the number of BLAS threads, use:
5252

5353
```julia
54-
ccall((:openblas_get_num_threads64_, Base.libblas_name), Cint, ())
54+
using LinearAlgebra
55+
LinearAlgebra.BLAS.get_num_threads()
5556
```
5657

5758
```
@@ -154,7 +155,7 @@ using BenchmarkTools
154155
```
155156

156157
```
157-
586.464 μs (2561 allocations: 186.89 KiB)
158+
563.855 μs (2561 allocations: 186.89 KiB)
158159
retcode: Success
159160
Interpolation: automatic order switching interpolation
160161
t: 115-element Vector{Float64}:
@@ -230,7 +231,7 @@ prob_jac = ODEProblem(f,[1.0,0.0,0.0],(0.0,1e5),(0.04,3e7,1e4))
230231
```
231232

232233
```
233-
360.726 μs (2002 allocations: 126.28 KiB)
234+
354.177 μs (2002 allocations: 126.28 KiB)
234235
retcode: Success
235236
Interpolation: automatic order switching interpolation
236237
t: 115-element Vector{Float64}:
@@ -295,44 +296,43 @@ ModelingToolkit.generate_jacobian(de)[2] # Second is in-place
295296
```
296297

297298
```
298-
:(function (var"##out#7621", var"##arg#7619", var"##arg#7620", t)
299-
#= /root/.cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97
300-
-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:282 =#
301-
#= /root/.cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97
302-
-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:283 =#
303-
let var"x₁(t)" = #= /root/.cache/julia-buildkite-plugin/depots/a6029d
304-
3a-f78b-41ea-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:169
305-
=# @inbounds(var"##arg#7619"[1]), var"x₂(t)" = #= /root/.cache/julia-build
306-
kite-plugin/depots/a6029d3a-f78b-41ea-bc97-28aa57c6c6ea/packages/SymbolicUt
307-
ils/9iQGH/src/code.jl:169 =# @inbounds(var"##arg#7619"[2]), var"x₃(t)" = #=
308-
/root/.cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-28aa57c
309-
6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:169 =# @inbounds(var"##arg#7
310-
619"[3]), α₁ = #= /root/.cache/julia-buildkite-plugin/depots/a6029d3a-f78b-
311-
41ea-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:169 =# @inb
312-
ounds(var"##arg#7620"[1]), α₂ = #= /root/.cache/julia-buildkite-plugin/depo
313-
ts/a6029d3a-f78b-41ea-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/co
314-
de.jl:169 =# @inbounds(var"##arg#7620"[2]), α₃ = #= /root/.cache/julia-buil
315-
dkite-plugin/depots/a6029d3a-f78b-41ea-bc97-28aa57c6c6ea/packages/SymbolicU
316-
tils/9iQGH/src/code.jl:169 =# @inbounds(var"##arg#7620"[3])
317-
#= /root/.cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-
318-
bc97-28aa57c6c6ea/packages/Symbolics/h8kPL/src/build_function.jl:331 =#
319-
#= /root/.cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-
320-
bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:329 =# @inbounds
321-
begin
322-
#= /root/.cache/julia-buildkite-plugin/depots/a6029d3a-f7
323-
8b-41ea-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:325 =#
324-
var"##out#7621"[1] = (*)(-1, α₁)
325-
var"##out#7621"[2] = α₁
326-
var"##out#7621"[3] = 0
327-
var"##out#7621"[4] = (*)(α₃, var"x₃(t)")
328-
var"##out#7621"[5] = (+)((*)(-2, α₂, var"x₂(t)"), (*)(-1,
299+
:(function (var"##out#5956", var"##arg#5954", var"##arg#5955", t)
300+
#= /cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-28aa5
301+
7c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:282 =#
302+
#= /cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-28aa5
303+
7c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:283 =#
304+
let var"x₁(t)" = #= /cache/julia-buildkite-plugin/depots/a6029d3a-f78
305+
b-41ea-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:169 =# @i
306+
nbounds(var"##arg#5954"[1]), var"x₂(t)" = #= /cache/julia-buildkite-plugin/
307+
depots/a6029d3a-f78b-41ea-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/sr
308+
c/code.jl:169 =# @inbounds(var"##arg#5954"[2]), var"x₃(t)" = #= /cache/juli
309+
a-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-28aa57c6c6ea/packages/Sym
310+
bolicUtils/9iQGH/src/code.jl:169 =# @inbounds(var"##arg#5954"[3]), α₁ = #=
311+
/cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-28aa57c6c6ea/p
312+
ackages/SymbolicUtils/9iQGH/src/code.jl:169 =# @inbounds(var"##arg#5955"[1]
313+
), α₂ = #= /cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-28a
314+
a57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:169 =# @inbounds(var"##a
315+
rg#5955"[2]), α₃ = #= /cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41
316+
ea-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:169 =# @inbou
317+
nds(var"##arg#5955"[3])
318+
#= /cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-2
319+
8aa57c6c6ea/packages/Symbolics/h8kPL/src/build_function.jl:331 =#
320+
#= /cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-2
321+
8aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:329 =# @inbounds begin
322+
#= /cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41e
323+
a-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:325 =#
324+
var"##out#5956"[1] = (*)(-1, α₁)
325+
var"##out#5956"[2] = α₁
326+
var"##out#5956"[3] = 0
327+
var"##out#5956"[4] = (*)(α₃, var"x₃(t)")
328+
var"##out#5956"[5] = (+)((*)(-2, α₂, var"x₂(t)"), (*)(-1,
329329
α₃, var"x₃(t)"))
330-
var"##out#7621"[6] = (*)(2, α₂, var"x₂(t)")
331-
var"##out#7621"[7] = (*)(α₃, var"x₂(t)")
332-
var"##out#7621"[8] = (*)(-1, α₃, var"x₂(t)")
333-
var"##out#7621"[9] = 0
334-
#= /root/.cache/julia-buildkite-plugin/depots/a6029d3a-f7
335-
8b-41ea-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:327 =#
330+
var"##out#5956"[6] = (*)(2, α₂, var"x₂(t)")
331+
var"##out#5956"[7] = (*)(α₃, var"x₂(t)")
332+
var"##out#5956"[8] = (*)(-1, α₃, var"x₂(t)")
333+
var"##out#5956"[9] = 0
334+
#= /cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41e
335+
a-bc97-28aa57c6c6ea/packages/SymbolicUtils/9iQGH/src/code.jl:327 =#
336336
nothing
337337
end
338338
end
@@ -534,7 +534,7 @@ f = ODEFunction(brusselator_2d_loop;jac_prototype=jac_sparsity)
534534
```
535535
536536
```
537-
(::SciMLBase.ODEFunction{true, typeof(Main.##WeaveSandBox#7213.brusselator_
537+
(::SciMLBase.ODEFunction{true, typeof(Main.##WeaveSandBox#5548.brusselator_
538538
2d_loop), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, No
539539
thing, Nothing, SparseArrays.SparseMatrixCSC{Float64, Int64}, SparseArrays.
540540
SparseMatrixCSC{Float64, Int64}, Nothing, Nothing, Nothing, Nothing, Nothin
@@ -629,8 +629,8 @@ Now let's see how the version with sparsity compares to the version without:
629629
```
630630
631631
```
632-
4.043 s (3332 allocations: 65.33 MiB)
633-
869.262 ms (40173 allocations: 276.18 MiB)
632+
4.100 s (3332 allocations: 65.33 MiB)
633+
542.630 ms (40171 allocations: 276.18 MiB)
634634
retcode: Success
635635
Interpolation: 1st order linear
636636
t: 2-element Vector{Float64}:
@@ -702,7 +702,7 @@ prob_ode_brusselator_2d_sparse = ODEProblem(f,
702702
```
703703
704704
```
705-
865.877 ms (7392 allocations: 272.21 MiB)
705+
541.163 ms (7386 allocations: 272.21 MiB)
706706
retcode: Success
707707
Interpolation: 1st order linear
708708
t: 2-element Vector{Float64}:
@@ -753,8 +753,8 @@ GMRES linear solver.
753753
```
754754
755755
```
756-
42.575 s (1440760 allocations: 148.08 MiB)
757-
3.499 s (487052 allocations: 19.49 MiB)
756+
40.444 s (1440760 allocations: 148.08 MiB)
757+
1.898 s (487052 allocations: 19.49 MiB)
758758
retcode: Success
759759
Interpolation: 1st order linear
760760
t: 2-element Vector{Float64}:
@@ -804,11 +804,11 @@ Jv = JacVecOperator(brusselator_2d_loop,u0,p,0.0)
804804
```
805805
806806
```
807-
DiffEqOperators.JacVecOperator{Float64, typeof(Main.##WeaveSandBox#7213.bru
807+
DiffEqOperators.JacVecOperator{Float64, typeof(Main.##WeaveSandBox#5548.bru
808808
sselator_2d_loop), Array{ForwardDiff.Dual{DiffEqOperators.JacVecTag, Float6
809809
4, 1}, 3}, Array{ForwardDiff.Dual{DiffEqOperators.JacVecTag, Float64, 1}, 3
810810
}, Array{Float64, 3}, NTuple{4, Float64}, Float64, Bool}(Main.##WeaveSandBo
811-
x#7213.brusselator_2d_loop, ForwardDiff.Dual{DiffEqOperators.JacVecTag, Flo
811+
x#5548.brusselator_2d_loop, ForwardDiff.Dual{DiffEqOperators.JacVecTag, Flo
812812
at64, 1}[Dual{DiffEqOperators.JacVecTag}(0.0,0.0) Dual{DiffEqOperators.JacV
813813
ecTag}(0.12134432813715876,0.12134432813715876) Dual{DiffEqOperators.JacV
814814
ecTag}(0.1213443281371586,0.1213443281371586) Dual{DiffEqOperators.JacVecTa
@@ -887,7 +887,7 @@ prob_ode_brusselator_2d_jacfree = ODEProblem(f,u0,(0.,11.5),p)
887887
```
888888
889889
```
890-
2.134 s (942433 allocations: 1.05 GiB)
890+
2.014 s (942433 allocations: 1.05 GiB)
891891
retcode: Success
892892
Interpolation: 1st order linear
893893
t: 2-element Vector{Float64}:
@@ -933,7 +933,7 @@ pc = aspreconditioner(ruge_stuben(jac_sparsity))
933933
```
934934
935935
```
936-
52.991 ms (2126 allocations: 4.62 MiB)
936+
44.779 ms (2126 allocations: 4.62 MiB)
937937
retcode: Success
938938
Interpolation: 1st order linear
939939
t: 2-element Vector{Float64}:
@@ -1011,8 +1011,8 @@ using Sundials
10111011
```
10121012
10131013
```
1014-
15.834 s (51406 allocations: 3.40 MiB)
1015-
296.692 ms (54356 allocations: 3.24 MiB)
1014+
14.773 s (51406 allocations: 3.40 MiB)
1015+
328.528 ms (61034 allocations: 3.62 MiB)
10161016
retcode: Success
10171017
Interpolation: 1st order linear
10181018
t: 2-element Vector{Float64}:
@@ -1026,17 +1026,17 @@ u: 2-element Vector{Array{Float64, 3}}:
10261026
[0.0 0.0 0.0 0.0; 0.14892258453196755 0.14892258453196755 0.14892258453
10271027
196755 0.14892258453196755; ; 0.14892258453196738 0.14892258453196738 0
10281028
.14892258453196738 0.14892258453196738; 0.0 0.0 0.0 0.0]
1029-
[0.73954982624037 0.7395263388402707 0.7396351353060872 0.73958594992628
1030-
53; 0.7396041658726187 0.7395794572427602 0.739695044334048 0.73964269792
1031-
96304; ; 0.7394464539934248 0.7394236442964711 0.739525711935924 0.7394
1032-
816883777938; 0.7394971311298292 0.7394736007090181 0.7395776392281666 0.
1033-
7395310908993405]
1029+
[0.45369441125092624 0.45367162922766396 0.45377307354145824 0.453728249
1030+
24331306; 0.45372813444006976 0.45370139820263283 0.45382031508907966 0.4
1031+
537681622154197; ; 0.4536347409999057 0.4536184243336325 0.453690734603
1032+
503 0.4536589378647838; 0.4536631791063342 0.4536436405637919 0.453729310
1033+
5001047 0.45369169445940305]
10341034

1035-
[5.2303939324919755 5.230393890057542 5.2303959984740604 5.23039480844585
1036-
2; 5.230381468535975 5.230378860934974 5.23039032191521 5.230385777894235
1037-
; ; 5.230417475089114 5.230421848938212 5.2304069866992995 5.2304127960
1038-
05578; 5.230406186817664 5.230408247767747 5.230402329506947 5.2304044894
1039-
92586]
1035+
[5.023428953606044 5.023425514309876 5.02343972583798 5.0234337753788845;
1036+
5.023442660236476 5.023439873077652 5.02345101637559 5.023446317614284;
1037+
; 5.023404093671991 5.023399216246354 5.023419229667771 5.0234107290209
1038+
42; 5.023415926060523 5.023411776722086 5.02342895844194 5.02342180621704
1039+
3]
10401040
```
10411041
10421042
@@ -1111,30 +1111,31 @@ To locally run this tutorial, do the following commands:
11111111
11121112
```
11131113
using SciMLTutorials
1114-
SciMLTutorials.weave_file("tutorials/advanced","02-advanced_ODE_solving.jmd")
1114+
SciMLTutorials.weave_file("advanced","02-advanced_ODE_solving.jmd")
11151115
```
11161116
11171117
Computer Information:
11181118
11191119
```
1120-
Julia Version 1.6.2
1121-
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
1120+
Julia Version 1.6.5
1121+
Commit 9058264a69 (2021-12-19 12:30 UTC)
11221122
Platform Info:
11231123
OS: Linux (x86_64-pc-linux-gnu)
11241124
CPU: AMD EPYC 7502 32-Core Processor
11251125
WORD_SIZE: 64
11261126
LIBM: libopenlibm
11271127
LLVM: libLLVM-11.0.1 (ORCJIT, znver2)
11281128
Environment:
1129-
JULIA_DEPOT_PATH = /root/.cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-28aa57c6c6ea
1130-
JULIA_NUM_THREADS = 16
1129+
JULIA_CPU_THREADS = 16
1130+
BUILDKITE_PLUGIN_JULIA_CACHE_DIR = /cache/julia-buildkite-plugin
1131+
JULIA_DEPOT_PATH = /cache/julia-buildkite-plugin/depots/a6029d3a-f78b-41ea-bc97-28aa57c6c6ea
11311132

11321133
```
11331134
11341135
Package Information:
11351136
11361137
```
1137-
Status `/var/lib/buildkite-agent/builds/8-amdci4-julia-csail-mit-edu/julialang/scimltutorials-dot-jl/tutorials/advanced/Project.toml`
1138+
Status `/cache/build/default-amdci4-2/julialang/scimltutorials-dot-jl/tutorials/advanced/Project.toml`
11381139
[2169fc97] AlgebraicMultigrid v0.4.0
11391140
[6e4b80f9] BenchmarkTools v1.0.0
11401141
[052768ef] CUDA v2.6.3
@@ -1160,7 +1161,7 @@ Package Information:
11601161
And the full manifest:
11611162
11621163
```
1163-
Status `/var/lib/buildkite-agent/builds/8-amdci4-julia-csail-mit-edu/julialang/scimltutorials-dot-jl/tutorials/advanced/Manifest.toml`
1164+
Status `/cache/build/default-amdci4-2/julialang/scimltutorials-dot-jl/tutorials/advanced/Manifest.toml`
11641165
[c3fe647b] AbstractAlgebra v0.16.0
11651166
[621f4979] AbstractFFTs v1.0.1
11661167
[1520ce14] AbstractTrees v0.3.4

script/advanced/02-advanced_ODE_solving.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
ccall((:openblas_get_num_threads64_, Base.libblas_name), Cint, ())
2+
using LinearAlgebra
3+
LinearAlgebra.BLAS.get_num_threads()
34

45

56
using LinearAlgebra

0 commit comments

Comments
 (0)