Conversation
The latest AMReX removed public access to Array4's begin/end members; use the lbound/ubound accessors instead. Note that ubound is inclusive where Array4::end was exclusive, so loop bounds and extent checks are adjusted accordingly.
AMReX 26.02 replaced Array4's public jstride/kstride/nstride members with a get_stride() accessor. Guard on AMREX_RELEASE_NUMBER so the code keeps compiling against older AMReX releases.
This was referenced Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AMReX 26.02 refactored
Array4into a specialization of the newArrayNDclass (AMReX-Codes/amrex#4900). This changed the public member API that CarpetX relies on:Dim3 begin/endmembers becameIntVectNDs, sovars.begin.xetc. no longer compile;jstride/kstride/nstridemembers were replaced by aget_stride<d>()accessor;requiresclauses, so building against AMReX ≥ 26.02 needs-std=c++20.Changes
amrex::lbound/amrex::uboundfree functions instead of thebegin/endmembers ininterpolate.cxx,io_tsv.cxx, andreduction.cxx. These functions exist in all AMReX versions, so this compiles against both old and new AMReX. Note thatuboundis inclusive while the oldendmember was exclusive; loop bounds and asserts are adjusted accordingly.Array4::get_stride()when building against AMReX ≥ 26.02, guarded byAMREX_RELEASE_NUMBER(the same pattern as the existing guard inCarpetX/src/fillpatch.cxx); the old stride members are kept for older AMReX.No behavior change is intended; this is a pure API adaptation.
Tests
Built and ran the CarpetX testsuite against AMReX 26.07 (g++, macOS), which exercises the new (
AMREX_RELEASE_NUMBER >= 260200) code path. The pre-26.02 code path inODESolversis textually unchanged and continues to compile against the AMReX shipped in the current CI containers.These changes were originally developed and CI-tested (CPU/CUDA/ROCm/oneAPI, real32/real64) in lwJi#103.