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

3 次查看(过去 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 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by