Suppose in Fortran, we have an array
-
u (0 : nxblock+1, 0 : nyblock+1)
-
where we want to send rows and columns of elements from 1 : nxblock and 1 : nyblock
-
in Fortran, arrays are stored column major order (C is row major)
|
Contiguous elements
|
MPI_Type_vector( nyblock, 1, nxblock+2, MPI_REAL, rowtype )
|
defines a row of elements 1:nyblock
|
0 nyblock+1
|
nxblock+1
|