Question about ph5example.c

In the examples directory, ph5example.c shows how to use MPIIO to read/write datasets in parallel.
The function phdf5writeAll() writes 2 datasets collectively, where the first dataset is written using collective I/O and the second dataset is written using the independent mode.

On line 643:
  ret=H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);

the transfer properties for the second dataset are set. Should the last argument be H5FD_MPIO_INDEPENDENT instead of H5FD_MPIO_COLLECTIVE, since this dataset is intended to be written using the independent mode? Please correct me if I am wrong. If the example is correct, how does every process write independently?