Skip to content

Update pyAMReX for AMReX PR #6225 - #641

Merged
ax3l merged 1 commit into
developmentfrom
array4-stride-n
Nov 13, 2026
Merged

ax3l merged 1 commit into
developmentfrom
array4-stride-n

Conversation

@atmyers

@atmyers atmyers commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

After AMReX PR #6225, the component stride lives at stride.n instead of stride.a[2].

With this change, pyamrex works with either the old or new AMReX, let me know if you want to require the new version instead.

@ax3l ax3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ty!

@ax3l
ax3l requested a balanced review from Copilot November 13, 2026 23:31
@ax3l ax3l added the component: third party Changes in pyAMReX that reflect a change in a third-party library label Nov 13, 2026
@ax3l

ax3l commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Thanks, yes forward update is totally fine as well and just bumping the AMReX version. But will merge as is for now 👍

@ax3l
ax3l merged commit 7cef6bb into development Nov 13, 2026
21 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the Array4 buffer-conversion compatibility update.

No open issues 🎉

What changed in this PR

Updates pyAMReX’s Array4 buffer conversion to support the component-stride layout introduced by AMReX PR #6225 while retaining compatibility with older AMReX versions.

Changes:

  • Detects stride.n at compile time, falling back to stride.a[2] for older versions.
  • Uses Long for the buffer-shape conversion when calculating component stride and clarifies the storage-layout comments.
File Description
src/​Base/​Array4.H Handles both component-stride layouts during buffer conversion.

Review effort: Balanced

@atmyers

atmyers commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Thanks!

@ax3l
ax3l deleted the array4-stride-n branch November 15, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: third party Changes in pyAMReX that reflect a change in a third-party library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants