From 4b2f6115522b21b13ba59228b63f58b9b9ad47d8 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Fri, 9 Feb 2024 18:07:39 -0500 Subject: [PATCH] streamSync for HIP only --- Source/reactions/Castro_react.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/reactions/Castro_react.cpp b/Source/reactions/Castro_react.cpp index 947ebd2753..f49efc9247 100644 --- a/Source/reactions/Castro_react.cpp +++ b/Source/reactions/Castro_react.cpp @@ -413,7 +413,9 @@ Castro::react_state(MultiFab& s, MultiFab& r, Real time, Real dt, const int stra #endif }); +#if defined(AMREX_USE_HIP) Gpu::streamSynchronize(); // otherwise HIP may faile to allocate the necessary resources. +#endif } #if defined(AMREX_USE_GPU) @@ -803,7 +805,9 @@ Castro::react_state(Real time, Real dt) #endif }); +#if defined(AMREX_USE_HIP) Gpu::streamSynchronize(); // otherwise HIP may faile to allocate the necessary resources. +#endif } #if defined(AMREX_USE_GPU)