Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#1613)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-clang-format: v18.1.3 → v18.1.5](pre-commit/mirrors-clang-format@v18.1.3...v18.1.5)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed May 31, 2024
1 parent 4d77fad commit 2c1dbc9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ repos:
# clang-format v13
# to run manually, use .github/workflows/clang-format/clang-format.sh
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.3
rev: v18.1.5
hooks:
- id: clang-format
# By default, the clang-format hook configures:
Expand Down
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 @@ -415,7 +415,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 @@ -1040,7 +1041,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 2c1dbc9

Please sign in to comment.