Skip to content

Fix Bug in HPMG bottomsolve_gpu#1370

Merged
MaxThevenet merged 1 commit into
Hi-PACE:developmentfrom
AlexanderSinn:Fix_Bug_in_HPMG_bottomsolve_gpu
Apr 8, 2026
Merged

Fix Bug in HPMG bottomsolve_gpu#1370
MaxThevenet merged 1 commit into
Hi-PACE:developmentfrom
AlexanderSinn:Fix_Bug_in_HPMG_bottomsolve_gpu

Conversation

@AlexanderSinn
Copy link
Copy Markdown
Member

For some resolutions, this bug was causing out-of-bounds accesses, leading to wrong results or invalid memory crashes when running the CI tests on GPU. With these changes the CI passes when running on A100 with -DAMReX_ASSERTIONS=YES and -DAMReX_BOUND_CHECK=YES:

[asinn@max-mpag003]~/hipace% ctest --test-dir build --output-on-failure
Internal ctest changing into directory: /home/asinn/hipace/build
Test project /home/asinn/hipace/build
      Start  1: blowout_wake.2Rank
 1/20 Test  #1: blowout_wake.2Rank ..............................   Passed   17.29 sec
      Start  2: beam_evolution.1Rank
 2/20 Test  #2: beam_evolution.1Rank ............................   Passed    5.87 sec
      Start  3: adaptive_time_step.1Rank
 3/20 Test  #3: adaptive_time_step.1Rank ........................   Passed    6.38 sec
      Start  4: radiation_reaction.1Rank
 4/20 Test  #4: radiation_reaction.1Rank ........................   Passed    3.78 sec
      Start  5: grid_current.1Rank
 5/20 Test  #5: grid_current.1Rank ..............................   Passed    4.90 sec
      Start  6: linear_wake.normalized.1Rank
 6/20 Test  #6: linear_wake.normalized.1Rank ....................   Passed    5.58 sec
      Start  7: linear_wake.SI.1Rank
 7/20 Test  #7: linear_wake.SI.1Rank ............................   Passed    6.87 sec
      Start  8: gaussian_linear_wake.normalized.1Rank
 8/20 Test  #8: gaussian_linear_wake.normalized.1Rank ...........   Passed    5.65 sec
      Start  9: gaussian_linear_wake.SI.1Rank
 9/20 Test  #9: gaussian_linear_wake.SI.1Rank ...................   Passed    5.75 sec
      Start 10: reset.2Rank
10/20 Test #10: reset.2Rank .....................................   Passed    4.48 sec
      Start 11: beam_in_vacuum.SI.1Rank
11/20 Test #11: beam_in_vacuum.SI.1Rank .........................   Passed    5.82 sec
      Start 12: beam_in_vacuum.normalized.1Rank
12/20 Test #12: beam_in_vacuum.normalized.1Rank .................   Passed    6.63 sec
      Start 13: slice_IO.1Rank
13/20 Test #13: slice_IO.1Rank ..................................   Passed   12.47 sec
      Start 14: output_coarsening.2Rank
14/20 Test #14: output_coarsening.2Rank .........................   Passed    6.41 sec
      Start 15: beam_in_vacuum_open_boundary.normalized.1Rank
15/20 Test #15: beam_in_vacuum_open_boundary.normalized.1Rank ...   Passed    5.27 sec
      Start 16: laser_evolution.SI.2Rank
16/20 Test #16: laser_evolution.SI.2Rank ........................   Passed   11.74 sec
      Start 17: laser_ionization.1Rank
17/20 Test #17: laser_ionization.1Rank ..........................   Passed    6.13 sec
      Start 18: laser_STC.1Rank
18/20 Test #18: laser_STC.1Rank .................................   Passed   69.42 sec
      Start 19: plasma_density_from_file.SI.1Rank
19/20 Test #19: plasma_density_from_file.SI.1Rank ...............   Passed    6.79 sec
      Start 20: transverse_benchmark.1Rank
20/20 Test #20: transverse_benchmark.1Rank ......................   Passed   10.54 sec

100% tests passed, 0 tests failed out of 20

Total Test time (real) = 207.80 sec
  • Small enough (< few 100s of lines), otherwise it should probably be split into smaller PRs
  • Tested (describe the tests in the PR description)
  • Runs on GPU (basic: the code compiles and run well with the new module)
  • Contains an automated test (checksum and/or comparison with theory)
  • Documented: all elements (classes and their members, functions, namespaces, etc.) are documented
  • Constified (All that can be const is const)
  • Code is clean (no unwanted comments, )
  • Style and code conventions are respected at the bottom of https://github.com/Hi-PACE/hipace
  • Proper label and GitHub project, if applicable

@AlexanderSinn AlexanderSinn added bug Something isn't working GPU Related to GPU acceleration labels Apr 8, 2026
@AlexanderSinn AlexanderSinn mentioned this pull request Apr 8, 2026
9 tasks
Copy link
Copy Markdown
Member

@MaxThevenet MaxThevenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@MaxThevenet MaxThevenet merged commit 206bc6b into Hi-PACE:development Apr 8, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working GPU Related to GPU acceleration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants