From 2be6928a4367ff35209484becad6627e34ac9768 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Fri, 2 Oct 2026 06:21:48 +0100 Subject: Run Pure and aup on an x86_64 WSL2 and an M3 Mac against the Pi (029) Every pure-run of aup's check (1,053 runs of 667 modules) gives the same output, errors and exit on the Pi, the WSL2 (x86_64, 4 KiB pages, gcc 13) and the Mac (Apple clang 21); the same events make byte-identical stores on the Pi and the Mac, and either opens the other's and goes on the same. Pure's checks pass one at a time in WSL (each_check.py); its wall clock is set back about 2 s every 32 s (clock.py). stores.py streams pure-run's output, whose size grows with the square of the events. --- .../experiments/029-across-machines/compare.py | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 research/experiments/029-across-machines/compare.py (limited to 'research/experiments/029-across-machines/compare.py') diff --git a/research/experiments/029-across-machines/compare.py b/research/experiments/029-across-machines/compare.py new file mode 100755 index 0000000..8b96612 --- /dev/null +++ b/research/experiments/029-across-machines/compare.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +"""Two machines' records of pure-run (recorded-pure-run's logs): the +modules each compiled, and for every run both made (the same module, the +same arguments and input), whether output, errors and exit are the same. + +compare.py A.jsonl B.jsonl a JSON summary, and each run that differs""" +import json +import sys +from collections import Counter + + +def load(path): + runs = [json.loads(line) for line in open(path)] + return runs, Counter((r['module'], r['args'], r['input']) for r in runs) + + +(a, keys_a), (b, keys_b) = load(sys.argv[1]), load(sys.argv[2]) +seen_a = {} +for r in a: + seen_a.setdefault((r['module'], r['args'], r['input']), set()).add((r['output'], r['errors'], r['exit'])) +both, same, differ = 0, 0, [] +for r in b: + key = (r['module'], r['args'], r['input']) + if key not in seen_a: + continue + both += 1 + if (r['output'], r['errors'], r['exit']) in seen_a[key]: + same += 1 + else: + differ.append({'run': key, 'a': sorted(seen_a[key]), 'b': (r['output'], r['errors'], r['exit'])}) +modules_a, modules_b = {r['module'] for r in a}, {r['module'] for r in b} +print(json.dumps({'runs_a': len(a), 'runs_b': len(b), 'modules_a': len(modules_a), 'modules_b': len(modules_b), + 'modules_both': len(modules_a & modules_b), 'runs_both': both, 'runs_same': same, + 'runs_differ': len(differ)})) +for d in differ[:20]: + print(json.dumps(d)) -- cgit v1.2.3