-
Notifications
You must be signed in to change notification settings - Fork 199
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
Clang UB sanitizer CI test: increase coverage #5597
Open
lucafedeli88
wants to merge
9
commits into
ECP-WarpX:development
Choose a base branch
from
lucafedeli88:increase_coverage_clang_ub_sanitizer
base: development
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.
Open
Clang UB sanitizer CI test: increase coverage #5597
lucafedeli88
wants to merge
9
commits into
ECP-WarpX:development
from
lucafedeli88:increase_coverage_clang_ub_sanitizer
Conversation
This file contains 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
lucafedeli88
changed the title
Clang UB sanitizer CI test: increase coverage
[WIP] Clang UB sanitizer CI test: increase coverage
Jan 23, 2025
lucafedeli88
changed the title
[WIP] Clang UB sanitizer CI test: increase coverage
Clang UB sanitizer CI test: increase coverage
Jan 24, 2025
ax3l
reviewed
Jan 24, 2025
@@ -298,7 +298,7 @@ void ParticleHistogram2D::WriteToFile (int step) const | |||
data.setPosition<amrex::Real>({0.5, 0.5}); | |||
|
|||
auto dataset = io::Dataset( | |||
io::determineDatatype<double>(), | |||
io::determineDatatype<amrex::Real>(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't the properties be in ParticleReal
?
Suggested change
io::determineDatatype<amrex::Real>(), | |
io::determineDatatype<amrex::ParticleReal>(), |
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.
In CI test based on clang UB sanitizers, most of the time (~ 1h30) is spent in compiling the code, while just a few minutes are spent actually running some simulations. This means that we can increase the coverage of the test by adding some more simulations to the tests with a negligible increase of the total runtime.
This PR does just that: now most of the cases in
Examples/Physics_applications
are tested with the UB sanitizer.Note that some cases cannot run in double precision (see below). For this reason, the PR also splits the UB sanitizer test into single precision and double precision (in double precision only the cases that cannot run in single precision are tested).
Updates:
Issue found while running inputs_test_3d_beam_beam_collision --> We need to run this case in double precision
The tool has found an issue while running
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/beam_beam_collision/inputs_test_3d_beam_beam_collision
:I've temporarily commented out this case while I investigate the cause.
For the moment, I am not able to reproduce the issue on my local machine. The issue is using single precision for this specific test case! Specifically, momenta end up beingNaN
and the sanitizer detects the attempt to convert a floating point NaN into an integer.Issue found while running inputs_test_2d_background_mcc --> We need to run this case in double precision
MLMG
does not converge in single precision for this simulation case. We need to run it in double precision.Issue found while running free_electron_laser --> We need to run this case in double precision
I have observed this issue:
which seems to be related to using single precision instead of double precision. Therefore, we need to run this case in double precision.
Issue found while running inputs_test_2d_laser_ion_acc --> bugfix in WarpX
inputs_test_2d_laser_ion_acc
case has the following issue in single precision:This comes from the fact that the datatype of this dataset in
ParticleHistogram2D.cpp
is hard-coded as double:this PR modifies these lines as follows: