How to use sundials solvers in threads parpool?

2 次查看(过去 30 天)
Is there a way to call sundials solvers directly in matlab, without simbiology and ode objects?
I am trying to run simulations in a threads based parallel pool, which apparently rules out the approach of using an ode object, since the function 'solve' seems to be not safe for parallel computing:
When I call solve in a threads based parfor loop, I receive the following error:
Error using matlab.ode.internal.DESolver/solveLoop (line 236)
The specified superclass 'matlab.ode.internal.SimulatorBase' contains a
parse error, cannot be found on MATLAB's search path, or is shadowed by
another file with the same name.
Any ideas?

采纳的回答

Arthur Goldsipe
Arthur Goldsipe 2025-4-28
I'm not aware of any way to do this. The only workaround I can think of is to use a process pool instead of a thread pool.
  4 个评论
Arthur Goldsipe
Arthur Goldsipe 2025-4-28
Ok, I just chatted with a coworker. I don't think we currently have any plans to expose SUNDIALS except via the ODE object. But we are aware of the need to support ODE objects with thread pools. So I would keep an eye on upcoming release notes to see if that support has been added. (And for future readers of this post, I current see that we don't yet have support as of R2024b or the R2025a prerelease. So check back in R2025b.)
If you have a reason for using SUNDIALS separate from the ODE objects, please reach out to me or Tech Support to privde more details, so that we can also consider that in a future release.
Torsten
Torsten 2025-4-28
Thank you very much for the information. I just saw here under MATLAB answers that the solver was asked for several times - that's why I posted the question.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scan Parameter Ranges 的更多信息

产品


版本

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by