Best parallel computing option for heavily serialized code

조회 수: 4 (최근 30일)
Shivangi Giri
Shivangi Giri 2022년 12월 24일
댓글: Shivangi Giri 2022년 12월 25일
Hello,
I have a MATLAB code that I want to speed up. However due to its serial (dependent on previous values) nature I cannot use parfor. Is there any other parallel computing option that might work for me. I have tried to implement communication jobs, however that does not seem to work.
Regards,
Shivangi

답변 (2개)

Raymond Norris
Raymond Norris 2022년 12월 25일
The very nature of a cascading algorithm (i.e., dependent on previous values) makes it impossible to parallellize. However, perhaps you have the need to run multiples of your code. That could be parallized. That is, with Parallel Computing Toolbox (and perhaps MATLAB Parallel Server) you could run the entire code across different data sets, all at the same time.
  댓글 수: 1
Shivangi Giri
Shivangi Giri 2022년 12월 25일
Thank you for your reply Raymond. So the format of my code if
for loop %runs more than 300 times
call to func1;
some code
call to func2;
some code
end
So I need the for loop to execute in parallel. I cannot use parfor as each iteration is dependent on the previous one. Can you please give a little more insight into how can I parallelize the for loop and mainitain continuity in the execution. I do not have different datasets but few data files that I load before the for loop.
Please note I am at a beginner level with Matlab parallel computing toolbox. Also I am thinking if tranferring data to GPU can execute the code faster. Please help if you are familiar with GPU computing too.
Regards,
Shivangi

댓글을 달려면 로그인하십시오.


Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022년 12월 24일
  댓글 수: 1
Shivangi Giri
Shivangi Giri 2022년 12월 25일
Hello Sulaymon,
Thank you for your reply. spmd does not work with dot notations. That is the error I get when implementing spmd. So I guess this might not work for me. In case you have any other suggestions, please recommend.
Regards,
Shivangi

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by