Is there an real efficient ODE system solvers?
2 次查看(过去 30 天)
显示 更早的评论
Hello,
my task considered with numeric solution of large ODE systems, i.e. method of lines, where typical ODE system consists of 300 and more equations that tends to be stiff. As far as I know, in Matlab ODE all solvers are not adopted for multicore. But for such ODE numbers they work really slow. What shall I do to increase the speed of my programs while using ODE15S or ODE45?
Kind regards, Vasily.
0 个评论
采纳的回答
Jan
2013-1-7
A stiff system should be solved by ODE15s.
Actually a parallelization should be easy, when the several function evaluations are independent from eachother. But even then Matlab integrators will not be really fast automatically. A comparison with equivalent C-ODE45 have been depressing. But when the system is large (and 300 is at least a little bit large), the overhead of the integrator should be negligible, while the function to be integrated gets more important. Could you post it, such that we can find redundant code or detect problems like discontinuities.
In every case, there is no magic flag, which allows to set a clandestine after burner on fire to accelerate the ODE solvers.
2 个评论
Jan
2013-1-8
If a large scale problem, e.g. with 100'000 variables, use linear algebra methods, the underlying BLAS functions call multiple cores already, such that an additional parallelization is not useful. But for small problems a parallelization should be (better) supported.
更多回答(1 个)
Daniel
2013-1-9
Vasily, the problem is not that the "stiff" solver is performing poorly in comparison with RK-45, it is that your C compiler optimizes the code to run more efficiently on your computer, whereas since Matlab is interpreted (and not compiled), it can receive no such optimizations. Since the dominant cost in using Matlab's ODE solvers comes from evaluations of your f(t,y) function (that likely doesn't use BLAS), there's little you can do to speed up any Matlab version of your code. In short, the problem is not the ODE solver algorithm, the problem is the computing system.
The fastest approach (and a true apples-to-apples comparison of stiff vs nonstiff solvers) would be to call a stiff ODE solver written in C, such CVODE, and compare that against your C implementation of RK-45.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!