Repository navigation
Conversation
…nters `benchmark/sweep/run.sh` measures, on one machine, the numbers of #46 for a range of thread counts and Julia versions: the per-loop overhead (`overhead.jl`), a Julia port of EPCC syncbench's PARALLEL FOR and REDUCTION next to the C syncbench built against libgomp and libomp, the wake-up latency after a serial gap, hardware counters per loop with LinuxPerf.jl (`counters.jl`) and the cost of stealing (`steal.jl`). Each run uses one hardware thread per physical core, with every Julia thread pinned to its own CPU, under a per-host lock, and records the load before it. The results go to one CSV per machine; `summarize.jl` turns any number of them into tables, and `remote.sh` runs the sweep on other machines over ssh and collects the results. The scripts in `benchmark/overhead` append rows to that CSV when `BENCH_CSV` is set (`benchmark/record.jl`); `counters.jl` also measures the greedy team and `@threads :dynamic`, counts context switches and migrations, and takes its events from `COUNTERS_EVENTS`; `overhead.jl` leaves out KernelAbstractions where POCL does not load. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
On a Broadwell Xeon (E5-2603 v4, NMI watchdog on), with all four groups open at once the kernel returns 0 for cycles, cache misses and L1d misses while reporting them as counted the whole time; each group on its own counts correctly. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Benchmark Results (Julia v1)Time benchmarks
|
The first call of a test compiled it, which already took longer than the 1 ms target, so `innerreps` stopped at 20 and every measurement covered about 20 loops: waking the workers dominated, and the team's PARALLEL FOR overhead read 0.50 ± 0.47 µs on a Ryzen 9 5950X at 8 threads. With the warm-up (as the port in #46 does), the inner repetitions are 5120 there and the confidence interval ±0.03 µs; Polyester and the reductions now agree with that port. Also specialise `measure` on the mechanism's function, and print the inner repetitions. The team's PARALLEL FOR still measures 0.41-0.43 µs against the #46 port's 0.23-0.25 µs on the same machine and commit; that difference is not explained yet. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… own `run.sh` sets `JULIA_LLVM_ARGS=-align-all-nofallthru-blocks=6` (`CODE_ALIGN=0` turns it off, `CODE_ALIGN_ARGS` changes it), so that where the hot loops land relative to the 64-byte fetch blocks does not vary between builds and processes. The cache key of package images leaves out LLVM options, so an image compiled without the option would be loaded as valid: the aligned runs use their own depot, `.cache/<host>/depot-aligned`, with `JULIAUP_DEPOT_PATH` still pointing juliaup at its installations. `machine.txt` records the setting. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CLuPxMba5AAEGKwEUNhQjN
On an NVIDIA GB10, `lscpu` numbers the cores per cluster (CPU 0, a Cortex-A725, and CPU 5, a Cortex-X925, are both core 0 of socket 0), so one CPU per (socket, core) kept only the ten small cores. The first CPU of each `thread_siblings_list` is one per core on every machine tried. Where the kernel reports `cpu_capacity` (big.LITTLE ARM), the cores of the highest capacity class come first, so that small thread counts run on the big cores; elsewhere CPU order, as before. Also expand the list of EPCC binaries safely when it is empty: bash 3.2 (macOS) rejects an empty array under `set -u`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CLuPxMba5AAEGKwEUNhQjN
On cfarm421, GitHub reset the connection while `run.sh` downloaded EPCC, and the broken tarball stopped the sweep under `set -e`. The tarball is now kept once for all hosts in `.cache/`, fetched with three attempts and unpacked through a temporary directory; if it cannot be had, the sweep runs without the `epcc` benchmark. `remote.sh` copies a local tarball to each host, so that the hosts need not reach GitHub, and extracts the checkout without the modification times (a host's clock behind ours made tar warn per file). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CLuPxMba5AAEGKwEUNhQjN
A run interrupted while fetching EPCC (cfarm421, before 7f92ac1) left an empty source directory behind, which the next run took for the unpacked sources: both builds failed for want of the files. Unpack unless `syncbench.c` is there, replacing what is. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CLuPxMba5AAEGKwEUNhQjN
`Pkg.resolve` keeps the packages of an existing manifest even where `[sources]` in Project.toml now names another (here OhMyThreads with a fix, JuliaFolds2/OhMyThreads.jl#176): a sweep on a host that had run one before measured the old package. `run.sh` now deletes the per-version manifest before resolving. Without `flock` (macOS) the sweep took no lock at all; it now uses a directory, `$LOCK.d`, created atomically by `mkdir`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CLuPxMba5AAEGKwEUNhQjN
…CK}dir) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CLuPxMba5AAEGKwEUNhQjN
Collaborator
|
AI-generated review: I used the sweep's approach for cross-host benchmarks of #62–#69 and needed these changes:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A script for reproducing the measurements of #46 on any machine and comparing machines:
What a run does
lscpu, within the shell's affinity),taskset, and each Julia thread pinned to its own CPU (pin.jl, loaded withjulia -L); OpenMP gets the same CPUs throughOMP_PLACES/OMP_PROC_BIND. Julia runs with-t N,0.overhead:benchmark/overhead/overhead.jl, all mechanisms;syncbench: a Julia port of EPCC syncbench's PARALLEL FOR and REDUCTION (team, greedy team, Polyester,@threads :static/:dynamic, OhMyThreads);epcc: the C EPCC syncbench v4.0 at a fixed commit, built with gcc (libgomp) and clang (libomp), each with the default andOMP_WAIT_POLICY=active;wakeup: the loop after a busy gap of 0–10 ms, and for the team withset_spin_time!(0);counters: LinuxPerf.jl counters per loop, skipped ifperf_event_paranoid> 2;steal:benchmark/overhead/steal.jl.results/<host>-<date>/withmachine.txt(CPU, topology, OS, compilers,versioninfo, governor), a log per run and oneresults.csv.summarize.jlprints tables in the layout of Benchmark report: loop overhead, wake-up and OpenMP comparison on x86, Apple M1 and four ARM boards #46: a row per host, Julia version and thread count, a column per mechanism.remote.sh start|status|fetch|stop host…copies the checkout over ssh (including uncommitted and untracked files), runs the sweep in the background and collects the results.Changes to the existing scripts
benchmark/record.jl: appends CSV rows whenBENCH_CSVis set, does nothing otherwise, so the scripts run as before on their own.counters.jl: also measures the greedy team and@threads :dynamic, counts task-clock, context switches and CPU migrations, and takesCOUNTERS_EVENTS(LinuxPerf syntax) to choose other events. LinuxPerf only knows the genericperf listevents; CPU-specific ones such as the RFO HITM counts of Benchmark report: loop overhead, wake-up and OpenMP comparison on x86, Apple M1 and four ARM boards #46 still need theperfCLI.overhead.jl: leaves out KernelAbstractions if it does not load (POCL is not built for every platform);OVERHEAD_SECONDSsets the time per mechanism.Tested
QUICK=1sweeps locally (Zen, Arch, gcc 16 + clang 23).remote.shagainst a fresh depot (fake ssh), and against a real shared Xeon E5-2603 v4 host (2×6 cores, gcc only, juliaup not on the non-interactive PATH, stale registry).Fixes found that way:
Pkg.resolveneither installs nor updates the General registry, so the setup step now does both.omp_init_lock_with_hint, so EPCC v4.0 is built without the lock hints, with v3.1 as a fallback.Not tested: macOS (no pinning there) and non-x86 hosts.
🤖 Generated with Claude Code