My code is below.... how is the sequence of numbers chosen for what indexes parfor decides to tackle next?
parpool;
parfor i = 1:10; disp(i); end
ans = 1
5
7
3
8
4
2
6
9
10

 채택된 답변

Walter Roberson
Walter Roberson 2014년 2월 11일

1 개 추천

The sequence is not documented and is subject to change even on the same run. If your body code needs to know the order the bodies are executed in, then you are not using parfor correctly (and your task might be better suited to spmd)

추가 답변 (0개)

카테고리

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

질문:

2014년 2월 11일

답변:

2014년 2월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by