1 | For each i in each processor, set MPGrav(i) =0 |
2 | We will implement a naive "owner's-compute rule" algorithm where MPGrav(i) is calculated in processor that is home to i |
3 | Now loop over over j= 1...N (j ¹ i) |
4 | When j is stored in processor holding i, increment MPGrav(i) by contribution due to j |
5 | When j stored in a different processor, communicate Xuse(j),M(j) and increment MPGrav(i) |