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

1 vue (au cours des 30 derniers jours)
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

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by