From: Arnaud Giersch Date: Fri, 13 Jan 2023 15:39:38 +0000 (+0100) Subject: [smpi] Flush output streams after the run too. X-Git-Tag: v3.34~635 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/82bfc97b965ef29ac728d4622d1d69a34aa2d124 [smpi] Flush output streams after the run too. --- diff --git a/src/smpi/internals/smpi_global.cpp b/src/smpi/internals/smpi_global.cpp index 61c4baab6d..13e44ca460 100644 --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@ -561,12 +561,15 @@ int smpi_main(const char* executable, int argc, char* argv[]) SMPI_app_instance_register(smpi_default_instance_name.c_str(), nullptr, rank_counts); MPI_COMM_WORLD = *smpi_deployment_comm_world(smpi_default_instance_name); - /* Clean IO before the run */ + /* Flush output streams before and after the run */ fflush(stdout); fflush(stderr); engine.get_impl()->run(-1); + fflush(stderr); + fflush(stdout); + xbt_os_walltimer_stop(global_timer); simgrid::smpi::utils::print_time_analysis(xbt_os_timer_elapsed(global_timer));