Skip to content

Test libraries with OMBackend.jl (OMJL) - #410

Open
sjoelund wants to merge 1 commit into
masterfrom
omjulia
Open

sjoelund wants to merge 1 commit into
masterfrom
omjulia

Conversation

@sjoelund

Copy link
Copy Markdown
Member

The new omjulia job translates and simulates every model with OMBackend.jl. omc, built with -DOM_OMC_ENABLE_RUST=ON, instantiates the model; OMBackend.jl reads the flat model through OMCompiler.jl and does the rest.

  • omjulia/setup.jl puts OMBackend.jl and its sibling packages, at the commits that JKRT/OM.jl pins as its submodules, in an environment with the OMCompiler.jl of the tested omc. It precompiles them into a depot that is kept between runs. The master branches of the siblings need not fit together: on 2026-11-10, ImmutableList.jl master was 0.6.0, and OMFrontend.jl master accepted only 0.4.2 to 0.5. --ombackend takes another OMBackend.jl ref.
  • With --omhome and --libraries, setup.jl also compiles a sysimage with PackageCompiler, from MSL examples (omjulia/workload.jl) that run the same code as each tested model (omjulia/run.jl). It compiles again only when a package or the workload changes, and it removes an outdated one.
  • omjulia/simulate.jl runs one model in a Julia process of its own. After each phase it writes the phase times to a JSON file, so a run that is killed still tells how far it came. It writes the variables of the reference to a CSV result file.
  • test.py --omjulia= selects it, and starts Julia with the sysimage when there is one. The OMBackend.jl version is part of the library version, so a new commit tests again.
  • The testing image installs Julia 1.13.3.
  • The Jenkins job omjulia fills the omjulia table and overview-omjulia.html.

Tested locally on 14 MSL 4.1.0 examples against the MAP-LIB reference results: 13 verify. Electrical.Digital.Examples.RAM fails in the backend, because OMBackend.jl does not lower FILENAME expressions. The sysimage makes the time per model 23 s instead of 84 s, with the same results. Its first compilation took 54 minutes and 37.5 GB of memory.

An omc build that does not run mmtorust again compiles the checked-in openmodelica_ast/src/Absyn.rs, which on master does not derive MMReflect; then each model with an enumeration fails in the backend. The Jenkins job builds omc from a clean tree, where mmtorust runs.

Assisted-by: Claude Opus 5.5

The new omjulia job translates and simulates every model with
OMBackend.jl. omc, built with -DOM_OMC_ENABLE_RUST=ON, instantiates
the model; OMBackend.jl reads the flat model through OMCompiler.jl
and does the rest.

- omjulia/setup.jl puts OMBackend.jl and its sibling packages, at the
  commits that JKRT/OM.jl pins as its submodules, in an environment
  with the OMCompiler.jl of the tested omc. It precompiles them into
  a depot that is kept between runs. The master branches of the
  siblings need not fit together: on 2026-11-10, ImmutableList.jl
  master was 0.6.0, and OMFrontend.jl master accepted only 0.4.2 to
  0.5. --ombackend takes another OMBackend.jl ref.
- With --omhome and --libraries, setup.jl also compiles a sysimage
  with PackageCompiler, from MSL examples (omjulia/workload.jl) that
  run the same code as each tested model (omjulia/run.jl). It
  compiles again only when a package or the workload changes, and it
  removes an outdated one.
- omjulia/simulate.jl runs one model in a Julia process of its own.
  After each phase it writes the phase times to a JSON file, so a run
  that is killed still tells how far it came. It writes the variables
  of the reference to a CSV result file.
- test.py --omjulia=<dir> selects it, and starts Julia with the
  sysimage when there is one. The OMBackend.jl version is part of the
  library version, so a new commit tests again.
- The testing image installs Julia 1.13.3.
- The Jenkins job omjulia fills the omjulia table and
  overview-omjulia.html.

Tested locally on 14 MSL 4.1.0 examples against the MAP-LIB
reference results: 13 verify. Electrical.Digital.Examples.RAM fails
in the backend, because OMBackend.jl does not lower FILENAME
expressions. The sysimage makes the time per model 23 s instead of
84 s, with the same results. Its first compilation took 54 minutes
and 37.5 GB of memory.

An omc build that does not run mmtorust again compiles the checked-in
openmodelica_ast/src/Absyn.rs, which on master does not derive
MMReflect; then each model with an enumeration fails in the backend.
The Jenkins job builds omc from a clean tree, where mmtorust runs.

Assisted-by: Claude Opus 5.5
@sjoelund
sjoelund requested a review from JKRT November 10, 2026 13:43
@JKRT JKRT changed the title Test libraries with OMBackend.jl (omjulia) Test libraries with OMBackend.jl (OMJL) Nov 10, 2026
@JKRT

JKRT commented Nov 11, 2026

Copy link
Copy Markdown
Member

As I wrote on Slack. I have several PRs in progress to make OMBackend more standalone, so I will postpone the main review until that is sorted out, so we do not build too many dependencies that are needed for OMJL but not for omc + ombackend.jl

--
@SVAGEN26, you have several local MD files concerning how we conserved memory, etc for OMLibraryTesting.jl. Review this for the first round once I give the sign

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.

2 participants