15 min, lecture
:material-file-pdf-box: Lecture slides (PDF){ .md-button }
The slides carry the lecture; this page is rather the short version, meant for coming back to later.
Today's analysis is IRIS-HEP's ADL benchmark Q6: for every event with at
least three jets, find the trijet whose combined invariant mass is closest
to the top quark mass (172.5 GeV), then histogram that trijet's
Real analyses look like a much bigger version of this. For example,
TopEFT/ttbarEFT, a CMS top-quark
EFT search, runs on this exact stack in production (see
Module 9). Thus, the trijet selection is a toy
only with regards to its size, not its structure.
The same analysis is written two ways in this tutorial, and you pick one in Module 1:
- coffea: the processor is a Python function over awkward arrays. The
trijet is built from array operations (
ak.combinations,ak.argmin, and so on), and the result ishist.Histobjects. - RDataFrame: the processor is a Python function that describes a
ROOT
RDataFramecomputation (Filter,Define,Histo1D). The per-event trijet search is a short C++ function that ROOT compiles when the processor first runs, and the result is converted to the samehist.Histobjects.
Both are just "a function applied to a chunk of events", which is all that VineReduce asks of a processor. Thus, everything below the processor is shared.
Every run today has the same two sides. Your physics code, VineReduce, and a distributor run once, on the machine you're logged into. An executor and your physics code, however, run remotely, once per chunk, on whatever worker picks the chunk up:
local (x1)
+---------------------+
| application + |
| physics code |
+---------------------+
| vine-reduce |
+---------------------+
| distributor |
+---------------------+
|
v
remote (xN)
+---------------------+
| executor |
+---------------------+
| physics code |
+---------------------+
coffea's own executors couple two concerns that don't have to be solved together. The first is parallelism, that is, how one dataset's work is split into chunks, mapped, and reduced back together. The second is distribution, which is how those chunks get scheduled onto, transferred to, and run on remote machines.
VineReduce owns the first and hands the second to a distributor (today, TaskVine), so that each can change without touching the other. This is why, all session, your processor code never changes; the only thing that changes is what it's handed to. It is also why the processor can be built from coffea or from RDataFrame: VineReduce only needs a function that takes a chunk.
In order:
- A process on the login node, with local subprocesses as "workers" (Module 2).
- A TaskVine manager plus one TaskVine worker, both on the login node (Module 3).
- TaskVine workers on the real HTCondor pool, found through the catalog server, running a packed copy of your environment (Module 4).
Then, on that pool, the remaining modules cover tuning resources and chunk sizes, checkpoints and restart, shipping large outputs out of band, running several processors at once, and tolerating failed files.