Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race conditions in froot and Solver::timeExceeded #2587

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Nov 19, 2024

Static variables should have been declared thread-local, but haven't.

  • Fixes race conditions in froot, which could have resulted in incorrect simulation results for models with events/heavisides/piecewise, for multi-threaded simulations.

  • Fixes race conditions for the max-time check, which could have resulted in incorrect termination of simulations in case of multi-threaded simulations in combination with a time limit.

Static variables should have been declared thread-local, but haven't.

* Fixes race conditions in froot, which could have resulted in incorrect simulation results for models with events/heavisides/piecewise, for multi-threaded simulations.

* Fixes race conditions for the max-time check, which could have resulted in incorrect termination of simulations in case of multi-threaded simulations in combination with a time limit.
@dweindl dweindl requested a review from a team as a code owner November 19, 2024 16:01
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.63%. Comparing base (db25bc8) to head (3ddf336).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2587      +/-   ##
===========================================
- Coverage    77.65%   77.63%   -0.02%     
===========================================
  Files          329      329              
  Lines        22054    22055       +1     
  Branches      1456     1456              
===========================================
- Hits         17125    17123       -2     
- Misses        4918     4921       +3     
  Partials        11       11              
Flag Coverage Δ
cpp 73.57% <100.00%> (-0.02%) ⬇️
cpp_python 34.31% <0.00%> (-0.01%) ⬇️
petab 37.25% <0.00%> (-0.01%) ⬇️
python 72.39% <100.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
src/solver.cpp 78.49% <ø> (ø)
src/solver_cvodes.cpp 71.11% <100.00%> (+0.35%) ⬆️

... and 2 files with indirect coverage changes

---- 🚨 Try these New Features:

@dweindl dweindl merged commit 2a25b27 into AMICI-dev:develop Nov 19, 2024
17 of 20 checks passed
@dweindl dweindl deleted the fix_froot_race branch November 19, 2024 21:43
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