Repository navigation
Use resizable arrays in heavy NB tests - #368
Merged
Merged
Conversation
Run all new backend tests in `configs/heavy_tests.json` with `--newBackend --resizableArrays --simCodeScalarize=false`. The LargeTestSuite `NB_simvec` configuration only differed from `NB` by `--simCodeScalarize=false`, so it is now a duplicate and is removed. Assisted-by: Claude Opus 5.5
Collaborator
|
As I said during today's devmeeting, adding |
sjoelund
added a commit
to OpenModelica/OpenModelica
that referenced
this pull request
Oct 7, 2026
With `--resizableArrays --simCodeScalarize=false` the new backend keeps an array sized by an Integer parameter as one `SimVar` with a symbolic dimension (`N`). The wasm-jit target failed every such model with "non-integer array dimension N", which is what the heavy_tests_wasm lane runs since OpenModelica/OpenModelicaLibraryTesting#368. The sizes now stay symbolic until a run starts, as the C target's do (#17077), so `-override=N=20` resizes a model translated once: - `sim_meta::sizes::Sz`: integer polynomials over the size parameters. `Layout::build` is generic over the count type; the codegen builds the layout over `Sz`, `SimMeta::resolve_sizes` (from `apply_flags`, with the overrides) evaluates it into the `Layout` the driver uses. - A resizable model keeps the regions of constant size first. Offsets past the first runtime-sized region are tagged with an entry of a size table at the end of `SimData` (pointer at offset 8); each generated function loads the entries it uses once, in its prologue, so an access stays `local.get; load offset=k`. Hosts write the table after allocating `SimData` (`driver::write_size_table`). - Within each variable region the constant-size variables come first, then the runtime-sized arrays, one entry each in the slot tables, array groups and result variables (expanded once resolved). - The ODE Jacobian's sparsity rows are kept symbolic (`sym_sparsity::SymPattern`) and expanded and coloured at runtime. - Nonlinear systems whose unknowns include a runtime-sized array get their history, nominal and bounds blocks after the layout's end and a numerical Jacobian; their residual rows are counted at runtime. - `variableFilter` of such a model is applied to the resolved variables. Not yet runtime-sized: zero crossings and relations inside for-loops (they use the backend's size for the translated N). The 36 ScalableTestSuite_NB / LargeTestSuite_NB model families the C lane simulates all simulate, with results matching the C target. Assisted-by: Claude Opus 5.5
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.
Run all new backend tests in
configs/heavy_tests.jsonwith--newBackend --resizableArrays --simCodeScalarize=false.The LargeTestSuite
NB_simvecconfiguration only differed fromNBby--simCodeScalarize=false, so it is now a duplicate and is removed.Assisted-by: Claude Opus 5.5