Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[smpi] Flush output streams after the run too.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 13 Jan 2023 15:39:38 +0000 (16:39 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 13 Jan 2023 15:39:38 +0000 (16:39 +0100)
src/smpi/internals/smpi_global.cpp

index 61c4baa..13e44ca 100644 (file)
@@ -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));