Skip to content

Fix: GPU runs w/o GPU-Aware MPI#1532

Open
ax3l wants to merge 4 commits into
BLAST-ImpactX:developmentfrom
ax3l:fix-reductions-no-gpu-aware-mpi
Open

Fix: GPU runs w/o GPU-Aware MPI#1532
ax3l wants to merge 4 commits into
BLAST-ImpactX:developmentfrom
ax3l:fix-reductions-no-gpu-aware-mpi

Conversation

@ax3l

@ax3l ax3l commented Jun 25, 2026

Copy link
Copy Markdown
Member

A few of our reductions in collective effects where assuming we have GPU-aware MPI support. In some cases, eg., conda-forge desktop MPICH this is not the case and crashes. This adds the conditional d2h copies before speaking to MPI in those cases.

@ax3l ax3l added bug Something isn't working backend: cuda Specific to CUDA execution (GPUs) backend: sycl Specific to DPC++/SYCL execution (CPUs/GPUs) backend: hip Specific to ROCm execution (GPUs) bug: affects latest release Bug also exists in latest release version component: third party Changes in ImpactX that reflect a change in a third-party library component: space charge Space charge & potential solver component: CSR coherent synchrotron radiation models labels Jun 25, 2026
@ax3l ax3l force-pushed the fix-reductions-no-gpu-aware-mpi branch 2 times, most recently from 60d0afe to 80b383c Compare June 25, 2026 19:29
@codspeed-hq

codspeed-hq Bot commented Jun 25, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 57 untouched benchmarks


Comparing ax3l:fix-reductions-no-gpu-aware-mpi (5c6a0f8) with development (dec896f)

Open in CodSpeed

Comment thread src/particles/wakefields/ChargeBinning.cpp Outdated
A few of our reductions in collective effects where assuming
we have GPU-aware MPI support. In some cases, eg., conda-forge
desktop MPICH this is not the case and crashes. This adds
the conditional d2h copies before speaking to MPI in those
cases.
@ax3l ax3l force-pushed the fix-reductions-no-gpu-aware-mpi branch from 80b383c to dde4e84 Compare June 25, 2026 23:17
Comment thread src/particles/wakefields/ChargeBinning.H Outdated
Comment thread src/particles/wakefields/ChargeBinning.cpp Outdated
WeiqunZhang pushed a commit to AMReX-Codes/amrex that referenced this pull request Jun 27, 2026
## 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
- [x] 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 WeiqunZhang and cemitch99 June 27, 2026 03:32
@ax3l ax3l changed the title Fix: GPU runs w/o GPU-Aware MPI Fix: GPU runs w/o GPU-UnAware MPI Jun 27, 2026
@ax3l ax3l changed the title Fix: GPU runs w/o GPU-UnAware MPI Fix: GPU runs w/o GPU-Aware MPI Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend: cuda Specific to CUDA execution (GPUs) backend: hip Specific to ROCm execution (GPUs) backend: sycl Specific to DPC++/SYCL execution (CPUs/GPUs) bug: affects latest release Bug also exists in latest release version bug Something isn't working component: CSR coherent synchrotron radiation models component: space charge Space charge & potential solver component: third party Changes in ImpactX that reflect a change in a third-party library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant