Skip to content

Fix crash for models without state variables#2703

Merged
dweindl merged 1 commit intoAMICI-dev:developfrom
dweindl:fix_dwdx_check
Apr 30, 2025
Merged

Fix crash for models without state variables#2703
dweindl merged 1 commit intoAMICI-dev:developfrom
dweindl:fix_dwdx_check

Conversation

@dweindl
Copy link
Copy Markdown
Member

@dweindl dweindl commented Apr 29, 2025

Previously, nx_solver=0 would have in a crash when calling amici::SUNMatrixWrapper::capacity on SUNMatrixWrapper of 0-sized sparse matrix.

Unrelated: Replace some unnecessary std::vector::at calls.

@dweindl dweindl requested a review from a team as a code owner April 29, 2025 06:21
Previously, `nx_solver=0` would have in a crash when calling `amici::SUNMatrixWrapper::capacity` on `SUNMatrixWrapper` of  0-sized sparse matrix.

Unrelated: Replace some unnecessary `std::vector::at` calls.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.91%. Comparing base (9ea6aef) to head (296c776).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2703   +/-   ##
========================================
  Coverage    77.91%   77.91%           
========================================
  Files          326      326           
  Lines        23004    23004           
  Branches      1479     1479           
========================================
  Hits         17924    17924           
  Misses        5069     5069           
  Partials        11       11           
Flag Coverage Δ
cpp 74.76% <100.00%> (ø)
cpp_python 33.57% <100.00%> (ø)
petab 39.41% <83.33%> (-0.01%) ⬇️
python 72.95% <83.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/model.cpp 85.45% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dweindl dweindl self-assigned this Apr 29, 2025
@dweindl dweindl added this pull request to the merge queue Apr 30, 2025
Merged via the queue into AMICI-dev:develop with commit 0d689bd Apr 30, 2025
20 checks passed
@dweindl dweindl deleted the fix_dwdx_check branch April 30, 2025 07:00
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