From 1dad5c5fd4c378e8c3aa4ea17640e1c1f4e2b7da Mon Sep 17 00:00:00 2001 From: Thomas Hahn Date: Sun, 29 Sep 2024 18:59:27 -0400 Subject: [PATCH] Use mpi::gather for strings in mc_generic::collect_results --- c++/triqs/mc_tools/mc_generic.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/c++/triqs/mc_tools/mc_generic.cpp b/c++/triqs/mc_tools/mc_generic.cpp index 6af5cf076..888073aff 100644 --- a/c++/triqs/mc_tools/mc_generic.cpp +++ b/c++/triqs/mc_tools/mc_generic.cpp @@ -248,9 +248,8 @@ namespace triqs::mc_tools { info += fmt::format("[Rank {}] Move statistics:\n{}", c.rank(), moves_.get_statistics(fmt::format("[Rank {}] ", c.rank()))); // gather all output string on rank 0 to print in order - auto all_infos_vec = mpi::gather(std::vector{info.begin(), info.end()}, c); + auto all_infos = mpi::gather(info, c); if (c.rank() == 0) { - std::string all_infos{all_infos_vec.begin(), all_infos_vec.end()}; report_(3) << all_infos; std::string more_info{"\n"}; more_info += fmt::format("Total number of measures: {}\n", tot_nmeasures);