Skip to content

Use Array3 in HPMG solver#1345

Merged
MaxThevenet merged 9 commits intoHi-PACE:developmentfrom
AlexanderSinn:Use_Array3_in_HPMG
Mar 17, 2026
Merged

Use Array3 in HPMG solver#1345
MaxThevenet merged 9 commits intoHi-PACE:developmentfrom
AlexanderSinn:Use_Array3_in_HPMG

Conversation

@AlexanderSinn
Copy link
Copy Markdown
Member

Based on #1326

This PR replaces amrex::Array4 with Array3 as it has slightly more efficient indexing. Additionally, some tweaks are made to bottomsolve_gpu to get a speedup by solving the two independent components of system type 1 in two separate GPU blocks.

nx      speedup
255     16%
256     19%
1023    9%
1024    9%
4095    2%
4096    2%
  • 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 the performance optimization, benchmark, profiling, etc. label Jan 12, 2026
@MaxThevenet MaxThevenet self-requested a review February 23, 2026 10:29
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 this PR!

@MaxThevenet MaxThevenet merged commit 62bc15a into Hi-PACE:development Mar 17, 2026
11 checks passed
@AlexanderSinn AlexanderSinn deleted the Use_Array3_in_HPMG branch April 8, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance optimization, benchmark, profiling, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants