Skip to content

Don't use pragma omp simd in Deposition#1381

Merged
MaxThevenet merged 16 commits into
Hi-PACE:developmentfrom
AlexanderSinn:run_tests_on_macos_ci
Apr 22, 2026
Merged

Don't use pragma omp simd in Deposition#1381
MaxThevenet merged 16 commits into
Hi-PACE:developmentfrom
AlexanderSinn:run_tests_on_macos_ci

Conversation

@AlexanderSinn
Copy link
Copy Markdown
Member

@AlexanderSinn AlexanderSinn commented Apr 22, 2026

It looks like for MacOS, the beam deposition was vectorized with OMP. If particles deposit in the same cell, this would lead to incorrect results. Usually the compiler is not able to vectorize these functions, and we don't notice this.

Additionally, I fixed two cases where bool values were implicitly converted. This did not seem to affect results.

  • 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 changed the title Run Tests on MacOS CI Don't use pragma omp simd in Deposition Apr 22, 2026
@AlexanderSinn AlexanderSinn linked an issue Apr 22, 2026 that may be closed by this pull request
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.

Looks good, thanks!

@MaxThevenet MaxThevenet merged commit c5e3ea3 into Hi-PACE:development Apr 22, 2026
11 checks passed
@ax3l ax3l added the bug Something isn't working label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

beam_in_vacuum Tolerance too Tight?

3 participants