Skip to content

Add a new restart format with a single file for all states

Sebastian Ohlmann requested to merge parallel_restart into develop

Description

Add a new restart format that uses a single file to write all states into. This relieves problems when running simulations with many states or k points (i.e. > 10^5): before, one file per state was written or read which can lead to problems especially on parallel file systems in large scale runs. Now, all states are written into one file using MPI IO. If MPI is not available, the old format is used. Also, reading states in serial from the new file format is supported.

In order to make this work efficiently, one big array is allocated to store all wavefunctions. The batches with the states are then initialized with preallocated memory in packed state, making packing on the CPU unnecessary. Writing and reading all states in parallel is then done using MPI IO by defining types that respect the layout of the states in memory and in the file and by using one collective MPI_File_write_all/MPI_File_read_all command.

News snippet

Add new restart format

Checklist

  • I have checked that my code follows the Octopus coding standards
  • I have added tests for all the new features added in this request.

Merge request reports