Repository navigation
Factor the primary request out of the sim worker kernel - #16058
Merged
Merged
Conversation
This moves the request for a chunk of primaries out of O2SimDevice::Kernel into O2SimDevice::fetchChunk, without changing the behaviour. - fetchChunk sends the request, waits for the answer, backs off while the server is busy and decodes the chunk. - It reports whether there is work, nothing yet, the end-of-work marker, or nothing more to ask for, and Kernel acts on that as before. This lets a multithreaded Geant4 worker request its work the same way as a worker process does now. https://its.cern.ch/jira/browse/O2-7305 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
This moves the request for a chunk of primaries out of
O2SimDevice::Kernelinto a newO2SimDevice::fetchChunk. It sends the request, waits for the answer, backs off while the server is busy and decodes the chunk, and reports whether there is work, nothing yet, the end-of-work marker, or nothing more to ask for.Kernelacts on that exactly as before.The purpose is that a multithreaded Geant4 worker can later request its sub-event the same way a worker process does now.
Note that this is a pure refactor. A seeded
o2-simrun (10 Pythia8 pp events, all detectors, Geant4,-j 8) gives identical kinematics and hits compared withdev. In service mode, a second batch submitted througho2-sim-client.pyis also identical todev.Relates to https://its.cern.ch/jira/browse/O2-7305
Assisted by Claude Code.