Hi, I have been using matlab for a while with embarrassingly parallel codes. Now I have a problem to be solved N times independently. The issue is that each execution may require very different CPU times, therefore parfor is not efficient.
For instance, say that I have 9 problems with 8 cores. Problem 1 and 2 take 2 hours each. The others take 1 second. If I use parfor and problems 1 and 2 end up to core number 1, the entire execution will take 4 hours.
I would like to have something that assigns a new problem to a core as soon as it finishes the previous one. In this case, the previous example would take only 2 hours and 1 second.
I studied a little bit, but it seems that parfor cannot do what I want, and neither spmd+while. Could anybody give me a hint to start with?
Last note: there is no way to know the CPU time of each problem before the execution.
Thank you, Paolo