Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Put stdout in line buffer mode for MCed apps.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 4 May 2021 20:08:58 +0000 (22:08 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 4 May 2021 20:09:37 +0000 (22:09 +0200)
The call to fflush before backtrack/exit is certainly superfluous now,
but it doesn't harm.

examples/smpi/mc/sendsend.tesh
src/mc/remote/AppSide.cpp

index b1f16be..4bb94f7 100644 (file)
@@ -8,11 +8,11 @@ $ ../../../smpi_script/bin/smpirun -quiet -wrapper "${bindir:=.}/../../../bin/si
 > Sent 1 to rank 0
 > rank 0 recv the data
 > rank 1 recv the data
+> Sent 0 to rank 1
 > [0.000000] [mc_safety/INFO] No property violation found.
 > [0.000000] [mc_safety/INFO] Expanded states = 7
 > [0.000000] [mc_safety/INFO] Visited states = 10
 > [0.000000] [mc_safety/INFO] Executed transitions = 8
-> Sent 0 to rank 1
 
 p Testing the paranoid model
 ! timeout 60
index 63b1c0a..d27c534 100644 (file)
@@ -43,6 +43,8 @@ AppSide* AppSide::initialize()
 
   _sg_do_model_check = 1;
 
+  setvbuf(stdout, NULL, _IOLBF, 0);
+
   // Fetch socket from MC_ENV_SOCKET_FD:
   const char* fd_env = std::getenv(MC_ENV_SOCKET_FD);
   int fd = xbt_str_parse_int(fd_env, "Variable '" MC_ENV_SOCKET_FD "' should contain a number but contains '%s'");