Skip to content

Commit

Permalink
if we have USE_GPU_PRINTF = TRUE, then fflush the output after burn
Browse files Browse the repository at this point in the history
this will catch the prints from the burner that were added to
Microphysics
  • Loading branch information
zingale committed Jul 26, 2024
1 parent 25afc9b commit d4b8622
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Source/reactions/Castro_react.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,13 @@ 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.
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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d4b8622

Please sign in to comment.