Releases: jrenaud90/CyRK
Releases · jrenaud90/CyRK
CyRK v0.11.2
Changes
New:
- Using extra output (via
num_extra
) withcysolve_ivp
andpysolve_ivp
now works whendense_output
is set to true. CySolverSolution will now make additional calls to the differential equation to determine correct values for extra outputs which are provided alongside the interpolated y values.- Added relevant tests.
Other:
- Refactored some misspellings in the cysolver c++ backend.
Fix:
- Fixed missing
np.import_array
in cysolver backend.
GitHub Tracked Changes
- Extra ouput interpolation by @jrenaud90 in #69
- v0.11.2 by @jrenaud90 in #70
Full Changelog: v0.11.1...v0.11.2
CyRK v0.11.1
Changes
Fixes:
- MacOS was not correctly installing openmp version of the cython object files. Fixed this but...
Issues:
- Cython
prange
was failing (for the array interps) only on MacOS on some versions of Python. Couldn't figure it out so removing prange for now.
GitHub Tracked Changes
Full Changelog: v0.11.0...v0.11.1
CyRK v0.11.0
Changes
New:
WrapCySolverResult
result class now provides user access to attributenum_y
.
Removed:
- Removed previous
cyrk_ode
and older version of theCySolver
class-based solver.- The functionality of
cyrk_ode
is now handled by the new (as of v0.10.0)pysolve_ivp
function. - The functionality of
CySolver
is partly handled by the new (as of v0.10.0)cysolve_ivp
function.- Note that the new cysolve_ivp is a functional approach. A class based approach like the older CySolver class supported is no longer available but could be easy to implement. If there is interest please create a Github issue for it.
- The functionality of
Refactors:
- Refactored the new cysolver and pysolver files to remove "New". This will break imports based on previous versions.
- Broke up cysolver and pysolver into different files to isolate each other's code.
Other:
- Changed the default ordering for diffeq function inputs to follow the scheme dydt(dy, t, y); previously it was dydt(t, y, dy). This affects the
cy2nb
andnb2cy
helper functions. - Updated performance module to use new methods over old.
Demos:
- Fixed typo in the type of the mixed-type args container.
- Updated to work with new refactoring.
Tests:
- Updated tests to use pysolver where cyrk_ode was used.
- Changed tolerances and other inputs to try to make some tests faster.
Dependencies:
- Tested that CyRK works with numpy v2.X; but a lot of other packages don't right now. So setting it as upper limit.
- Tested that CyRK can not work with Python 3.13 yet due to numba dependence. See issue
GitHub Tracked Changes
- Merge main back into branch by @jrenaud90 in #65
- ver0.11.0 by @jrenaud90 in #68
Full Changelog: v0.10.2...v0.11.0
CyRK v0.10.2
Changes
New:
- Added new
interpolate_from_solution_list
function to help interpolate between multiple solutions across a domain.
Bugs:
- Fixed issue where
CyRK.test_cysolver()
used incorrect kind and order of arguments. - Fixed MacOS compile issues when using OpenMP (for both x86-64 and arm64 macos).
- Fixed issue where MacOS was failing certain tests.
- Building new wheels to fix Github issue #62.
Tests:
- Added tests to check all built in testers.
GitHub Tracked Changes
- Fixes by @jrenaud90 in #63
- Version 0.10.2 by @jrenaud90 in #64
Full Changelog: v0.10.1...v0.10.2
CyRK v0.10.1
Changes
C++ Back End:
- Changed optional args from double pointer to void pointers to allow for arbitrary objects to be passed in.
- Added description of this feature to "Documentation/Advanced CySolver.md" documentation and "Demos/Advanced CySolver Examples.ipynb" jupyter notebook.
- Allow users to specify a "Pre-Eval" function that can be passed to the differential equation. This function should take in time, y, and args and update an output pointer which can then be used by the diffeq to solve for dydt.
cysolve_ivp`:
- Change call signature to accept new
pre_eval_func
function. - Added more differential equations to tests.
- Added tests to check new void arg feature.
- Added tests to check new pre-eval function feature.
MacOS:
- Going back to GCC for C and C++ compile instead of clang (ran into inconsistent test failures with clang).
GitHub Tracked Changes
- Ver0.9.1 by @jrenaud90 in #59
- Function as arg by @jrenaud90 in #60
Full Changelog: v0.10.0...v0.10.1
CyRK v0.10.0
Changes
C++ Backend:
- This version of CyRK introduces a major rework of the backend integrator which is now written in pure C++.
- CySolver is now a Cython wrapper to this C++ integrator which can be accessed via Python.
- Access this function by using
from CyRK cimport cysolve_ivp
(this must be done within Cython). - The plan is to replace CyRK's older
CySolver
with this function.
- Access this function by using
- There is now a new PySolver version of this wrapper that allows a user to pass a python function to the C++ backend.
- Access this function by using
from CyRK import pysolve_ivp
. - This is designed as a drop-in-place replacement for SciPy's
solve_ivp
. - The plan is to replace CyRK's older
cyrk_ode
with this function.
- Access this function by using
Implemented Dense Output and Improved t_eval
for new C++ backend:
- Both
pysolve_ivp
andcysolve_ivp
now utilize a much more accurate interpolator whent_eval
is provided. - Users can now also request the interpolators be saved with the data, enabling Dense Output functional calls.
- This closes GitHub Issue #45.
- Note that these improvement were not ported to the numba-based
nbsolve_ivp
, or the cython-basedcyrk_ode
&CySolver
methods. See below to learn about these methods' deprecation.
- Note that these improvement were not ported to the numba-based
- Added tests, documentation, and demos describing these features.
Deprecating Older CyRK Methods:
- The new C++ backend is more flexible, faster, and allows for easy additions of new features. It is common across the cython-only, python, and njit-safe numba solvers. Therefore making a change to it propagates to all three solvers - allowing for easier maintenance and new features. For these reasons, the older
cyrk_ode
,CySolver
, andnbrk_ode
are now marked as deprecated. No new features will be implemented for those functions and they will be removed in the next major release of CyRK. - Deprecated
cyrk_ode
- Deprecated
CySolver
- Warnings will be issued if these functions are used in this release. To suppress these warnings set
raise_warnings
to False in the respective function calls.
CySolver:
- Changed error message to use a stack-allocated char-array and associated pointer.
- Added new argument to constructor
raise_warnings
(default: True) to allow users to suppress warnings.
cyrk_ode:
- Added new argument to constructor
raise_warnings
(default: True) to allow users to suppress warnings.
WrapCySolverResult:
cysolve_ivp
andpysolve_ivp
now return a class structure that stores the result of the integration along with some meta data. The accessible attributes are:cysolve_ivp
sCySolverResult
:- success (bool): Flag if the integration was successful.
- message (str): Message to give a hint on what happened during integration.
- error_code (int): Additional error/status code that hints on what happened during integration.
- size (int): Length of time domain.
- y (float[:, :]): 2D Float Array of y solutions (and any extra output).
- t (float[:]): 1D Float Array of time domain at which y is defined.
numba based nbsolve_ivp
:
- The older
nbrk_ode
has been refactored tonbsolve_ivp
to match the signature of the new cython-based functions (and scipy's solve_ivp). - The output of
nbsolve_ivp
is now a named tuple that functions similar to theWrapCySolverResult
Memory Management:
- Changed exit code when memory can not be allocated.
- Changed some heap allocated arrays in
CySolver
to be stack allocated- This change limits the total number of y-dependent variables and extra output that is tracked to 50. This size is
easy to change. If your use case requires a larger size then open an issue and an alternative can be discussed.
- This change limits the total number of y-dependent variables and extra output that is tracked to 50. This size is
- Converted the underlying storage arrays for
CySolver
to LinkedLists arrays.
Bug Fixes:
- Fixed issue where the Cython-based solvers might use the incorrect memory freeing function.
Other Changes:
- Moved from GCC to Clang on MacOS builds. There was a new problem that appeared with GCC's linker and could not find a working solution. The original move away from clang was done to support openMP multiprocessing. CyRK does not currently use that so the switch back should be okay.
Known Issues:
- There is an occasional bug with backwards integration on pysolve_ivp and cysolve_ivp. See Github Issue #56.
GitHub Tracked Changes
- Linked-list-test by @jrenaud90 in #54
- Implement-cpp-function by @jrenaud90 in #55
- Dense outputs by @jrenaud90 in #57
- Version 0.10.0 by @jrenaud90 in #58
Full Changelog: v0.9.0...v0.10.0
v0.9.0
Changes
Major Changes:
- Shifted from using the Python-based
PyMem_Alloc
,PyMem_Free
to c-basedmalloc
,free
. - CySolver
_solve
method is now gil-free.- This has led to a 35%--230% speed boost at low values of steps (faster start up).
Other Changes:
- CI will now build x64-86 and arm64 wheels for MacOS (change suggested by @dihm in #49).
- Did have to use this
nomkl
workaround which may cause problems. TBD.
- Did have to use this
GitHub Tracked Changes
- Making-parallel-friendly by @jrenaud90 in #50
- Ver0.9.0 by @jrenaud90 in #51
- Main by @jrenaud90 in #52
- Added free_mem function to utils by @jrenaud90 in #53
Full Changelog: v0.8.8...v0.9.0
CyRK v0.8.8
Changes
New Features:
- Added
utils.free_mem
function to free memory so that future changes to the memory allocation system will call the proper free function that works with theutils.allocs
.
Changes:
- Changed all instances of
PyMem_Free
to newfree_mem
from the utils.
GitHub Tracked Changes
- Changed memory free functionality by @jrenaud90 in #48
Full Changelog: v0.8.7...v0.8.8
CyRK v0.8.7
v0.8.6
Changes
Major Changes:
- Added support for Python 3.12.
- Converted
CySolver
'srk_step
method into a pure-c implementation to allow for further optimizations. - Changed all files to compile with c rather than c++.
- Had to change cpp_bools to bints to make this change.
Bug Fixes:
- Fixed issue where CyRK was not installing on MacOS due to issue with LLVM and OpenMP.
- Have opted to go to gcc for macOS install due to issues with OpenMP and clang.
- Fixed incorrect type for rk method in CySolver (should eliminate some compile warnings).
- Fixed issue in benchmark where incorrect results were being displayed for CySolver.
GitHub Tracked Changes
- Testing-python-versions by @jrenaud90 in #46
- Version 0.8.6 by @jrenaud90 in #47
Full Changelog: v0.8.5...v0.8.6