Skip to content
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

ParticleTileData: No Restrict in Storage #3245

Merged

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Apr 7, 2023

Summary

Remove the restrict qualifier from GpuArray members in ParticleTileData. We see compilation problems with, among others Clang 14.0.6 and AppleClang, for this construct.

We expect that using restrict (AMREX_RESTRICT) on APIs as well as aliased pointers in these arrays before access should be sufficient to prevent that the compiler thinks that individual arrays alias each other in hot loops.

Additional background

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@ax3l ax3l requested review from atmyers and WeiqunZhang April 7, 2023 21:35
Remove the `restrict` qualifier from `GpuArray` members
in `ParticleTileData`. We see compilation problems with, among
others Clang 14.0.6 and AppleClang, for this construct.

We expect that using `restrict` (`AMREX_RESTRICT`) on APIs as
well as aliased pointers in these arrays before access should
be sufficient to prevent that the compiler thinks that individual
arrays alias each other in hot loops.
@ax3l ax3l force-pushed the topic-ptd-member-norestrict branch from cdd6877 to c49f78f Compare April 7, 2023 21:38
@WeiqunZhang WeiqunZhang merged commit cfc4c82 into AMReX-Codes:development Apr 7, 2023
@ax3l ax3l deleted the topic-ptd-member-norestrict branch April 7, 2023 23:36
guj pushed a commit to guj/amrex that referenced this pull request Jul 13, 2023
## Summary

Remove the `restrict` qualifier from `GpuArray` members in
`ParticleTileData`. We see compilation problems with, among others Clang
14.0.6 and AppleClang, for this construct.

We expect that using `restrict` (`AMREX_RESTRICT`) on APIs as well as
aliased pointers in these arrays before access should be sufficient to
prevent that the compiler thinks that individual arrays alias each other
in hot loops.

## Additional background

- WarpX build regressions since 23.03, e.g.,
  - conda-forge/warpx-feedstock#63
  - conda-forge/warpx-feedstock#64
  - ECP-WarpX/WarpX#3817
- independently, about to be remove in
AMReX-Codes#2878
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants