Scouting simulation
Run the simulation workgraph on a small sample first, measure what it needs, and have a person sign it off before it runs at full scale. This extends Basic simulation.
The workgraph
The same chain as the basic simulation, with a scouting ladder of eight then sixteen seeds and a list of approving actions on the workgraph, which the hook accepts early once more than one in twenty of at least ten settled inputs have ended Problematic. The resource estimate is set to fail once so that the model shows a blocked approval. Turn chaos on during the scout to see the other way a scout ends: the hook accepts early and the success-rate check blocks the workgraph.
The document
CWL document (placeholder)
The document form is pending the dirac: hint schema of DX-ADR-007. This pattern needs:
- a workflow input carrying a
dirac:Feederhint naming the seed feeder, with the requested number of events and the scouting sample as arguments; - three steps, each with a
dirac:Transformationhint naming its packer; each runs during the scout because it is a compute step, which the document does not have to say; - the approving actions and the sign-off in the
dirac:Workgraphhint, or the VO defaults that supply them, which is also what makes the workgraph scout at all; - the ladder in the
dirac:Workgraphhint'sScoutingToApprovingbinding, stated in the feeder's own unit; - the
dirac:Workgraphhint with the schema version and the VO type that supplies the defaults; - the merge output declared as the workflow output.
What happens
- Submitting the document creates the workgraph and its three transformations in
New. Starting it moves the workgraph toScoutingand the transformations toActive. - In scouting mode the seed feeder yields only the current stage of the sample. The parcels run, the reconstruction and the merge pick up the outputs along the edges, and when every member has drained the
ScoutingToApprovinghook raises the feeder to the next stage; after the last it accepts and the workgraph moves toApproving. The line under the state strip says which stage the scout is at and how many inputs have been processed or set aside. A failed parcel is not yet a failure:HandleFailedInputretries its inputs, and only an input that exhausts its retries is set aside asProblematic. Should more than one in twenty of at least ten settled inputs end that way, the hook accepts at once instead, knowing the success-rate check will fail: a scout in trouble shows asApprovingBlocked, and a scout still running is plainlyScouting, so nobody has to watch it. - The approving actions run in order: the success rate is checked against the same threshold the hook used, the resource usage is measured and written into the requirements, and the workgraph waits for sign-off. In the model the resource estimate fails the first time, which moves the workgraph to
ApprovingBlocked; reset it or force it passed. The sign-off blocks the same way until someone gives it: force passed is the sign-off. scout further adds a stage to the ladder and returns toScouting, keeping everything the scout produced. - In
Activethe workgraph's active hook governs MCSimulation's feeder: it raises the limit in steps so that only a bounded number of events is in flight, and it will disable the feeder once the dataset holds the requested number of files. Watch the feeder strip climb in steps of 60 as the hook raises the limit each time the work in flight drops. Nothing the scout produced is redone. The line under the strip readsrequestingwhile an external feeder is enabled andfeeders done, drainingonce none is: draining is a condition insideActive, not a state of its own. - When the requested amount has been produced, here 20 files in the dataset, the hook disables the feeder. Parcels already in flight still complete, so the workgraph ends a little over the target. The chain then drains from the top: each packer, told that its feeder is off, packs what is left, and each downstream feeder reports exhaustion once its producer is finished.
- The workgraph moves to
Finalizingand runs each member's finalizing checks upstream first, then reachesCompleted.
Finalizing checks
- MCSimulation
- No seed was used twice.
- MCReconstruction
- No input was used twice.
- MCMerge
- No input was used twice.
See also
- Basic simulation is the same workgraph without the scouting phase.
- Replicating the output adds a replication that must not run during scouting.
- How the Transformation System works explains scouting and approval.
- The worked examples trace the LHCb simulation in full, including the filtered variant.