-
Notifications
You must be signed in to change notification settings - Fork 195
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
CI: checksums cleanup #5297
CI: checksums cleanup #5297
Conversation
96dcba4
to
1f802a0
Compare
Examples/Physics_applications/capacitive_discharge/analysis_1d.py
Outdated
Show resolved
Hide resolved
Examples/Physics_applications/capacitive_discharge/analysis_2d.py
Outdated
Show resolved
Hide resolved
Examples/Physics_applications/capacitive_discharge/analysis_dsmc.py
Outdated
Show resolved
Hide resolved
Examples/Physics_applications/laser_acceleration/analysis_1d_fluid_boosted.py
Outdated
Show resolved
Hide resolved
ca00dda
to
2aeaf7e
Compare
152fbbd
to
7c11574
Compare
aa3aec8
to
3ee6ecf
Compare
print(f"\nNew checksums file {self.test_name}.json:") | ||
print(json.dumps(self.data, indent=2)) | ||
print("----------------") | ||
sys.exit(1) | ||
|
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.
Please double check if this script by @NeilZaim still works when this output here is changed:
https://warpx.readthedocs.io/en/latest/developers/checksum.html#reset-a-benchmark-from-the-azure-pipeline-output-on-github
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.
Thanks for pointing this out. I'm working on a fix in #5372.
The major part of this PR is about updating the docs so that it is a bit easier for developers to connect the section on testing with the section on checksums. Here's a couple of screenshots showing the new content organization for the testing and checksums sections: <p align="center"> <img src="https://github.com/user-attachments/assets/af3df005-6923-4bcf-9f2a-8dcf60c126b2" width="300"> <img src="https://github.com/user-attachments/assets/b290e5bd-0ec3-46c1-93fc-055607220042" width="300"> </p> As part of this PR, I also update the tool that we have to reset checksums locally based on the Azure output. The update is necessary due to a change in #5297, as noted in #5297 (comment), given that new checksum files are now displayed as follows: ``` New checksums file test_2d_langmuir_multi.json: { "lev=0": { "Bx": 0.0, "By": 5.726296856755232, "Bz": 0.0, "Ex": 3751589134191.326, "Ey": 0.0, "Ez": 3751589134191.332, "jx": 1.0100623329922576e+16, "jy": 0.0, "jz": 1.0100623329922578e+16 }, "electrons": { "particle_momentum_x": 5.668407513430198e-20, "particle_momentum_y": 0.0, "particle_momentum_z": 5.668407513430198e-20, "particle_position_x": 0.6553599999999999, "particle_position_y": 0.65536, "particle_weight": 3200000000000000.5 }, "positrons": { "particle_momentum_x": 5.668407513430198e-20, "particle_momentum_y": 0.0, "particle_momentum_z": 5.668407513430198e-20, "particle_position_x": 0.6553599999999999, "particle_position_y": 0.65536, "particle_weight": 3200000000000000.5 } } ``` as opposed to the old way ``` ---------------- New file for test_2d_langmuir_multi: { "lev=0": { "Bx": 0.0, "By": 5.726296856755232, "Bz": 0.0, "Ex": 3751589134191.326, "Ey": 0.0, "Ez": 3751589134191.332, "jx": 1.0100623329922576e+16, "jy": 0.0, "jz": 1.0100623329922578e+16 }, "electrons": { "particle_momentum_x": 5.668407513430198e-20, "particle_momentum_y": 0.0, "particle_momentum_z": 5.668407513430198e-20, "particle_position_x": 0.6553599999999999, "particle_position_y": 0.65536, "particle_weight": 3200000000000000.5 }, "positrons": { "particle_momentum_x": 5.668407513430198e-20, "particle_momentum_y": 0.0, "particle_momentum_z": 5.668407513430198e-20, "particle_position_x": 0.6553599999999999, "particle_position_y": 0.65536, "particle_weight": 3200000000000000.5 } } ---------------- ``` To-do: - [x] Update docs - [x] Update tool --------- Co-authored-by: Axel Huebl <[email protected]>
Modify checksum evaluation call to follow example from PR ECP-WarpX#5297. Co-authored-by: Edoardo Zoni <[email protected]>
The major part of this PR is about updating the docs so that it is a bit easier for developers to connect the section on testing with the section on checksums. Here's a couple of screenshots showing the new content organization for the testing and checksums sections: <p align="center"> <img src="https://github.com/user-attachments/assets/af3df005-6923-4bcf-9f2a-8dcf60c126b2" width="300"> <img src="https://github.com/user-attachments/assets/b290e5bd-0ec3-46c1-93fc-055607220042" width="300"> </p> As part of this PR, I also update the tool that we have to reset checksums locally based on the Azure output. The update is necessary due to a change in ECP-WarpX#5297, as noted in ECP-WarpX#5297 (comment), given that new checksum files are now displayed as follows: ``` New checksums file test_2d_langmuir_multi.json: { "lev=0": { "Bx": 0.0, "By": 5.726296856755232, "Bz": 0.0, "Ex": 3751589134191.326, "Ey": 0.0, "Ez": 3751589134191.332, "jx": 1.0100623329922576e+16, "jy": 0.0, "jz": 1.0100623329922578e+16 }, "electrons": { "particle_momentum_x": 5.668407513430198e-20, "particle_momentum_y": 0.0, "particle_momentum_z": 5.668407513430198e-20, "particle_position_x": 0.6553599999999999, "particle_position_y": 0.65536, "particle_weight": 3200000000000000.5 }, "positrons": { "particle_momentum_x": 5.668407513430198e-20, "particle_momentum_y": 0.0, "particle_momentum_z": 5.668407513430198e-20, "particle_position_x": 0.6553599999999999, "particle_position_y": 0.65536, "particle_weight": 3200000000000000.5 } } ``` as opposed to the old way ``` ---------------- New file for test_2d_langmuir_multi: { "lev=0": { "Bx": 0.0, "By": 5.726296856755232, "Bz": 0.0, "Ex": 3751589134191.326, "Ey": 0.0, "Ez": 3751589134191.332, "jx": 1.0100623329922576e+16, "jy": 0.0, "jz": 1.0100623329922578e+16 }, "electrons": { "particle_momentum_x": 5.668407513430198e-20, "particle_momentum_y": 0.0, "particle_momentum_z": 5.668407513430198e-20, "particle_position_x": 0.6553599999999999, "particle_position_y": 0.65536, "particle_weight": 3200000000000000.5 }, "positrons": { "particle_momentum_x": 5.668407513430198e-20, "particle_momentum_y": 0.0, "particle_momentum_z": 5.668407513430198e-20, "particle_position_x": 0.6553599999999999, "particle_position_y": 0.65536, "particle_weight": 3200000000000000.5 } } ---------------- ``` To-do: - [x] Update docs - [x] Update tool --------- Co-authored-by: Axel Huebl <[email protected]>
Fix #5206 and prepare for #5256:
test_1d_background_mcc_picmi
test_2d_background_mcc_picmi
test_3d_particle_absorption
test_2d_dirichlet_bc
test_2d_dirichlet_bc_picmi
test_2d_field_probe
test_3d_embedded_boundary_picmi
test_2d_particle_reflection_picmi
test_rz_laser_acceleration_opmd
test_2d_runtime_components_picmi
evaluate_checksum
Calls to
evaluate_checksum
are now uniform across the analysis scripts, making it easier to automatize further changes. Hopefully the uniformity will be preserved by copy/pasting the necessary code:output_format
,rtol
,do_particles
, etc.