From df7e675f967229479b5eca4025697579197d609d Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 26 Jul 2024 19:22:17 -0400 Subject: [PATCH] if we have USE_GPU_PRINTF = TRUE, then fflush the output after burn (#2928) this will catch the prints from the burner that were added to Microphysics --- Source/reactions/Castro_react.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/reactions/Castro_react.cpp b/Source/reactions/Castro_react.cpp index 7fc8e069b9..ee9807dfb9 100644 --- a/Source/reactions/Castro_react.cpp +++ b/Source/reactions/Castro_react.cpp @@ -417,6 +417,11 @@ Castro::react_state(MultiFab& s, MultiFab& r, Real time, Real dt, const int stra #if defined(AMREX_USE_HIP) Gpu::streamSynchronize(); // otherwise HIP may fail to allocate the necessary resources. #endif + +#ifdef ALLOW_GPU_PRINTF + std::fflush(nullptr); +#endif + } #if defined(AMREX_USE_GPU) @@ -812,6 +817,11 @@ Castro::react_state(Real time, Real dt) #if defined(AMREX_USE_HIP) Gpu::streamSynchronize(); // otherwise HIP may fail to allocate the necessary resources. #endif + +#ifdef ALLOW_GPU_PRINTF + std::fflush(nullptr); +#endif + } #if defined(AMREX_USE_GPU)