Skip to content

PR for issue #719 #757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 28, 2025
Merged

PR for issue #719 #757

merged 4 commits into from
May 28, 2025

Conversation

MartiDvrk
Copy link
Collaborator

  • Call FlushSquaredValue() explicitly at the beginning of EndOfEventAction(). In fact, there is an implicit flushing implemented in ScoreSquaredValue() triggered in SteppingAction that flushes deposit in a voxel whenever a deposit by a new event is made. Consequently, the deposit made by the last event in any voxel remains unflushed and we must trigger the flushing explicitly.
  • At the same time, once the value is flushed, we must make sure that the voxel in the thread local image is reset to zero. So at the end of FlushSquaredValue(), we must iterate over the image and reset all pixels to zero.

@dsarrut
Copy link
Contributor

dsarrut commented May 14, 2025

not sure : the flush is implicit each event and should NOT being explicit for all the pixels at each event, otherwise it will be too long. The flush should be only 1) at the end of run or when you compute the uncertainty, within the "if NbOfEvent >= NbEventsNextCheck" part.
Indeed, the 1D data must be set to zero within FlushSquaredValue () event after each Run

@MartiDvrk
Copy link
Collaborator Author

Modified to Flush just before uncertainty is calculated.

@dsarrut
Copy link
Contributor

dsarrut commented May 20, 2025

seems good ! An additional change please (the last ;) !). Can you set to zero all the values of squared_worker_flatimg in FlushSquaredValue, after the end of the loop ? I think when there are several runs or when the uncertainty is computed, it must be set to zero to avoid "flushing" two times the values in a subsequent event. Thanks !
PS: dont bother about the failing test "test081_simulation_optigan_with_random_seed" it is a knowing issue, under investigation.

@tbaudier tbaudier merged commit 0557cde into master May 28, 2025
31 of 33 checks passed
@tbaudier tbaudier deleted the flush_edep2 branch May 28, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants