Data Mapping
nodes directive
The nodes directive declares a named node array.
C
|
Fortran
|
- In ex. 1, the program is executed by four nodes.
- In ex. 2, processing is matched to the number of nodes specified when the program is executed.
- Multidimensional node sets, such as in ex. 3 and 4, can also be declared. The product of the number of nodes for each dimension must be the same as the number of computation nodes employed.
- In ex. 4, when the number of nodes at execution time is specified to be 12, "∗" would be 2. nodes-spec can be "∗" only in the last dimension.
template directive
The template directive declares a template as a virtual index.
C
|
Fortran
|
- As in ex. 2, a two-dimensional (or larger) template can be declared.
distribute directive
The distribute directive specifies distribution of a template.
C
|
Fortran
|
- Possible distribution are "∗", "block", "block(n)", "cyclic", "cyclic(n)", and "gblock(m)".
- "∗" means that this particular dimension is duplicated.
block distribution
C
|
Fortran
|
||||||||||||||||||||
|
|
||||||||||||||||||||
cyclic distribution
C
|
Fortran
|
||||||||||||||||||||
|
|
block-cyclic distribution
C
|
Fortran
|
||||||||||||||||||||
|
|
gblock(m) distribution
C
|
Fortran
|
||||||||||||||||||||
|
|
align directive
The align directive specifies that an array is to be mapped in the same way as a specified template.
A one-dimensional array and a one-dimensional template
C
|
Fortran
|
Each node processes the index of the array a[] below.
|
|
A two-dimensional array and a two-dimensional template
C
|
Fortran
|
Each node processes the indices of array a[][] below.
|
|
C
|
Fortran
|
Each node processes the indices of array a[][] below.
|
|
A two-dimensional array and a one-dimensional template
C
|
Fortran
|
- C : The first dimension of array a[][] is "∗, and so it is not divided, and only the second dimension index is divided among each of nodes and processed.
- Fortran : The second dimension of array a(,) is "∗, and so it is not divided, and only the first dimension index is divided among each of nodes and processed.
A one-dimensional array and a two-dimensional template
C
|
Fortran
|
- C:p[0][0] and p[1][0] have indices from 0 to 4, p[0][1] and p[1][1] have indices from 5 to 9.
- Fortran:p(1,1) and p(1,2) have indices from 1 to 5, p(2,1) and p(2,2) have indices from 6 to 10.