Browse Source

Don't crash if we were unable to preprocess _any_ DPFs of a given size

Just skip outputting that data point instead
Ian Goldberg 2 years ago
parent
commit
cb6eafb340
1 changed files with 6 additions and 4 deletions
  1. 6 4
      Docker/parse_logs

+ 6 - 4
Docker/parse_logs

@@ -401,10 +401,12 @@ sub sum_preproc_online {
                     $maxnum = $1 if $1 > $maxnum;
                 }
             }
-            $pkey = $key;
-            $pkey =~ s/\d+$/$maxnum/;
-            my $scale = int(($triednum+$maxnum-1)/$maxnum);
-            $tdict->{$key} = &statscalesum($odict->{$key}, $pdict->{$pkey}, $scale);
+            if ($maxnum > 0) {
+                $pkey = $key;
+                $pkey =~ s/\d+$/$maxnum/;
+                my $scale = int(($triednum+$maxnum-1)/$maxnum);
+                $tdict->{$key} = &statscalesum($odict->{$key}, $pdict->{$pkey}, $scale);
+            }
         }
     }
 }