Processor usage decreases unexpectedly for ode45 in MATLAB R2013a

조회 수: 1 (최근 30일)
Luke
Luke 2014년 7월 4일
댓글: John D'Errico 2014년 7월 4일
I have a program were I solve a set of differential equations with different initial conditions, looping over the initial conditions, so I run ode45 inside of a for loop. I've noticed that ode45 seems to have some sort of built in parallelization, as it uses 4 (of 8) available cores on my machine.
However, I've recently had the issue that usually about halfway through the instances in the for loop, ode45 stops using 4 cores and only uses 2. I'm not running anything else on the machine simultaneously, so I'm not sure what could be causing this, and it significantly slows down my calculations.
Does anyone have an idea what could be happening, and how to fix it?
  댓글 수: 1
John D'Errico
John D'Errico 2014년 7월 4일
The multiple cores comes from MATLAB, not explicitly ode45. MATLAB uses multiple cores essentially when it perceives there will be a gain from doing so. (Not an exactly true statement, but you should get the idea.) If other process are happening in the middle, then your CPU may use them instead.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by