Simulate one wasm artifact three ways - #332
Merged
Merged
Conversation
`--wasmjitrunner=sim,me,cs` exports every model once as a wasm artifact
and simulates that one artifact each of those ways, so a model is
translated and compiled once however many runs it gets:
| runner | branch | what runs |
| --- | --- | --- |
| `sim` | `<branch>` | the simulation runtime inside the artifact |
| `me` | `<branch>-me` | FMI 3.0 Model Exchange, omc integrating |
| `cs` | `<branch>-cs` | FMI 3.0 Co-Simulation, the artifact integrating |
```bash
./test.py --branch=master-wasm-jit --wasmjitrunner=sim,me,cs \
--extraflags='--simCodeTarget=wasm-jit' configs/...json
./report.py --branches="master-wasm-jit master-wasm-jit-me master-wasm-jit-cs"
```
It reuses the fan-out `--fmisimulator` already had -- one build, a result
branch per runner, the build phase shared and the simulation and
verification per runner -- so `runnerNames` in test.py and `runners` in
testmodel.py stand for whichever of the two a job asked for. The two are
mutually exclusive.
The runners live in `configs/wasm-jit-runners.json`, so adding a fourth
is an entry there: `simflags` is what is appended to the model's
simulation flags and `branchSuffix` overrides the `-<name>` it adds to
the branch.
The build is `buildModelFMU(..., fmuType="me_cs", version="3.0",
platforms={"wasm"})` with `--fmuDirectory=true`, which writes the model
kernel unzipped; omc links it against an adapter it compiled once into
its cache, so nothing is packed, extracted or loaded per run. Each run
reports what that cost in its `.sim`.
## Jenkins
The `wasm_jit` job runs the three-way target: `--nobuildmodel` becomes
`--wasmjitrunner=sim,me,cs`, and `GITBRANCHES_WASM_JIT` names the three
branches it fills, so `all-reports.py` and `all-plots.py` cover them
without further change. `overview-wasm-jit.html` was `wasm-jit` against
master and is now the three faces against it, which is where they are
worth comparing: they share an export, so only the simulation and the
verification tell them apart.
Needs an omc with the wasm artifact support (OpenModelica
feature/wasm-jit-artifact).
Assisted-by: Claude Opus 5 (1M context)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--wasmjitrunner=sim,me,csexports every model once as a wasm artifact and simulates that one artifact each of those ways, so a model is translated and compiled once however many runs it gets:sim<branch>./test.py --branch=master-wasm-jit --wasmjitrunner=sim,me,cs \ --extraflags='--simCodeTarget=wasm-jit' configs/...json ./report.py --branches="master-wasm-jit master-wasm-jit-me master-wasm-jit-cs"It reuses the fan-out
--fmisimulatoralready had -- one build, a result branch per runner, the build phase shared and the simulation and verification per runner -- sorunnerNamesin test.py andrunnersin testmodel.py stand for whichever of the two a job asked for. The two are mutually exclusive.The runners live in
configs/wasm-jit-runners.json, so adding a fourth is an entry there:simflagsis what is appended to the model's simulation flags andbranchSuffixoverrides the-<name>it adds to the branch.The build is
buildModelFMU(..., fmuType="me_cs", version="3.0", platforms={"wasm"})with--fmuDirectory=true, which writes the model kernel unzipped; omc links it against an adapter it compiled once into its cache, so nothing is packed, extracted or loaded per run. Each run reports what that cost in its.sim.Jenkins
The
wasm_jitjob runs the three-way target:--nobuildmodelbecomes--wasmjitrunner=sim,me,cs, andGITBRANCHES_WASM_JITnames the three branches it fills, soall-reports.pyandall-plots.pycover them without further change.overview-wasm-jit.htmlwaswasm-jitagainst master and is now the three faces against it, which is where they are worth comparing: they share an export, so only the simulation and the verification tell them apart.Needs an omc with the wasm artifact support (OpenModelica feature/wasm-jit-artifact).
Assisted-by: Claude Opus 5 (1M context)