Isolated from BLAST-WarpX/warpx#6801
There seems to be a destructor ordering issue on GPU for external_stream_stack.
[...] finalization can crash in amrex::Gpu::Device::Finalize() when it synchronizes streams whose backing C++ static objects (external_stream_stack) have already been destroyed.
We did not get a user-reported reproducer yet, but my guess is that this appears when a users loads a
- GPU-aware
mpi4py that calls MPI_Init or
- a GPU library like
cupy/dpnp
before amrex::Initialize() (importing WarpX in our case).
Isolated from BLAST-WarpX/warpx#6801
There seems to be a destructor ordering issue on GPU for
external_stream_stack.We did not get a user-reported reproducer yet, but my guess is that this appears when a users loads a
mpi4pythat callsMPI_Initorcupy/dpnpbefore
amrex::Initialize()(importing WarpX in our case).