Hi, I have an Array (e.g. allCells = Array(Cell, nCells) ) of types. Now I want each processor to work on a different subset of those elements.
If I do *remotecall_fetch(iProc, myFunction, allCells[idx])*with *function myFunction(cell) doSomethingTo(cell)end* it works as expected, but (of course) all workers use copies of allCells created on proc 1. The overhead for copying the data to the worker is large, resulting in the parallel implementation being slower than the serial one. So the idea is to have the worker manipulate its own version of allCells (and then returning much less data containing only the result of the computation). So I create allCells @everywhere. How do I get to tell myFunction to work on the local copy of allCells[idx]? I can do it by simply not giving it as a argument to myFunction, but then I guess allCells is a global variable on each worker, which hampers performance? As example: *remotecall_fetch(iProc, myFunction, idx)*with *function myFunction(idx) doSomethingTo(allCells[idx])end* I hope the problem is somewhat clear. Attached is a code example that I tried to water down as much as possible. Thanks! Andre
main.jl
Description: Binary data
