Processor usage decreases unexpectedly for ode45 in MATLAB R2013a

1 view (last 30 days)
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 Comment
John D'Errico
John D'Errico on 4 Jul 2014
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.

Sign in to comment.

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!