Skip to content

Parallel Reduce Overloads for DeviceVector#5516

Merged
WeiqunZhang merged 4 commits into
AMReX-Codes:developmentfrom
ax3l:topic-gpu-un-aware-parallel-reduce
Jun 27, 2026
Merged

Parallel Reduce Overloads for DeviceVector#5516
WeiqunZhang merged 4 commits into
AMReX-Codes:developmentfrom
ax3l:topic-gpu-un-aware-parallel-reduce

Conversation

@ax3l

@ax3l ax3l commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Adds a new header AMReX_GpuParallelReduce.H which GPU-overloaded and support for MPIs with and without GPU-awareness (GPU-pointer support) in a safe manner.

Additional background

Added to prevent common usage bugs like
BLAST-ImpactX/impactx#1532

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

Adds a new header `AMReX_GpuParallelReduce.H` which GPU-overloaded
and support for MPIs with and without GPU-awareness (GPU-pointer
support) in a safe manner.
Added to prevent common usage bugs like
BLAST-ImpactX/impactx#1532
@ax3l ax3l requested a review from WeiqunZhang June 26, 2026 17:25
@ax3l ax3l force-pushed the topic-gpu-un-aware-parallel-reduce branch from e0d658c to 67654d7 Compare June 26, 2026 17:38
@ax3l

ax3l commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

/run-hpsf-gitlab-ci

@github-actions

Copy link
Copy Markdown

GitLab CI has started at https://gitlab.spack.io/amrex/amrex/-/pipelines/1664602.

@ax3l ax3l requested a review from atmyers June 26, 2026 17:39
@ax3l ax3l force-pushed the topic-gpu-un-aware-parallel-reduce branch from 67654d7 to 0538ff4 Compare June 26, 2026 17:44
@amrex-gitlab-ci-reporter

Copy link
Copy Markdown

GitLab CI 1664602 finished with status: success. See details at https://gitlab.spack.io/amrex/amrex/-/pipelines/1664602.

@ax3l

ax3l commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

Unrelated test failure in GNU@13 3D Debug Fortran [tests], will restart:

      Start 72: LinearSolvers_NodeTensorLap_3d
72/81 Test #72: LinearSolvers_NodeTensorLap_3d ..................***Failed   15.94 sec
Initializing AMReX (26.06)...
MPI initialized with 2 MPI processes
MPI initialized with thread support level 0
AMReX (26.06) initialized
MLMG: # of AMR levels: 1
      # of MG levels on the coarsest AMR level: 7
MLMG: Initial rhs               = 172.9154691
MLMG: Initial residual (resid0) = 44849.99183
MLMG: Iteration   1 Fine resid/resid0 = 0.02025997706
MLMG: Iteration   2 Fine resid/resid0 = 0.001572036055
MLMG: Iteration   3 Fine resid/resid0 = 0.0001244702566
MLMG: Iteration   4 Fine resid/resid0 = 1.009954306e-05
MLMG: Iteration   5 Fine resid/resid0 = 8.37759707e-07
MLMG: Iteration   6 Fine resid/resid0 = 7.087673307e-08
MLMG: Iteration   7 Fine resid/resid0 = 6.099877431e-09
MLMG: Iteration   8 Fine resid/resid0 = 5.326637399e-10
MLMG: Iteration   9 Fine resid/resid0 = 4.708424764e-11
MLMG: Iteration  10 Fine resid/resid0 = 4.204271835e-12
MLMG: Final Iter. 10 resid, resid/resid0 = 1.885615575e-07, 4.204271835e-12
MLMG: Timers: Solve = 8.163485814 Iter = 7.99826611 Bottom = 0.000278109
Level 0
    max-norm: 0.000282219024
    1-norm  : 4.939185926e-05
amrex::Error::1::VisMF::Write failed !!!
SIGABRT
See Backtrace.1 file for details
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 1 in communicator MPI_COMM_WORLD
with errorcode 6.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

Comment thread Src/Base/AMReX_GpuParallelReduce.H Outdated
Comment thread Src/Base/AMReX_GpuParallelReduce.H Outdated
Comment thread Src/Base/AMReX_GpuParallelReduce.H Outdated
@ax3l

ax3l commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

/run-hpsf-gitlab-ci

@github-actions

Copy link
Copy Markdown

GitLab CI has started at https://gitlab.spack.io/amrex/amrex/-/pipelines/1665058.

Comment thread Src/Base/AMReX_GpuParallelReduce.H Outdated
@ax3l ax3l force-pushed the topic-gpu-un-aware-parallel-reduce branch from c24bb3f to 379d038 Compare June 26, 2026 22:38
@amrex-gitlab-ci-reporter

Copy link
Copy Markdown

GitLab CI 1665058 finished with status: success. See details at https://gitlab.spack.io/amrex/amrex/-/pipelines/1665058.

@WeiqunZhang WeiqunZhang merged commit 5fbc49b into AMReX-Codes:development Jun 27, 2026
73 checks passed
@ax3l ax3l deleted the topic-gpu-un-aware-parallel-reduce branch June 27, 2026 03:24
ax3l added a commit to ax3l/impactx that referenced this pull request Jun 27, 2026
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