pybammsolvers 0.9.1
Patch release of pybammsolvers. The published version comes from version.py (0.9.1); the release workflow's check_version job asserts the tag, version.py, pyproject.toml, and vcpkg.json all agree.
Bug fixes
- Fixed the CMake build under conda (
CONDA_BUILD=1), where SUNDIALS, SuiteSparse, and CasADi are host dependencies rather than vendored: the.idakluroot defaults and the from-source bootstrap are skipped, the system CasADi is used instead of a pip one, and the libstdc++ ABI probe (which has no wheel to inspect and would wrongly force the legacy ABI) is now limited to the PyPI-CasADi path. (#5668) - IDAKLU debug logging and
print_statsoutput are now buffered and emitted once the OpenMP region is over, instead of calling into Python from worker threads that do not hold the GIL. Solving with several input sets again produces one trace and one statistics block per input set. (#5717) - Buffered IDAKLU diagnostics are also flushed when a solve raises, so a failed solve still emits the trace leading up to the failure. (#5717)
- IDAKLU diagnostics are emitted as the solve progresses whenever it runs on the calling thread, which is the one holding the GIL, so a long solve reports progress instead of going quiet until it returns. Only the solves handed to OpenMP worker threads are held back, and they are flushed at the end of the parallel region. (#5717)
Optimizations
- IDAKLU with
output_variablesnow writes sensitivities straight into their final NumPy layout, removing the post-solve transpose pass and the second full-size sensitivity buffer it required. (#5717) - The dense scratch vector used to scatter sparse output sensitivities is now a reused member buffer instead of being allocated per output row on every step. (#5717)
Full changelog: https://github.com/pybamm-team/PyBaMM/blob/main/CHANGELOG.md