Skip to content

Commit

Permalink
#810 flush DFL log before zipping
Browse files Browse the repository at this point in the history
closes #810

Signed-off-by: Florentine Rosiere <[email protected]>
  • Loading branch information
rosiereflo committed Jan 23, 2025
1 parent 5f5ab68 commit 5f4f742
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sources/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ static void execSimulation(boost::shared_ptr<dfl::Context> context, dfl::inputs:
LOG(info, InitEnd, elapsed(params.timeStart));
auto timeFilesStart = std::chrono::steady_clock::now();
context->exportOutputs();
DYN::Trace::resetPersistentCustomAppender(dfl::common::Log::getTag(), DYN::DEBUG); // to force flush to DynaFlowLauncher.log
LOG(info, FilesEnd, elapsed(timeFilesStart));

DYNAlgorithms::multiprocessing::Context::sync();
Expand Down Expand Up @@ -144,6 +143,8 @@ static void execSimulation(boost::shared_ptr<dfl::Context> context, dfl::inputs:
void dumpZipArchive(std::unordered_map<std::string, std::string> &mapOutputFilesData, boost::filesystem::path outputPath,
const dfl::common::Options::RuntimeConfiguration &runtimeConfig) {
DYNAlgorithms::multiprocessing::Context &mpiContext = DYNAlgorithms::multiprocessing::context();
DYN::Trace::resetPersistentCustomAppender(dfl::common::Log::getTag(),
DYN::Trace::severityLevelFromString(runtimeConfig.dynawoLogLevel)); // to force flush to DynaFlowLauncher.log
mpiContext.sync();
if (mpiContext.isRootProc()) {
bool outputIsZip = !runtimeConfig.zipArchivePath.empty();
Expand Down

0 comments on commit 5f4f742

Please sign in to comment.