Imagine I have the following matrix:
A = rand(6400,6400)
Now imagine I create a distributed array from it: (I have 4 workers)
dist = codistributor1d();dist = codistributor2dbc([2 2],3200);B = codistributed(A,dist)
There are two ways for me to distribute it. Either each worker stores a 3200×3200 matrix or each worker stores a 6400×1600 matrix.
My questions are:
- When should I distribute an array?
- How do I know which function, codistributor1d or codistributor2dbc, I should use whenever I have some array I want to distribute between workers? I know how to work with both type of arrays but I don't know when one is better than the other.
If anyone could help me I'd appreciate.
Best Answer