Skip to content

Commit 1dad5c5

Browse files
committed
Use mpi::gather for strings in mc_generic::collect_results
1 parent 6e0566a commit 1dad5c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

c++/triqs/mc_tools/mc_generic.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,8 @@ namespace triqs::mc_tools {
248248
info += fmt::format("[Rank {}] Move statistics:\n{}", c.rank(), moves_.get_statistics(fmt::format("[Rank {}] ", c.rank())));
249249

250250
// gather all output string on rank 0 to print in order
251-
auto all_infos_vec = mpi::gather(std::vector<char>{info.begin(), info.end()}, c);
251+
auto all_infos = mpi::gather(info, c);
252252
if (c.rank() == 0) {
253-
std::string all_infos{all_infos_vec.begin(), all_infos_vec.end()};
254253
report_(3) << all_infos;
255254
std::string more_info{"\n"};
256255
more_info += fmt::format("Total number of measures: {}\n", tot_nmeasures);

0 commit comments

Comments
 (0)