Opens a larger view. Escape closes it.

hardware-counters

check_runs.sh

#!/bin/bash
# Verify every sweep configuration completed all 5 counter sets successfully.
cd /work/project/project/user/runs/sweep || exit 1

total_ok=0
total_exp=0
echo "rc=0 sets out of 5 per configuration:"
echo
for app in stream hpcg gromacs hpl openfoam; do
    pre=$app
    [ "$app" = openfoam ] && pre=of
    printf '%-9s: ' "$app"
    for nc in 1 2 4 8 16 32 64 128; do
        f=$(ls -t ${pre}_c${nc}-*.out 2>/dev/null | head -1)
        total_exp=$((total_exp + 5))
        if [ -n "$f" ] && [ -f "$f" ]; then
            ok=$(grep -c 'END_SET.*rc=0' "$f")
            total_ok=$((total_ok + ok))
            if [ "$ok" -eq 5 ]; then
                printf 'c%-4s %s/5   ' "$nc" "$ok"
            else
                printf 'c%-4s %s/5 * ' "$nc" "$ok"
            fi
        else
            printf 'c%-4s  --   ' "$nc"
        fi
    done
    echo
done
echo
echo "TOTAL: $total_ok / $total_exp counter-set runs succeeded"
echo
echo "Configs with any failure (marked * above):"
for app in stream hpcg gromacs hpl openfoam; do
    pre=$app
    [ "$app" = openfoam ] && pre=of
    for nc in 1 2 4 8 16 32 64 128; do
        f=$(ls -t ${pre}_c${nc}-*.out 2>/dev/null | head -1)
        [ -f "$f" ] || continue
        ok=$(grep -c 'END_SET.*rc=0' "$f")
        if [ "$ok" -ne 5 ]; then
            echo "  $app c$nc ($f): $ok/5"
            grep 'END_SET' "$f" | grep -v 'rc=0' | head -3 | sed 's/^/      /'
        fi
    done
done