When creating a SharedArray as in
using SharedArrays
using Distributed
addprocs(4)
a = SharedArray{Float64}(40)
the partitioning of entries is made automatically. Does anyone knows if it is possible to set my own partitioning of the data ? Related question: where can I find a full documentation of the package SharedArrays?
Many thanks.
What do you mean by “partitioning” here? The SharedArray is accessible to all processes that it’s mapped on equally, i.e. it is not a chunked array. You can change which workers have the array mapped with the pids kwarg.
If you mean that you want to be able to initialize it differently, you can just do that after you create it.
I suppose it’s not super well documented since it’s a pretty simple mechanism; I found the code pretty enlightening, so maybe you will too. If you find anything that’s not documented that you think is important for using a SharedArray, you’re welcome to open a PR to improve the docs