@@ -78,7 +78,7 @@ namespace triqs::mc_tools {
7878    for  (; !stop_flag; ++cycle_counter) {
7979      try  {
8080        //  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 ) {
8282          if  (triqs::signal_handler::received ()) throw  triqs::signal_handler::exception{};
8383          //  Metropolis step
8484          metropolis_step ();
@@ -92,7 +92,7 @@ namespace triqs::mc_tools {
9292      } catch  (std::exception const  &err) {
9393        //  log the exception and node number, either abort or report to other nodes
9494        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 ) {
9696          exception_monitor->report_local_event ();
9797          break ;
9898        } else  {
@@ -101,7 +101,7 @@ namespace triqs::mc_tools {
101101      }
102102
103103      //  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 ;
105105      double  runtime   = run_timer_;
106106
107107      //  is it time to print simulation info
@@ -247,7 +247,7 @@ namespace triqs::mc_tools {
247247    info += fmt::format (" [Rank {}] Measurement durations:\n {}"  , c.rank (), measures_.get_timings (fmt::format (" [Rank {}]   "  , c.rank ())));
248248    info += fmt::format (" [Rank {}] Move statistics:\n {}"  , c.rank (), moves_.get_statistics (fmt::format (" [Rank {}]   "  , c.rank ())));
249249
250-     //  gather all output string  on rank 0 to print in order
250+     //  gather all output strings  on rank 0 to print in order
251251    auto  all_infos = mpi::gather (info, c);
252252    if  (c.rank () == 0 ) {
253253      report_ (3 ) << all_infos;
@@ -262,7 +262,7 @@ namespace triqs::mc_tools {
262262    //  current simulation parameters
263263    auto  const  rank           = params.comm .rank ();
264264    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;
266266
267267    //  do the printing
268268    if  (percentage_done_ < 0 ) {
@@ -288,7 +288,7 @@ namespace triqs::mc_tools {
288288    params.after_cycle_duty ();
289289    if  (params.enable_calibration ) moves_.calibrate (params.comm );
290290    if  (params.enable_measures ) {
291-       nmeasures_done_++ ;
291+       ++nmeasures_done_ ;
292292      for  (auto  &m : measures_aux_) m ();
293293      measures_.accumulate (sign_);
294294    }
0 commit comments