Parallel computing (parfor) or various GUI?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi Everybody,
I can hav acces to more than one Matlab license so that I can run various GUI at the same time in my computer. The thing is I want to use all the power of my computer to speed up my simulations which are independent, say function f1,f2 and f3.
What would be the fastest way to launch all three simulations at the same time and get the best speed?
1st Way
parfor r=1:3
function1
function2
function3
end
2nd Way
Opening three different gui and launching in each one a different function.
I have donde some tests with "easy" functions and it seems that opening various gui slows the processs. But since using the parallelization toolbox would require changes in the programming (probably) I would like to ask you if you have any experience on this subject that you could share.
Thank you very much!
댓글 수: 0
채택된 답변
Edric Ellis
2013년 4월 8일
Parallel Computing Toolbox workers aren't able to display graphics, so you cannot use them to display GUIs directly from the workers. However, you can use the workers to perform computations. How best to make things work depends on how long your different simulations take. Using PARFOR may well not turn out to be the best option, because the loop only completes when the entire body is complete. Even if one of your simulations takes less time than the others, you wont be able to see the results until all are complete.
댓글 수: 0
추가 답변 (1개)
esbolico
2013년 4월 8일
댓글 수: 2
Edric Ellis
2013년 4월 8일
Hm, if I've understood correctly, running two simulations at the same time causes both of them to slow down. This implies that the simulations are competing for resources on your computer - this could be CPU time, or it could be memory bandwidth (or something else). Have you checked using task manager to see how much CPU each simulation uses? Have you used the MATLAB profiler to see where time is being spent?
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!