-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Parallel overlap checking with staged workflow #20963
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
Draft
agheata
wants to merge
19
commits into
root-project:master
Choose a base branch
from
agheata:par_ovlp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,012
−671
Conversation
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
Voxels marked as needing rebuild are built lazily, but this is a thread unsafe operation as it touches shared data. This introduces a method TGeoManager::RebuildVoxels that is called before checking overlaps, removing rebuilding potentially happening during the checking. The method TGeoChecker::CheckOverlaps is rewritten to avoid changing the list of overlaps attached to nodes, which was also a thread unsafe construct.
…;lelizable compute phase. Checking overlaps by sampling points in volumes implemented now as CheckOverlapsBySampling, and marked as deprecated. In future we will support a surface-based sampling like in Geant4.
…sing the separation axis theorem (SAT).
…y checks. This reduces by a large factor the number of real checks to be done. In assembly-based setups such as ALICE, the factor is ~1000.
…d added new ones. The legacy implementations for solids did not honour the contract that in case a shape overrides this method, it has to provide exactly the requested number of points if it returns true. The legacy versions even wrote more than the requested points, overwriting memory. Fixes cache overriding of points by visualization, that made the point generation not deterministic.
…site shapes. Previously, mesh points set via TGeoCompositeShape::SetPoints were cached only at the first call, making mesh generation invariant to the number of segments requested via TGeoManager. Now the caches are invalidated and rebuild lazily whenever the number of segment changes in the manager.
…cker implementation file
Member
Author
|
Working on fixing no-IMT mode |
Test Results 22 files 22 suites 3d 14h 56m 12s ⏱️ For more details on these failures, see this check. Results for commit 793c33b. ♻️ This comment has been updated with latest results. |
This was needed because the test is run in the same process as test_material_units, which changes the statically-initialized unit system in TGeoManager, inducing wrong material interpretation in GDML import used in the current test. This is not normal and should be debugged separately, but forcing the ROOT units seems to fix the problem Split the geometry tests to avoid static interference
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 Pull request:
Refactors and accelerates geometry overlap checking by splitting the procedure into well-defined stages, introducing candidate filtering and parallel execution, and fixing long-standing meshing and caching issues affecting correctness and performance. Preserves backward-compatibility of interfaces.
Changes or fixes:
TGeoManager::SetPoints()(default 20) andTGeoManager::SetNmeshVertices()(default 1000).TGeoChecker.TBuffer3DbuffersTGeoCompositeShape / TGeoBoolNodeGetPointsOnSegments()contracts in several shapesParallel execution
ROOT::TThreadExecutorand respectsROOT::EnableImplicitMT(N).Correctness fixes in meshing
GetPointsOnSegments()for several shapes to:trueonly if exactlynpointsare filledTGeoBBox,TGeoTube,TGeoCone,TGeoPcon,TGeoCtub).Performance impact
Checklist:
This PR was done at the request of ALICE experiment, but provides setup-independent enhancements of the overlap checking feature