Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Feb 13, 2024
1 parent 8adc7f4 commit a5ce95c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test/ParallelIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ TEST_CASE("hdf5_write_test", "[parallel][hdf5]")
std::shared_ptr<double> position_local(new double);
*position_local = position_global[mpi_rank];

e["position"]["x"].resetDataset(
Dataset(determineDatatype(position_local), {mpi_size}));
e["position"]["x"].resetDataset(Dataset(
determineDatatype(position_local),
{mpi_size},
"hdf5.dataset.chunks = [1]"));
e["position"]["x"].storeChunk(position_local, {mpi_rank}, {1});

std::vector<uint64_t> positionOffset_global(mpi_size);
Expand All @@ -328,8 +330,10 @@ TEST_CASE("hdf5_write_test", "[parallel][hdf5]")
std::shared_ptr<uint64_t> positionOffset_local(new uint64_t);
*positionOffset_local = positionOffset_global[mpi_rank];

e["positionOffset"]["x"].resetDataset(
Dataset(determineDatatype(positionOffset_local), {mpi_size}));
e["positionOffset"]["x"].resetDataset(Dataset(
determineDatatype(positionOffset_local),
{mpi_size},
"hdf5.dataset.chunks = [" + std::to_string(mpi_size) + "]"));
e["positionOffset"]["x"].storeChunk(positionOffset_local, {mpi_rank}, {1});

o.flush();
Expand Down Expand Up @@ -836,7 +840,10 @@ void file_based_write_read(std::string const &file_ending)
});

auto dataset = io::Dataset(
io::determineDatatype<precision>(), {global_Nx, global_Nz});
io::determineDatatype<precision>(),
{global_Nx, global_Nz},
"hdf5.dataset.chunks = [" + std::to_string(global_Nx) + ", " +
std::to_string(local_Nz) + "]");
E_x.resetDataset(dataset);

Offset chunk_offset = {0, local_Nz * mpi_rank};
Expand Down

0 comments on commit a5ce95c

Please sign in to comment.