From b40ea065c282fee88394c22dda63e983748bb9f7 Mon Sep 17 00:00:00 2001 From: Ben Prather Date: Mon, 27 Nov 2023 11:15:02 -0500 Subject: [PATCH] Fix hang at startup/first output in KHARMA downstream --- src/outputs/outputs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/outputs/outputs.cpp b/src/outputs/outputs.cpp index 33b35a24f284..066e4b8c898a 100644 --- a/src/outputs/outputs.cpp +++ b/src/outputs/outputs.cpp @@ -414,6 +414,7 @@ void OutputType::ClearOutputData() { void Outputs::MakeOutputs(Mesh *pm, ParameterInput *pin, SimTime *tm, const SignalHandler::OutputSignal signal) { Kokkos::Profiling::pushRegion("MakeOutputs"); + MPI_Barrier(MPI_COMM_WORLD); bool first = true; OutputType *ptype = pfirst_type_; while (ptype != nullptr) { @@ -429,6 +430,7 @@ void Outputs::MakeOutputs(Mesh *pm, ParameterInput *pin, SimTime *tm, } ptype = ptype->pnext_type; // move to next OutputType node in singly linked list } + MPI_Barrier(MPI_COMM_WORLD); Kokkos::Profiling::popRegion(); // MakeOutputs }