Distributed array descriptor
Represents a 2D array distributed by columns across MPI ranks. Each rank owns a contiguous block of columns. Only one data pointer is active at a time, determined by the dtype field.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | active | = | .false. |
Is this array slot in use? |
|
| real(kind=dp), | public, | pointer | :: | data_dp(:) | => | null() | |
| integer(kind=int32), | public, | pointer | :: | data_i32(:) | => | null() | |
| integer(kind=int64), | public, | pointer | :: | data_i64(:) | => | null() | |
| real(kind=sp), | public, | pointer | :: | data_sp(:) | => | null() | |
| integer(kind=int32), | public | :: | dtype | = | 0 |
Data type (DTYPE_DP, DTYPE_SP, etc.) |
|
| integer(kind=int32), | public | :: | handle | = | -1 |
Unique array handle |
|
| integer(kind=int64), | public | :: | local_size | = | 0 |
Size of local data (nrows * my_ncols) |
|
| integer(kind=int32), | public | :: | my_first_col | = | 0 |
First column owned (0-indexed) |
|
| integer(kind=int32), | public | :: | my_ncols | = | 0 |
Number of columns owned |
|
| integer(kind=int32), | public | :: | ncols | = | 0 |
Total number of columns |
|
| integer(kind=int32), | public | :: | nrows | = | 0 |
Total number of rows |
|
| type(win_t), | public | :: | win |
MPI window for RMA access |
type :: darray_t integer(int32) :: handle = -1 !! Unique array handle integer(int32) :: dtype = 0 !! Data type (DTYPE_DP, DTYPE_SP, etc.) integer(int32) :: nrows = 0 !! Total number of rows integer(int32) :: ncols = 0 !! Total number of columns integer(int32) :: my_first_col = 0 !! First column owned (0-indexed) integer(int32) :: my_ncols = 0 !! Number of columns owned integer(int64) :: local_size = 0 !! Size of local data (nrows * my_ncols) ! Data pointers - only one is active based on dtype real(dp), pointer :: data_dp(:) => null() real(sp), pointer :: data_sp(:) => null() integer(int32), pointer :: data_i32(:) => null() integer(int64), pointer :: data_i64(:) => null() type(win_t) :: win !! MPI window for RMA access logical :: active = .false. !! Is this array slot in use? end type darray_t