Skip to content

Commit

Permalink
Remove std::cout calls
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Jan 14, 2025
1 parent 4c54840 commit 7372467
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
30 changes: 0 additions & 30 deletions src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1427,29 +1427,6 @@ namespace
static constexpr char const *errorMsg = "ReadAttributeAllsteps";
};

template <typename Vec>
auto vec_as_string(Vec const &vec) -> std::string
{
if (vec.empty())
{
return "[]";
}
else
{
std::stringstream res;
res << '[';
auto it = vec.begin();
res << *it++;
auto end = vec.end();
for (; it != end; ++it)
{
res << ", " << *it;
}
res << ']';
return res.str();
}
}

#if openPMD_HAVE_MPI
struct DistributeToAllRanks
{
Expand All @@ -1466,11 +1443,9 @@ namespace
}
std::vector<T> &put_result_here =
std::get<std::vector<T>>(put_result_here_in);
std::cout << "INIT VECTOR SIZE: " << put_result_here.size() << '\n';
size_t num_items = put_result_here.size();
MPI_CHECK(MPI_Bcast(
&num_items, 1, auxiliary::openPMD_MPI_type<size_t>(), 0, comm));
std::cout << "WILL_COMMUNICATE: " << num_items << '\n';
if constexpr (
std::is_same_v<T, std::string> ||
std::is_same_v<T, std::vector<std::string>> ||
Expand Down Expand Up @@ -1505,7 +1480,6 @@ namespace
auxiliary::openPMD_MPI_type<size_t>(),
0,
comm));
std::cout << "SIZES: " << vec_as_string(sizes) << '\n';
size_t total_flat_size =
std::accumulate(sizes.begin(), sizes.end(), size_t(0));
using flat_type = typename T::value_type;
Expand All @@ -1530,8 +1504,6 @@ namespace
comm));
if (rank != 0)
{
std::cout << "RECEIVED: " << vec_as_string(flat_vector)
<< '\n';
size_t offset = 0;
put_result_here.reserve(num_items);
for (size_t current_extent : sizes)
Expand All @@ -1558,7 +1530,6 @@ namespace
comm));
if (rank != 0)
{
std::cout << "RECEIVED: " << vec_as_string(receive) << '\n';
put_result_here = std::move(receive);
}
}
Expand All @@ -1571,7 +1542,6 @@ namespace
void ADIOS2IOHandlerImpl::readAttributeAllsteps(
Writable *writable, Parameter<Operation::READ_ATT_ALLSTEPS> &param)
{
std::cout << "ADIOS2: ReadAttributeAllSteps" << '\n';
auto file = refreshFileFromParent(writable, /* preferParentFile = */ false);
auto pos = setAndGetFilePosition(writable);
auto name = nameOfAttribute(writable, param.name);
Expand Down
4 changes: 0 additions & 4 deletions src/Series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3330,10 +3330,6 @@ auto Series::currentSnapshot() -> std::optional<std::vector<IterationIndex_t>>
series.m_snapshotToStep[iteration] = step;
}
}
for (auto const &[iteration, step] : series.m_snapshotToStep)
{
std::cout << '\t' << iteration << "\t-> " << step << '\n';
}
std::cout.flush();
return vec_t{res.begin(), res.end()};
}
Expand Down

0 comments on commit 7372467

Please sign in to comment.