Skip to content

Apply __OpenModelica_simulationFlags to wasm-jit - #294

Merged
sjoelund merged 2 commits into
masterfrom
wasm-jit-alarm
Aug 7, 2026
Merged

Apply __OpenModelica_simulationFlags to wasm-jit#294
sjoelund merged 2 commits into
masterfrom
wasm-jit-alarm

Conversation

@sjoelund

@sjoelund sjoelund commented Aug 7, 2026

Copy link
Copy Markdown
Member

Also add the missing -alarm for the simulation itself

sjoelund and others added 2 commits August 7, 2026 07:57
The wasm-jit runtime honours `-alarm`, but `fixData` only handed the
flag to `simCodeTarget=C`, so wasm-jit runs had no wall-clock limit and
kept going until the harness' own much larger timeout. Models such as
ScalableTestSuite's CocurrentHeatExchangerEquations_N_1280 ran for ten
minutes instead of stopping at the configured `ulimitExe` of 300s.

Co-authored-by: Claude <noreply@anthropic.com>
The annotation was only read for `simCodeTarget=C`, so a model asking
for a specific solver got it in the C run and the default `dassl` in
the wasm-jit one. That is not a like-for-like comparison, and where the
annotation exists it is usually there because the default solver copes
badly: ScalableTestSuite's CocurrentHeatExchangerEquations asks for
`ida` (sparse, KLU), and dassl's dense factorization made the wasm-jit
runs scale cubically instead of linearly.

| N    | dassl  | ida (annotation) | C, ida |
| ---- | ------ | ---------------- | ------ |
| 320  |   3.7s |            0.34s |   0.4s |
| 640  |  31.9s |            1.01s |  0.85s |
| 1280 | >600s  |            2.82s |   1.9s |

The C path validates each flag by running the HelloWorld executable
with it. wasm-jit builds no executable — the runtime is inside omc — so
probe it there instead, by simulating a trivial model through the
session that is already open.

Co-authored-by: Claude <noreply@anthropic.com>
@sjoelund
sjoelund enabled auto-merge (squash) August 7, 2026 09:07
@sjoelund
sjoelund disabled auto-merge August 7, 2026 09:07
@sjoelund
sjoelund enabled auto-merge (rebase) August 7, 2026 09:08
@sjoelund
sjoelund merged commit f052940 into master Aug 7, 2026
7 checks passed
@sjoelund
sjoelund deleted the wasm-jit-alarm branch August 7, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant