Skip to content
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

KGeoBag deinitialization #92

Merged
merged 50 commits into from
Dec 20, 2023

Conversation

pslocum
Copy link
Contributor

@pslocum pslocum commented Dec 19, 2023

This is a small change that seems to help when running multiple Kassiopeia simulations inside one executable (e.g. when modeling pileup). Without this change, there appear to geometry spaces that persist across repeated Kassiopeia simulations, which causes the error multiple spaces registered for path ... . There may be a more suitable location for this change, but this one can be suggested as a starting point.

nsoblath and others added 30 commits March 11, 2016 09:49
…ia from Locust. The conditions are presently global and are defined in small functions that can be dropped into the appropriate static event modifier class. Modified classes are LMCKassSignalGenerator and KSRoot.
…tronRadiationExtractor::ExecutePostStepModification().
…n thread status out of ReceivedEventStartCondition.
… KSTrajInterpolatorHermite.cxx pending more testing.
Check for Boost library as variable or imported target
pslocum and others added 18 commits July 17, 2020 12:00
@richeldichel
Copy link
Contributor

Thanks for this pull request, which looks like a fairly straightforward fix.
Did you observe this behavior anywhere else or does it just affect KGeoBag?

@pslocum
Copy link
Contributor Author

pslocum commented Dec 19, 2023

Thanks for the reply. From the terminal output, it appears that only KGeoBag was affected. With the fix in place, we can run identical sequential Kassiopeia simulations inside one executable.

@richeldichel
Copy link
Contributor

Okay! I have no objections to this small change and I also don't see a better way to solve it right now. So I will just go ahead and merge this.

@richeldichel richeldichel merged commit c07cbb3 into KATRIN-Experiment:main Dec 20, 2023
4 checks passed
@pslocum pslocum deleted the feature/deleteKGinstance branch December 20, 2023 18:00
@pslocum
Copy link
Contributor Author

pslocum commented Dec 20, 2023

Thank you!

@pslocum
Copy link
Contributor Author

pslocum commented Jan 3, 2024

After more testing, it appears that the above KGeoBag objects that are persisting across multiple simulations are also needed for rendering in VTK graphics. So while this fix has optimized pileup calculations, it unfortunately seems to cause missing KGeoBag objects in graphical VTK outputs.

@richeldichel
Copy link
Contributor

Interesting. Do you change any geometry elements in these different simulations?

@pslocum
Copy link
Contributor Author

pslocum commented Jan 10, 2024

Right, there were no other changes to the geometry elements when doing these tests.

One possible idea would be to move the fix from the above location ^ to a later time after the VTK objects have been rendered. However, that might not work in a case where VTK is never instantiated. I also tried moving the fix into KSRoot, but there it still interfered with VTK's access to the KGeoBag objects. Additionally, I tried to make the above fix dependent on the flag KASPER_USE_VTK, but this was not successful because I think it's really a question of whether VTK is instantiated, instead of whether VTK has been compiled.

@richeldichel
Copy link
Contributor

I also have a different problem, namely that the KVTKWindow is started after the deinitialization so that I do not get any geometry elements displayed via Kassiopeia's vtk viewer. Hence, I think I need to revert this commit and we need to find a different solution.

I am assuming you are using the VTK writer to get a .vtp file for each simulation that can then be accessed separately?

@pslocum
Copy link
Contributor Author

pslocum commented Jan 10, 2024 via email

richeldichel added a commit that referenced this pull request Feb 8, 2024
This reverts commit c07cbb3 as discussed in #92 because it prevents the visualization with vtk after the simulation has ended.
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