15.9.2. Subarray Filetype Constructor

PreviousUpNext
Up: Examples Next: Tool Support Previous: Double Buffering with Split Collective I/O

Image file


Figure 38: Example array file layout

Image file


Figure 39: Example local array filetype for process 1


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):

Image file

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).

Image file

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.


PreviousUpNext
Up: Examples Next: Tool Support Previous: Double Buffering with Split Collective I/O


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023