Unhandled Task Error

Hi,

I am trying to use pmap to speed up my code. When I try to run a sample code with a for loop of just 10 cycles, I faced an unhandled task error. What does it mean?

Personally I think the 10 cycles have finished since I ask code to print the time when a cycle finishes. But the rest of code is just to save the data to a .jld file. Why do I get this error?

Thanks

I think ProcessExitedException is the bit to look for here; that means the worker process exited. Could be it ran out of memory and the OS killed it.

Hi Eric:

It turns out this error is due to one sentence like

@distributed for i = 1:length(pool)
pool[i] = a[i]
end

Here pool is a SharedArray. And a is a normal vector. After I changed it to be

for i = 1:length(pool)
pool[i] = a[i]
end

The problem disappeared. But I don’t know why. It just works.