@@ -78,7 +78,7 @@ namespace triqs::mc_tools {
78
78
for (; !stop_flag; ++cycle_counter) {
79
79
try {
80
80
// do cycle_length MC steps / cycle
81
- for (std::int64_t i = 0 ; i < params.cycle_length ; i++ ) {
81
+ for (std::int64_t i = 0 ; i < params.cycle_length ; ++i ) {
82
82
if (triqs::signal_handler::received ()) throw triqs::signal_handler::exception{};
83
83
// Metropolis step
84
84
metropolis_step ();
@@ -92,7 +92,7 @@ namespace triqs::mc_tools {
92
92
} catch (std::exception const &err) {
93
93
// log the exception and node number, either abort or report to other nodes
94
94
std::cerr << fmt::format (" [Rank {}] Error int mc_generic::run: Exception occured:\n {}\n " , rank, err.what ());
95
- if (params. propagate_exception ) {
95
+ if (exception_monitor ) {
96
96
exception_monitor->report_local_event ();
97
97
break ;
98
98
} else {
@@ -101,7 +101,7 @@ namespace triqs::mc_tools {
101
101
}
102
102
103
103
// recompute fraction done and runtime so far
104
- percentage_done_ = cycle_counter * 100.0 / params.ncycles ;
104
+ percentage_done_ = static_cast < double >( cycle_counter) * 100.0 / params.ncycles ;
105
105
double runtime = run_timer_;
106
106
107
107
// is it time to print simulation info
@@ -247,7 +247,7 @@ namespace triqs::mc_tools {
247
247
info += fmt::format (" [Rank {}] Measurement durations:\n {}" , c.rank (), measures_.get_timings (fmt::format (" [Rank {}] " , c.rank ())));
248
248
info += fmt::format (" [Rank {}] Move statistics:\n {}" , c.rank (), moves_.get_statistics (fmt::format (" [Rank {}] " , c.rank ())));
249
249
250
- // gather all output string on rank 0 to print in order
250
+ // gather all output strings on rank 0 to print in order
251
251
auto all_infos = mpi::gather (info, c);
252
252
if (c.rank () == 0 ) {
253
253
report_ (3 ) << all_infos;
@@ -262,7 +262,7 @@ namespace triqs::mc_tools {
262
262
// current simulation parameters
263
263
auto const rank = params.comm .rank ();
264
264
double const runtime = run_timer_;
265
- auto const cycles_per_sec = cycle_counter / runtime;
265
+ auto const cycles_per_sec = static_cast < double >( cycle_counter) / runtime;
266
266
267
267
// do the printing
268
268
if (percentage_done_ < 0 ) {
@@ -288,7 +288,7 @@ namespace triqs::mc_tools {
288
288
params.after_cycle_duty ();
289
289
if (params.enable_calibration ) moves_.calibrate (params.comm );
290
290
if (params.enable_measures ) {
291
- nmeasures_done_++ ;
291
+ ++nmeasures_done_ ;
292
292
for (auto &m : measures_aux_) m ();
293
293
measures_.accumulate (sign_);
294
294
}
0 commit comments