Column distribution helpers for distributed arrays
Provides functions to calculate how columns are distributed across MPI ranks and to find owners and local offsets for remote access.
Get local offset in owner’s window for a given (row, col)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | nrows |
Number of rows in array |
||
| integer(kind=int32), | intent(in) | :: | ncols |
Number of rows in array Number of columns in array |
||
| integer(kind=int32), | intent(in) | :: | nranks |
Number of rows in array Number of columns in array Number of MPI ranks |
||
| integer(kind=int32), | intent(in) | :: | row |
Number of rows in array Number of columns in array Number of MPI ranks Row index (0-indexed) |
||
| integer(kind=int32), | intent(in) | :: | col |
Number of rows in array Number of columns in array Number of MPI ranks Row index (0-indexed) Column index (0-indexed) |
Find which rank owns a given column
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | ncols |
Total number of columns |
||
| integer(kind=int32), | intent(in) | :: | nranks |
Total number of columns Number of MPI ranks |
||
| integer(kind=int32), | intent(in) | :: | col |
Total number of columns Number of MPI ranks Column index (0-indexed) |
Calculate column distribution for a rank
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | ncols |
Total number of columns |
||
| integer(kind=int32), | intent(in) | :: | nranks |
Total number of columns Number of MPI ranks |
||
| integer(kind=int32), | intent(in) | :: | rank |
Total number of columns Number of MPI ranks This rank’s number (0-indexed) |
||
| integer(kind=int32), | intent(out) | :: | first_col |
Output: first column owned (0-indexed) |
||
| integer(kind=int32), | intent(out) | :: | my_ncols |