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

Validation and benchmarking of latest examples with single-precision geometry #155

Open
agheata opened this issue Nov 2, 2021 · 4 comments
Labels
performance Type: Runtime and / or memory behavior
Milestone

Comments

@agheata
Copy link
Contributor

agheata commented Nov 2, 2021

AdePT can be built against VecGeom compiled with -DSINGLE_PRECISION=ON. When this happens, vecgeom::Precision typedef becomes float and all geometry interfaces work in single precision automatically. The examples were adapted to use automatically this feature when available. To validate and test performance in this mode, we should:

  • verify that the latest examples (starting with example12) compile and run in this mode (may not be the case for full CMS geometry)
  • validate the output against standard double precision mode, understand differences and provide fixes if possible
  • benchmark TestEM3 and more complex geometry examples
@agheata agheata added the performance Type: Runtime and / or memory behavior label Nov 2, 2021
@agheata agheata added this to the January milestone Nov 2, 2021
@hahnjo
Copy link
Contributor

hahnjo commented Nov 2, 2021

Also please validate with TestEm3, I currently see percent-level disagreement with double precision and Geant4.

@hahnjo
Copy link
Contributor

hahnjo commented Dec 8, 2021

The correctness of TestEm3 should be addressed by #163. However, more complex geometries such as cms2018 still require a (temporary) push on every step, which is potentially bad.

@agheata
Copy link
Contributor Author

agheata commented Dec 8, 2021

more complex geometries such as cms2018 still require a (temporary) push on every step, which is potentially bad

We expected this since not all solids are for the moment single-precision proof, in particular the complex ones (polycone, polyhedra). We will need to continue the case-by-case shape_testXXX single-precision debugging to make the single-precision mode more robust.

@hahnjo
Copy link
Contributor

hahnjo commented Feb 23, 2022

The correctness of TestEm3 should be addressed by #163. However, more complex geometries such as cms2018 still require a (temporary) push on every step, which is potentially bad.

This turns out to be the reason for the wrong results when activating magnetic field in TestEm3: During field propagation, especially of low energy particles, the chordLen will get smaller than kPush. In that case, even though the pushing is temporary, the navigator has to assume that there is no boundary, just because it doesn't make sense to query a negative distance. This essentially leads to particles not seeing any boundary anymore, and depositing their energy in the wrong volume / material.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Type: Runtime and / or memory behavior
Projects
None yet
Development

No branches or pull requests

2 participants