Is there an real efficient ODE system solvers?

9 次查看(过去 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.

采纳的回答

Jan
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 个评论
Vasily Kozhevnikov
Yes, I solve my system of 200 ODES with ODE15S in matlab, and it takes much more time to execute than RKF45 solver in dummy C program. So it grieves me so much =) Stiff solver gives no visible advantage in efficiency. As I remember Runge-Kutta methods may be parallelized. I wounder why MATLAB solvers doesn't support parallel RK for large-scale problems.
Jan
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
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.

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by