How to reduce the Communication time in parallel computing with compare to the calculation time

조회 수: 1 (최근 30일)
I have a parallel code inside the for loop as given below
My calculation in the function script 'myfun' (which is not given here)
When each time for loop excutes...
createTask excutes the 'myfun' script for 100 times
and it destroy the job at end of each for loop
My question is communication time is more than calculation time in parallel computing.
Will there is a way so that i wont use destroy(job)script line inside the for loop.
Will this work or any other possible way?
for i=1:100
sched=findResources('scheduler','type','config1')
job=createJob(Sched)
createTask(job,@myfun,3,{[a,b,c,d]})
submit(job)
waitForState(job)
getAllOutputArugments(job)
destroy(job)
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by