Skip to content

Commit cebef0c

Browse files
efaulhabersvchb
andauthored
Show parallelization backend and Julia version in info callback (#842)
* Show parallelization backend in info callback * Fix tests * Fix tets --------- Co-authored-by: Sven Berger <berger.sven@gmail.com>
1 parent e6c4d46 commit cebef0c

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/callbacks/info.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ function initialize_info_callback(discrete_callback, u, t, integrator;
135135
println()
136136

137137
# Technical details
138-
setup = Pair{String, Any}["#threads" => Threads.nthreads()]
138+
setup = Pair{String, Any}["Julia version" => VERSION,
139+
"parallelization backend" => semi.parallelization_backend |> typeof |> nameof,
140+
"#threads" => Threads.nthreads()]
139141
summary_box(io, "Environment information", setup)
140142
println()
141143
println()

test/callbacks/info.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
continuous_callbacks = (:cb1, :cb2)
2323
discrete_callbacks = (callback, (; (affect!)=:cb3))
2424

25-
semi = (; systems=(:system1, :system2))
25+
semi = (; systems=(:system1, :system2), parallelization_backend=PolyesterBackend())
2626

2727
integrator = (; p=semi,
2828
opts=(;
@@ -42,7 +42,7 @@
4242
╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝╚══════╝╚══════╝
4343
4444
45-
(systems = (:system1, :system2),)
45+
(systems = (:system1, :system2), parallelization_backend = PolyesterBackend())
4646
4747
:system1
4848
@@ -68,6 +68,8 @@
6868
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
6969
│ Environment information │
7070
│ ═══════════════════════ │
71+
│ Julia version: ………………………………………… $(@sprintf("%-29s", VERSION))
72+
│ parallelization backend: ……………… PolyesterBackend │
7173
│ #threads: ……………………………………………………… $(@sprintf("%-40d", Threads.nthreads()))
7274
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
7375

0 commit comments

Comments
 (0)