1 |
Introduce a new array MPGrav_travel(i) which will travel through the array picking up the symmetrically generated terms
|
2 |
First in each processor, initialize both MPGrav(i) and MPGrav_travel(i) to zero
|
3 |
Now we as before have a an outer loop over j which in practice will be blocked into J items for message size issues
-
This time communicate in block Xuse(j) M(j) and MPGrav_travel(j)
|
4 |
Now loop over each i in each processor and have some flag to decide whether or not Fi,j is to be calculated in Home of i or Home of j
|
5 |
if( Fi,j is to be computed in home of i) Then
|
6 |
find Fi,j and use it to increment MPGrav(i) with Fi,j and
|
7 |
Increment MPGrav_travel(j) with Fj,i = - Fi,j
|