From 737246706f24f0650f01609e801ea43b2d63a3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Tue, 14 Jan 2025 15:43:36 +0100 Subject: [PATCH] Remove std::cout calls --- src/IO/ADIOS/ADIOS2IOHandler.cpp | 30 ------------------------------ src/Series.cpp | 4 ---- 2 files changed, 34 deletions(-) diff --git a/src/IO/ADIOS/ADIOS2IOHandler.cpp b/src/IO/ADIOS/ADIOS2IOHandler.cpp index f550f98421..5a21b8afcf 100644 --- a/src/IO/ADIOS/ADIOS2IOHandler.cpp +++ b/src/IO/ADIOS/ADIOS2IOHandler.cpp @@ -1427,29 +1427,6 @@ namespace static constexpr char const *errorMsg = "ReadAttributeAllsteps"; }; - template - 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 { @@ -1466,11 +1443,9 @@ namespace } std::vector &put_result_here = std::get>(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(), 0, comm)); - std::cout << "WILL_COMMUNICATE: " << num_items << '\n'; if constexpr ( std::is_same_v || std::is_same_v> || @@ -1505,7 +1480,6 @@ namespace auxiliary::openPMD_MPI_type(), 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; @@ -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) @@ -1558,7 +1530,6 @@ namespace comm)); if (rank != 0) { - std::cout << "RECEIVED: " << vec_as_string(receive) << '\n'; put_result_here = std::move(receive); } } @@ -1571,7 +1542,6 @@ namespace void ADIOS2IOHandlerImpl::readAttributeAllsteps( Writable *writable, Parameter ¶m) { - std::cout << "ADIOS2: ReadAttributeAllSteps" << '\n'; auto file = refreshFileFromParent(writable, /* preferParentFile = */ false); auto pos = setAndGetFilePosition(writable); auto name = nameOfAttribute(writable, param.name); diff --git a/src/Series.cpp b/src/Series.cpp index 9a9d9a2972..c78d7e3c4d 100644 --- a/src/Series.cpp +++ b/src/Series.cpp @@ -3330,10 +3330,6 @@ auto Series::currentSnapshot() -> std::optional> 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()}; }