Parcourir la source

Log the amount of memory to use

Ian Goldberg il y a 6 mois
Parent
commit
9ee048e96e
2 fichiers modifiés avec 15 ajouts et 1 suppressions
  1. 3 1
      repro/parse_logs
  2. 12 0
      repro/repro

+ 3 - 1
repro/parse_logs

@@ -139,7 +139,9 @@ sub parse_preproc {
             next;
         }
         last if /===== End/;
-        # The log was malformed
+        # Try to recover from a malformed log
+        last if /^Max GB:/;
+        # It was too malformed
         die "Malformed log" if /===== Running/;
         if (/^(\d+) message bytes sent/) {
             $preproc_kib[$who] += $1 / 1024;

+ 12 - 0
repro/repro

@@ -33,6 +33,17 @@ else
     numiters="$2"
 fi
 
+# The maximum amount of memory to use (in GB).  Set the environment
+# variable PRAC_MAXGB to increase it beyond 16 (don't set it lower
+# than 16).
+if [ "$PRAC_MAXGB" = "" ]; then
+    maxgb=16
+elif [ "$PRAC_MAXGB" -gt 16 ]; then
+    maxgb=$PRAC_MAXGB
+else
+    maxgb=16
+fi
+
 logname='log'
 
 # Run one experiment
@@ -42,6 +53,7 @@ run() {
     echo "$now: Running $* ..."
     logfile="prac_${logname}.out${LOGSUFFIX}"
     mkdir -p data
+    echo "Max GB: $maxgb" >> data/$logfile
     ../docker/run-experiment $* >> data/$logfile
 }