Example
Assume we are writing out a 100×100 2D array of double
precision floating point numbers that is
distributed among 4 processes such that each process has a block of
25 columns (e.g., process 0 has columns 0--24, process 1 has columns
25--49, etc.; see Figure 38).
To create the filetypes for each process one could
use the following C program
(see Section Subarray Datatype Constructor):
Or, equivalently in Fortran:
Example
Writing out a 100×100 2D array of double
precision floating point numbers that is
distributed among 4 processes such that each process has a block of
25 columns (e.g., process 0 has columns 0--24, process 1 has columns
25--49, etc.; see Figure 38).
The generated filetype will then describe the portion of the file contained within the process's subarray with holes for the space taken by the other processes. Figure 39 shows the filetype created for process 1.