I am trying to implement an SOR, successive over relaxation, program in Chapel for multi-locale, but with local memory so I want to distribute rows among the locales explicitly. I already have reshaped targetlocales
to 1D, but now I am not sure how I can have control over the rows distribution among the locales.
I am very much used to MPI so I will give an example of what I want to achieve in accordance to MPI. Is there a way I can specify that I want to distribute all the array rows among locales as in #rows / #locales and the remaining rows on the last locales?
Issue I face in chapel at moment is:
- locales = 2 pattern was 5 rows on locale - 1, 5 rows on locale - 2
- locales = 3 pattern was 4 rows on locale - 1, 3 rows on locale - 2, 3 rows on locale - 3
- locales = 4 pattern was 3 rows on locale - 1, 2 rows on locale - 2, 3 rows on locale - 3, 2 rows on locale - 4
- locales = 8 pattern was 2 rows on locale - 1, 1 row on locale - 2, 1 row on locale - 3, 1 row on locale - 4, 2 rows on locale - 5, 1 row on locale - 6, 1 row on locale - 7, 1 row on locale - 8. The pattern changes as the #locales increases.
Since my array size will vary for each experiment, I want to have control over row distribution since its local memory multi-locale implementation. I would have to copy back and receive rows from neighboring locales.