Skip to content

Commit

Permalink
HiPACE (legacy) pipeline: no chunking
Browse files Browse the repository at this point in the history
The parallel, independent I/O pattern here is corner-case for what
HDF5 can support, due to non-collective declarations of data sets.
Testing shows that it does not work with chunking.
  • Loading branch information
ax3l committed Jun 23, 2021
1 parent 5610b2d commit f1adbfc
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/ParallelIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,19 @@ hipace_like_write( std::string file_ending )
// the iterations we want to write
std::vector< int > iterations = { 10, 30, 50, 70 };

// Parallel HDF5 + chunking does not work with independent IO pattern
bool const isHDF5 = file_ending == "h5";
std::string options = "{}";
if( isHDF5 )
options = R"(
{
"hdf5": {
"dataset": {
"chunks": "none"
}
}
})";

// MPI communicator meta-data and file name
int i_mpi_rank{ -1 }, i_mpi_size{ -1 };
MPI_Comm_rank( MPI_COMM_WORLD, &i_mpi_rank );
Expand All @@ -785,7 +798,7 @@ hipace_like_write( std::string file_ending )
[](precision d) -> precision { return std::sin( d * 2.0 * 3.1415 / 20. ); });

// open a parallel series
Series series( name, Access::CREATE, MPI_COMM_WORLD );
Series series( name, Access::CREATE, MPI_COMM_WORLD, options );
series.setIterationEncoding( IterationEncoding::groupBased );
series.flush();

Expand Down

0 comments on commit f1adbfc

Please sign in to comment.