In this example each process writes a "chunk" of data to a dataset. The C and Fortran 90 examples result in the same data layout in the file.

 

Figure a   C ExampleFigure b   FORTRAN 90 Example

For this example, four processes are used, and a 4 x 2 chunk is written to the dataset by each process.

To do this, you would:

For Process 2 the offset and block parameters would look like:

 

Figure a   C ExampleFigure b   FORTRAN 90 Example

Below is an example program for writing hyperslabs by chunk in Parallel HDF5:

C     F90

The following is the output from h5dump for the HDF5 file created with this example:

HDF5 "SDS_chnk.h5" {
GROUP "/" {
   DATASET "IntArray" {
      DATATYPE  H5T_STD_I32BE  
      DATASPACE  SIMPLE { ( 8, 4 ) / ( 8, 4 ) } 
      DATA {
         1, 1, 2, 2,
         1, 1, 2, 2,
         1, 1, 2, 2,
         1, 1, 2, 2,
         3, 3, 4, 4,
         3, 3, 4, 4,
         3, 3, 4, 4,
         3, 3, 4, 4
      } 
   } 
} 
} 

The h5dump utility is a C program, and the output is in C order.