Message Passing Optimization
Nearest Neighbor Example 2
1) Master reads and scatters M/N coordinates to N processors.
2) Each processor receives its own subset and makes a replica.
3) Each processor calculates its subset of M/N coordinates versus the replica.
4) Each processor sends to the next processor its replica of M/N coordinates.
5) Each processor receives the replica. Goto 3) N-1 times.
6) Each processor sends its info back to the Master