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