Unverified Commit 1f098e77 authored by Peter Doak's avatar Peter Doak Committed by GitHub
Browse files

Merge pull request #135 from gbalduzz/fix_update_shell

Fix possible division by 0 in CT-AUX updateShell.
parents 040e5e9a 795d4567
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1545,7 +1545,8 @@ bool CtauxWalker<device_t, parameters_type, MOMS_type>::assert_exp_delta_V_value

template <dca::linalg::DeviceType device_t, class parameters_type, class MOMS_type>
void CtauxWalker<device_t, parameters_type, MOMS_type>::updateShell(const int done, const int total) {
  if (concurrency.id() == concurrency.first() && total > 10 && (done % (total / 10)) == 0) {
  const int milestone = std::max(total / 10, 1);
  if (concurrency.id() == concurrency.first() && (done % milestone == 0)) {
    std::cout.unsetf(std::ios_base::floatfield);

    std::cout << "\t\t\t" << std::setw(14)