Blog Archive
-
▼
2013
(154)
-
▼
April
(34)
- NCE 4 Best sentences for reciting
- Inaugural Address (March 4, 1905) Theodore Roosevelt
- Doddington's Zoo: Sheep, Goat, Lamb, Wolf
- quick tutorial on matlab parfor
- results for a full DBN experiment
- recipe for NIST SRE 2014
- results for a small DBN experiment
- [SOLVED] Can't install nVidia drivers on Ubuntu 10.10
- Restricted Boltzmann Machines (RBM) — DeepLearning...
- We owe you so much more than just honoring you on ...
- Noah's Ark Lab | From Big Data to Deep Knowledge
- Internship at Noah’s Ark Lab (2013) | Noah's Ark Lab
- How to install NumPy on Python in Ubuntu 12.04
- Generative Classifier vs. Discriminative Classifier
- What should you do when you just finish a fresh in...
- Stochastic Optimization - Cross Entropy Visualization
- seven habits reading note
- Most funny GIF
- How to change google site template
- How to create a google web site in 1 minute.
- excel表格中斜线怎么画斜线 How to draw diagonal line in EXCEL
- In Google Drive, how can you link directly to “Dow...
- DNN resources and link and demo
- about citation
- Rover toolkit
- 立遗嘱记 以及 IEEE Term Life Insurance
- 如何提高论文引用率
- 千人计划为什么没有吸引更多的海外学者?
- How to Increase Your Papers Citation and H Index
- 如何发表高水平文章
- 各国际会议的影响因子
- 任俠文化
- NIST SRE 1997-2012 Quick Overview
- Statistical Pattern Recognition Toolbox for Matlab
-
▼
April
(34)
Friday, April 26, 2013
quick tutorial on matlab parfor
Step 0: Please make sure you
Step 1: prepare the parallel environment(suppose you have 8 cores)
matlabpool(8)
Step 2: Just replace all the parallelable "for" keyword into "parfor"
Make sure the jobs are independent each other, for example:
Ste 3: Run you script
tic
parfor i = 1:8
c(:,i) = eig(rand(1000));
end
toc
tic
for i = 1:8
c(:,i) = eig(rand(1000));
end
toc
%% Results:
Elapsed time is 3.718411 seconds.
Elapsed time is 5.671640 seconds
Conclusion:
The second group scripts are significantly slower than 1st group.
Reference:
http://www.mathworks.com/help/distcomp/getting-started-with-parfor.html#brb2x57
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment