Mapping: Cartesian grid directly supported by MPI virtual topologies
-
The system is helping you with the mapping!
|
For generality, write as the 2-D version
-
Create a 1?P (or P?1) grid for 1-D version
-
MPI_PROC_NULL avoids special-case coding
|
Adjust array bounds, iterate over local array
-
For convenience, include shadow region to hold communicated values (not iterated over)
|