Skip to content

Commit 7c5815c

Browse files
committed
Change back to Rodas5P
1 parent 403073f commit 7c5815c

7 files changed

Lines changed: 68 additions & 3 deletions

File tree

.github/workflows/msl-test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ on:
3636
required: false
3737
default: '^(?!Modelica\.Clocked)'
3838
type: string
39+
solver:
40+
description: 'ODE solver algorithm (any DifferentialEquations.jl algorithm name, e.g. Rodas5P, FBDF)'
41+
required: false
42+
default: 'Rodas5P'
43+
type: string
3944

4045
concurrency:
4146
group: pages-${{ inputs.library || 'Modelica' }}-${{ inputs.lib_version || '4.1.0' }}-${{ inputs.bm_version || 'main' }}
@@ -58,6 +63,7 @@ jobs:
5863
BM_VERSION_INPUT: ${{ inputs.bm_version || 'main' }}
5964
BM_OPTIONS: ${{ inputs.bm_options || 'scalarize,moveBindings,inlineFunctions' }}
6065
FILTER: ${{ inputs.filter || '^(?!Modelica\.Clocked)' }}
66+
SOLVER: ${{ inputs.solver || 'Rodas5P' }}
6167

6268
steps:
6369
- name: Checkout source
@@ -123,6 +129,9 @@ jobs:
123129
run: |
124130
julia --project=. -e '
125131
using BaseModelicaLibraryTesting
132+
using DifferentialEquations
133+
solver_name = get(ENV, "SOLVER", "Rodas5P")
134+
configure_simulate!(solver = getproperty(DifferentialEquations, Symbol(solver_name))())
126135
filter_str = get(ENV, "FILTER", "")
127136
main(
128137
library = ENV["LIB_NAME"],

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,55 @@ main(
5555

5656
Preview the generated HTML report at `main/Modelica/4.1.0/report.html`.
5757

58+
### Changing the ODE Solver
59+
60+
By default the simulation uses `Rodas5P()`. To switch to a different solver,
61+
call `configure_simulate!` before `main`:
62+
63+
```julia
64+
using BaseModelicaLibraryTesting
65+
using DifferentialEquations
66+
67+
configure_simulate!(solver = FBDF())
68+
69+
main(
70+
library = "Modelica",
71+
version = "4.1.0",
72+
omc_exe = "omc",
73+
ref_root = "MAP-LIB_ReferenceResults"
74+
)
75+
```
76+
77+
Any SciML-compatible ODE/DAE algorithm (e.g. `QNDF()`, `Rodas4()`) can be
78+
passed to `solver`.
79+
5880
```bash
5981
python -m http.server -d results/main/Modelica/4.1.0/
6082
```
6183

84+
## GitHub Actions — Manual MSL Test
85+
86+
The [MSL Test & GitHub Pages][msl-action-url] workflow runs automatically every
87+
day at 03:00 UTC. It can also be triggered manually from the GitHub Actions UI:
88+
89+
1. Go to **Actions → MSL Test & GitHub Pages**
90+
2. Click **Run workflow**
91+
3. Fill in the options and click **Run workflow**
92+
93+
The following inputs are available:
94+
95+
| Input | Default | Description |
96+
| ----- | ------- | ----------- |
97+
| `library` | `Modelica` | Modelica library name |
98+
| `lib_version` | `4.1.0` | Library version to test |
99+
| `bm_version` | `main` | BaseModelica.jl branch, tag, or version |
100+
| `bm_options` | `scalarize,moveBindings,inlineFunctions` | Comma-separated `--baseModelicaOptions` passed to OpenModelica during Base Modelica export |
101+
| `filter` | `^(?!Modelica\.Clocked)` | Julia regex to restrict which models are tested (empty string runs all models) |
102+
| `solver` | `Rodas5P` | Any `DifferentialEquations.jl` algorithm name (e.g. `Rodas5P`, `Rodas5Pr`, `FBDF`) |
103+
104+
Results are published to [GitHub Pages][msl-pages-url] under
105+
`results/<bm_version>/<library>/<lib_version>/`.
106+
62107
## License
63108

64109
This package is available under the [OSMC-PL License][osmc-license-file] and the
@@ -68,6 +113,7 @@ file for details.
68113
[build-badge-svg]: https://github.com/OpenModelica/BaseModelicaLibraryTesting.jl/actions/workflows/CI.yml/badge.svg?branch=main
69114
[build-action-url]: https://github.com/OpenModelica/BaseModelicaLibraryTesting.jl/actions/workflows/CI.yml?query=branch%3Amain
70115
[msl-badge-svg]: https://github.com/OpenModelica/BaseModelicaLibraryTesting.jl/actions/workflows/msl-test.yml/badge.svg?branch=main
116+
[msl-action-url]: https://github.com/OpenModelica/BaseModelicaLibraryTesting.jl/actions/workflows/msl-test.yml
71117
[msl-pages-url]: https://openmodelica.github.io/BaseModelicaLibraryTesting.jl/
72118
[openmodelica-url]: https://openmodelica.org/
73119
[basemodelicajl-url]: https://github.com/SciML/BaseModelica.jl

src/pipeline.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ function main(;
251251
length(cpu_info),
252252
Sys.total_memory() / 1024^3,
253253
time() - t0,
254+
let s = _SIM_SETTINGS.solver
255+
"$(parentmodule(typeof(s))).$(nameof(typeof(s)))"
256+
end,
254257
)
255258

256259
generate_report(results, results_root, info; csv_max_size_mb)

src/report.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ function generate_report(results::Vector{ModelResult}, results_root::String,
159159
OpenModelica: $(info.omc_version)<br>
160160
OMC options: <code>$(info.omc_options)</code><br>
161161
BaseModelica.jl: $(basemodelica_jl_version)<br>
162+
Solver: <code>$(info.solver)</code><br>
162163
Filter: $(var_filter)<br>
163164
Reference results: $(ref_results)</p>
164165
<p>CPU: $(info.cpu_model) ($(info.cpu_threads) threads)<br>

src/simulate.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import ModelingToolkit
66
import Printf: @sprintf
77

88
"""Module-level default simulation settings. Modify via `configure_simulate!`."""
9-
const _SIM_SETTINGS = SimulateSettings(solver = DifferentialEquations.Rodas5Pr())
9+
const _SIM_SETTINGS = SimulateSettings(solver = DifferentialEquations.Rodas5P())
1010

1111
"""
1212
configure_simulate!(; solver, saveat_n) → SimulateSettings
1313
1414
Update the module-level simulation settings in-place and return them.
1515
1616
# Keyword arguments
17-
- `solver` — any SciML ODE/DAE algorithm instance (e.g. `Rodas5Pr`, `FBDF()`).
17+
- `solver` — any SciML ODE/DAE algorithm instance (e.g. `Rodas5P`, `FBDF()`).
1818
- `saveat_n` — number of uniform time points for purely algebraic systems.
1919
2020
# Example

src/summary.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function write_summary(
3333
print(io, " \"cpu_threads\": $(info.cpu_threads),\n")
3434
print(io, " \"ram_gb\": $(@sprintf "%.2f" info.ram_gb),\n")
3535
print(io, " \"total_time_s\": $(@sprintf "%.2f" info.total_time_s),\n")
36+
print(io, " \"solver\": \"$(_esc_json(info.solver))\",\n")
3637
print(io, " \"models\": [\n")
3738
for (i, r) in enumerate(results)
3839
sep = i < length(results) ? "," : ""
@@ -74,6 +75,7 @@ Parsed contents of a single `summary.json` file.
7475
- `cpu_threads` — number of logical CPU threads
7576
- `ram_gb` — total system RAM in GiB
7677
- `total_time_s` — wall-clock duration of the full test run in seconds
78+
- `solver` — fully-qualified solver name, e.g. `"DifferentialEquations.Rodas5P"`
7779
- `models` — vector of per-model dicts; each has keys
7880
`"name"`, `"export"`, `"parse"`, `"sim"`, `"cmp_total"`, `"cmp_pass"`
7981
"""
@@ -92,6 +94,7 @@ struct RunSummary
9294
cpu_threads :: Int
9395
ram_gb :: Float64
9496
total_time_s :: Float64
97+
solver :: String
9598
models :: Vector{Dict{String,Any}}
9699
end
97100

@@ -150,6 +153,7 @@ function load_summary(results_root::String)::Union{RunSummary,Nothing}
150153
_int("cpu_threads"),
151154
_float("ram_gb"),
152155
_float("total_time_s"),
156+
_str("solver"),
153157
models,
154158
)
155159
end

src/types.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Mutable configuration struct for ODE simulation.
4646
4747
# Fields
4848
- `solver` — any SciML ODE/DAE algorithm instance. Default: `nothing`,
49-
resolved to `Rodas5Pr()` when the module-level singleton is
49+
resolved to `Rodas5P()` when the module-level singleton is
5050
constructed in `simulate.jl`.
5151
- `saveat_n` — number of evenly-spaced time points used for purely algebraic
5252
systems (all mass-matrix rows zero). Default: `500`.
@@ -79,6 +79,7 @@ Metadata about a single test run, collected by `main()` and written into both
7979
- `cpu_threads` — number of logical CPU threads
8080
- `ram_gb` — total system RAM in GiB
8181
- `total_time_s` — wall-clock duration of the full test run in seconds
82+
- `solver` — fully-qualified solver name, e.g. `"DifferentialEquations.Rodas5P"`
8283
"""
8384
struct RunInfo
8485
library :: String
@@ -95,6 +96,7 @@ struct RunInfo
9596
cpu_threads :: Int
9697
ram_gb :: Float64
9798
total_time_s :: Float64
99+
solver :: String
98100
end
99101

100102
# ── Result type ────────────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)