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 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