Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 13, 2024
1 parent e57c00b commit 011274f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
8 changes: 5 additions & 3 deletions include/openPMD/RecordComponent.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,11 @@ RecordComponent::loadChunk(std::shared_ptr<T> data, Offset o, Extent e)
if (extent.size() != dim || offset.size() != dim)
{
std::ostringstream oss;
oss << "Dimensionality of chunk (" << "offset=" << offset.size()
<< "D, " << "extent=" << extent.size() << "D) "
<< "and record component (" << int(dim) << "D) " << "do not match.";
oss << "Dimensionality of chunk ("
<< "offset=" << offset.size() << "D, "
<< "extent=" << extent.size() << "D) "
<< "and record component (" << int(dim) << "D) "
<< "do not match.";
throw std::runtime_error(oss.str());
}
Extent dse = getExtent();
Expand Down
16 changes: 9 additions & 7 deletions src/RecordComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,17 +499,17 @@ void RecordComponent::verifyChunk(
{
std::ostringstream oss;
oss << "Joined array: Must specify an empty offset (given: "
<< "offset=" << o.size() << "D, " << "extent=" << e.size()
<< "D).";
<< "offset=" << o.size() << "D, "
<< "extent=" << e.size() << "D).";
throw std::runtime_error(oss.str());
}
if (e.size() != dim)
{
std::ostringstream oss;
oss << "Joined array: Dimensionalities of chunk extent and dataset "
"extent must be equivalent (given: "
<< "offset=" << o.size() << "D, " << "extent=" << e.size()
<< "D).";
<< "offset=" << o.size() << "D, "
<< "extent=" << e.size() << "D).";
throw std::runtime_error(oss.str());
}
for (size_t i = 0; i < dim; ++i)
Expand All @@ -529,9 +529,11 @@ void RecordComponent::verifyChunk(
if (e.size() != dim || o.size() != dim)
{
std::ostringstream oss;
oss << "Dimensionality of chunk (" << "offset=" << o.size() << "D, "
<< "extent=" << e.size() << "D) " << "and record component ("
<< int(dim) << "D) " << "do not match.";
oss << "Dimensionality of chunk ("
<< "offset=" << o.size() << "D, "
<< "extent=" << e.size() << "D) "
<< "and record component (" << int(dim) << "D) "
<< "do not match.";
throw std::runtime_error(oss.str());
}
for (uint8_t i = 0; i < dim; ++i)
Expand Down
6 changes: 4 additions & 2 deletions test/ParallelIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ void available_chunks_test(std::string const &file_ending)
"parameters":
{
"NumAggregators":)END"
<< "\"" << std::to_string(mpi_size) << "\"" << R"END(
<< "\"" << std::to_string(mpi_size) << "\""
<< R"END(
}
}
}
Expand Down Expand Up @@ -956,7 +957,8 @@ void hipace_like_write(std::string const &file_ending)
int const step = first_rank_step - my_first_step;

if (verbose)
std::cout << "[" << i_mpi_rank << "] " << "step: " << step
std::cout << "[" << i_mpi_rank << "] "
<< "step: " << step
<< " | first_ranks_step: " << first_rank_step
<< std::endl;
// do we start writing to a new step?
Expand Down

0 comments on commit 011274f

Please sign in to comment.