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

Bins: Index Type int #3684

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Bins: Index Type int #3684

merged 2 commits into from
Aug 6, 2024

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Dec 23, 2023

Summary

For performance reasons, int/long are better index types since they do not have over/underflow checks and thus vectorize better.

Also, I see narrowing warnings casting from int to AMReX' unsigned int in WarpX.

Additional background

Seen with clang-tidy in ECP-WarpX/WarpX#3850

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 changed the title Bins: Index Type int Bins: Index Type long Dec 23, 2023
@ax3l ax3l changed the title Bins: Index Type long Bins: Index Type int Dec 23, 2023
@ax3l ax3l added the warning label Dec 23, 2023
@ax3l ax3l force-pushed the bins-int branch 2 times, most recently from 202255a to 3dd5932 Compare January 5, 2024 22:34
@atmyers
Copy link
Member

atmyers commented Jul 22, 2024

Hi @ax3l - this looks good to me - could you fix the conflicts, then we'll merge?

ax3l added 2 commits July 30, 2024 15:04
For performance reasons, `int` are better index types since
they do not have over/underflow checks and thus vectorize better.

Also, I see narrowing warnings casting from `int` to AMReX'
`unsigned int` in WarpX.
@ax3l
Copy link
Member Author

ax3l commented Jul 30, 2024

Let us merge this after 24.08 is out of the door.

I will post an update to WarpX with the weekly update: ECP-WarpX/WarpX#5102

ax3l added a commit to ax3l/WarpX that referenced this pull request Jul 30, 2024
Binning functions are refactored from `unsigned int` to `int`
in AMReX-Codes/amrex#3684 for performance
reasons. This updates our usage to reflect the changes.
@atmyers atmyers merged commit 6f039ae into AMReX-Codes:development Aug 6, 2024
71 of 72 checks passed
@ax3l ax3l deleted the bins-int branch August 11, 2024 03:00
ax3l added a commit to ax3l/WarpX that referenced this pull request Aug 11, 2024
Binning functions are refactored from `unsigned int` to `int`
in AMReX-Codes/amrex#3684 for performance
reasons. This updates our usage to reflect the changes.
ax3l added a commit to ax3l/WarpX that referenced this pull request Aug 12, 2024
Binning functions are refactored from `unsigned int` to `int`
in AMReX-Codes/amrex#3684 for performance
reasons. This updates our usage to reflect the changes.
ax3l added a commit to ax3l/WarpX that referenced this pull request Aug 14, 2024
Binning functions are refactored from `unsigned int` to `int`
in AMReX-Codes/amrex#3684 for performance
reasons. This updates our usage to reflect the changes.
ax3l added a commit to ax3l/WarpX that referenced this pull request Aug 14, 2024
Binning functions are refactored from `unsigned int` to `int`
in AMReX-Codes/amrex#3684 for performance
reasons. This updates our usage to reflect the changes.
ax3l added a commit to ax3l/WarpX that referenced this pull request Aug 15, 2024
Binning functions are refactored from `unsigned int` to `int`
in AMReX-Codes/amrex#3684 for performance
reasons. This updates our usage to reflect the changes.
ax3l added a commit to ax3l/WarpX that referenced this pull request Aug 16, 2024
Binning functions are refactored from `unsigned int` to `int`
in AMReX-Codes/amrex#3684 for performance
reasons. This updates our usage to reflect the changes.
ax3l added a commit to ax3l/WarpX that referenced this pull request Aug 16, 2024
Binning functions are refactored from `unsigned int` to `int`
in AMReX-Codes/amrex#3684 for performance
reasons. This updates our usage to reflect the changes.
ax3l added a commit to ECP-WarpX/WarpX that referenced this pull request Aug 16, 2024
* AMReX: Weekly Update

* pyAMReX: Weekly Update

* AMReX: `int` Index Type for Bins

Binning functions are refactored from `unsigned int` to `int`
in AMReX-Codes/amrex#3684 for performance
reasons. This updates our usage to reflect the changes.

* `ref_ratios.size()` -> `max_level`

Address a breaking change in AMReX.

* Update ThetaImplicitPicard_1d,SemiImplicitPicard_1d

AMReX default change: `amr.max_grid_size` is 64 from 32 now.

Since these tests are run with 2 MPI ranks, ensure we have at least
one box per MPI rank.
Instead of 20=40/2 set again to 32, to keep checksums the same.
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