필터 지우기
필터 지우기

Is there an real efficient ODE system solvers?

조회 수: 3 (최근 30일)
Vasily Kozhevnikov
Vasily Kozhevnikov 2013년 1월 7일
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
Vasily Kozhevnikov 2013년 1월 8일
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