Hello,
When matlab executes my n^2*2^n code it uses only the one core of my cpu (only 25%). I tried pmode start local 4 and run my code but it runs 4 independent times at the same time. How can I use the whole cpu for one execution?
Thank you!!

 채택된 답변

José-Luis
José-Luis 2014년 1월 15일

0 개 추천

Short of modifying the source code, you can't.

추가 답변 (1개)

Edric Ellis
Edric Ellis 2014년 1월 16일

0 개 추천

PMODE executes the same line of code on each worker - you need to make that line of behave differently on each worker by using distributed arrays, or code that depends on LABINDEX.
You might find it simpler to instead open a parallel pool of workers (known as MATLABPOOL in versions older than R2013b), and then use PARFOR.

카테고리

도움말 센터File Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기

태그

질문:

2014년 1월 15일

답변:

2014년 1월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by