benchmarks oddities with par pool

1 vue (au cours des 30 derniers jours)
David Short
David Short le 12 Fév 2015
Modifié(e) : David Short le 19 Fév 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?

Réponses (1)

David Short
David Short le 19 Fév 2015
Modifié(e) : David Short le 19 Fév 2015
And the answer appears to be JIT compiling. After multiple runs in multiple conditions, the timers settle down and return similar results.

Catégories

En savoir plus sur Parallel for-Loops (parfor) dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by