// method to access the file in a fragment-wise fashion
/* IMPORTANT:
For collective I/O, each process must participate in a read/write call. Therefore, the I/O library matches the function calls of each process (synchronization).
In case that a process's number of valid fragments differs from the other processes, some adaptions need to be made:
1. Instead of checking if the fragment is valid before writing, we write without any conditions. Otherwise we would deadlock (this is quite similar to a conditional MPI_Barrier).
2. In case that we have an "invalid" fragment, we participate in the collective function call but actually write nothing.
// method to access the file in a fragment-wise fashion
/* IMPORTANT:
For collective I/O, each process must participate in a read/write call. Therefore, the I/O library matches the function calls of each process (synchronization).
In case that a process's number of valid fragments differs from the other processes, some adaptions need to be made:
1. Instead of checking if the fragment is valid before writing, we write without any conditions. Otherwise we would deadlock (this is quite similar to a conditional MPI_Barrier).
2. In case that we have an "invalid" fragment, we participate in the collective function call but actually write nothing.