Skip to content

Version 1.20260723.2 - #590

Merged
agarny merged 2 commits into
opencor:mainfrom
agarny:cleaning-up
Jul 23, 2026
Merged

Version 1.20260723.2#590
agarny merged 2 commits into
opencor:mainfrom
agarny:cleaning-up

Conversation

@agarny

Copy link
Copy Markdown
Contributor

No description provided.

agarny added 2 commits July 23, 2026 23:23
Effectively revert commit 4da6a24. This wasn't the issue!
CopilotAI review requested due to automatic review settings July 23, 2026 11:30

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a new release version and adds caching for compiled CellmlFileRuntime instances so repeated CellmlFile::runtime() calls can reuse an already-compiled runtime.

Changes:

  • Bump library version to 1.20260723.2.
  • Add CellmlFile destructor to support cache cleanup.
  • Add a global runtime cache in CellmlFile::Impl::runtime() and remove cache entries on destruction.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
VERSION.txtUpdates the project version string.
src/support/cellml/cellmlfile.hDeclares an overridden CellmlFile destructor.
src/support/cellml/cellmlfile.cppAdds a global compiled-runtime cache and erases entries in ~CellmlFile().
Comments suppressed due to low confidence (1)

src/support/cellml/cellmlfile.cpp:133

  • CellmlFile::Impl::runtime() can return an uncached runtime in races: two threads can both miss the initial lookup, both compile, then the second try_emplace fails but the function still returns its locally created runtime (not the one stored in the cache). Also, the cache lookup doesn’t account for whether pNlaSolver is nullptr, even though that affects generated runtime code under EMSCRIPTEN (cellmlfileruntime.cpp:73-113). Consider caching separately based on NLA-solver presence and, after compilation, re-checking/returning the canonical cached instance.
CellmlFileRuntimePtr CellmlFile::Impl::runtime(const CellmlFilePtr &pCellmlFile, const SolverNlaPtr &pNlaSolver)
{
// Check whether we already have a compiled runtime and if so then return it.
{

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadsrc/support/cellml/cellmlfile.cpp
Comment threadsrc/support/cellml/cellmlfile.cpp
@agarny
agarny merged commit 7e53a99 into opencor:mainJul 23, 2026
24 checks passed
@agarny
agarny deleted the cleaning-up branch July 23, 2026 11:48
Sign up for freeto 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

@agarny