jungfrauandClaude Opus 5 a22a51372e Run the parallel helpers on a pool instead of starting threads per chunk
ParallelFor and ParallelChunks started fresh OS threads on every call, one per chunk,
through std::async. There are 57 call sites and several sit inside iterative fits, so
one run of the heaviest crystal created 13 497 threads and a 900-frame dataset 7 320.
Both now run on a persistent pool. The contracts are unchanged: ParallelChunks keeps
the same worker count and the same fixed split, so a reduction sums term for term as
before, and ParallelFor keeps stealing per item.

Two things in the pool are worth knowing. The caller is one of the hands - it claims
its own region's tasks and then waits only on tasks already running - so a region
entered from inside another region cannot deadlock at any depth, which a shared-queue
pool would. And a task wakes one worker rather than the whole pool: on a large machine
notify_all wakes every idle thread to find nothing, once per region, tens of thousands
of times a run.

Two hand-rolled copies of the same pattern now use it, in FrenchWilson and in the two
histogram passes of ComputeAsuGroups.

Be clear about what this buys today: nothing measurable. Thread creations drop 13 497
-> 770 and entering a parallel region goes from 1.2-2.2 ms to 112 us, an 11-20x cut,
but wall clock on 48 threads is level with before, inside the +-5 % this machine's
run-to-run placement is worth. What it removes is a cost that grows with the thread
count - measured, entry is linear in it - and the machine this is heading for has four
times the threads of the one it was measured on, where the same 335 regions a run
would cost about 1.8 s of pure thread creation.

ComputeAsuGroups' histogram also changes. It is an nthreads x n_groups table, 936 MB
at -N 48 on the heaviest crystal and allocated five times a run, and the prefix over
it walked DOWN a column - a 19.5 MB stride, so a cache and TLB miss per step, 234 M of
them, serially. Both passes now walk rows and split over group ranges. The counts are
integers, so the result is bit-identical. This one is reasoning, not measurement: at 48
threads it sits under this machine's noise and could not be shown either way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 18:05:35 -04:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-07-11 07:19:11 +02:00
2026-07-19 09:39:28 +02:00
2025-12-04 11:56:14 +01:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-07-13 13:54:03 +02:00
2026-07-12 19:42:29 +02:00
2026-08-13 17:03:10 +02:00
2026-03-26 20:50:33 +01:00
2026-06-23 20:29:49 +02:00
2026-08-13 17:03:10 +02:00
2026-07-19 09:39:28 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-07-19 09:39:28 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-06-13 21:27:41 +02:00
2026-06-23 20:29:49 +02:00
2026-08-13 17:03:10 +02:00
2024-11-22 21:25:20 +01:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2024-12-02 21:17:14 +01:00
2026-08-13 17:03:10 +02:00
2025-10-25 22:05:47 +02:00
2026-07-03 19:18:56 +02:00
2026-06-23 20:29:49 +02:00
2026-08-13 17:03:10 +02:00
2024-12-02 21:17:14 +01:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00

Jungfraujoch

Application to receive data from the PSI JUNGFRAU and EIGER detectors.

All documentation is now placed in docs/ subdirectory and for the current version hosted on Jungfraujoch Read The Docs page.

S
Description
Jungfraujoch Data Acquisition System
Readme GPL-3.0
3 GiB
Languages
C++ 74.7%
HTML 8%
C 6.4%
TypeScript 4.4%
Tcl 2.3%
Other 4.1%