How to use sundials solvers in threads parpool?

2 ビュー (過去 30 日間)
Felix
Felix 2025 年 4 月 28 日
コメント済み: Torsten 2025 年 4 月 28 日
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 Center および File ExchangeScan Parameter Ranges についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by