How to save computations of each "for" loop iteration in "SPMD"?

8 ビュー (過去 30 日間)
Bill Masters
Bill Masters 2020 年 5 月 19 日
コメント済み: Science Machine 2022 年 10 月 6 日
Hello,
I have a "for" loop in SPMD to implement parallel computing through some workers. the computation of each worker in each iteration, must be saved to be used in the next iteration. I have used cell arrays to determine the variables and other approachs with no success. there is a function to be calculated in each iteration with respect to the above variable and when the variable is not updated in each iteration, the answer comes up with the same value for all the iterations.
the overall structure of my script:
spmd
for i=1:maxiter
x %variable calculated is each iteration
y=x(i-1)+... %the amount of x variable in the last iteration is needed
end
end
  1 件のコメント
Science Machine
Science Machine 2022 年 10 月 6 日
I would have also liked to know! It seems that for loops within spmd loops are quite slow due to JIT (just in time)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel Computing Fundamentals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by