benchmarks oddities with par pool

1 view (last 30 days)
David Short
David Short on 12 Feb 2015
Edited: David Short on 19 Feb 2015
I understand with multithreading and an interpretive environment that I can't take benchmarks generated in matlab as rock solid truth, but I'm getting some numbers that I'm having trouble interpreting. This is matlab 2014A.
Roughly
clear all;
tic;
do stuff
toc;
where rev 2 uses no parfor's or gpu's and rev 5 has been modified to use a few parfor's.
>> recon_rev_2
Elapsed time is 223.452906 seconds.
>> recon_rev_5
Starting parallel pool (parpool) using the 'local' profile ... connected to 4 workers.
Elapsed time is 86.481012 seconds.
>> recon_rev_2
Elapsed time is 211.651351 seconds.
IdleTimeout has been reached.
Parallel pool using the 'local' profile is shutting down.
>> recon_rev_2
Elapsed time is 180.774399 seconds.
So..rev_2 takes 223 seconds to run. The par pool is started and the parfor version runs. After the parfor version runs rev2 takes 211 seconds to run with the par pool active. The par pool shuts down and rev2 takes 180 seconds to run.
Nothing else is going on with the machine.
ideas?

Answers (1)

David Short
David Short on 19 Feb 2015
Edited: David Short on 19 Feb 2015
And the answer appears to be JIT compiling. After multiple runs in multiple conditions, the timers settle down and return similar results.

Categories

Find more on Parallel for-Loops (parfor) 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!