-
-
Notifications
You must be signed in to change notification settings - Fork 404
Description
Problem description
While the outofprocess mode introduced in #1868 resolves #1852, it comes at the cost of massive overhead due to repeated allocation/copying of arrays, see #1997 (comment). The migration to the generated CLib in #1997 may resolve crashes reported in #1852 when using LD_PRELOAD.
Behavior
After #1868, the Cantera toolbox defaults to outofprocess regardless of operating system. The MATLAB samples ignite.m, ignite_uv.m, ignite_hp.m and plug_flow_reactor.m have extreme performance penalties as they rely on integration with MATLAB's ode15s solver, and only use Cantera for the evaluation of properties and kinetics. Recent testing in #1974 showed runtimes for plug_flow_reactor.m on Windows of around 30 minutes (!). PS: With some of the problematic examples disabled, Windows runners are significantly slower than macOS and Linux actions.
System information
- Cantera version: 3.2.0b1
- OS: any (but more pronounced on Windows)
- Python/MATLAB/other software versions: MATLAB 2025a
Additional context
- Utilize std::span & migrate to C++20 enhancements#237 will only help marginally with this issue, as CLib only copies arrays used for setup. Most CLib array operations are currently handled by raw pointers.
I opened this issue to document previously reported behavior. Tagging @ssun30 and @rwest.