Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : new tesh examples about communications determinism verification
authorMarion Guthmuller <marion.guthmuller@inria.fr>
Tue, 3 Jun 2014 08:42:48 +0000 (10:42 +0200)
committerMarion Guthmuller <marion.guthmuller@inria.fr>
Tue, 3 Jun 2014 08:42:48 +0000 (10:42 +0200)
buildtools/Cmake/AddTests.cmake
examples/smpi/mc/non_deterministic.c
examples/smpi/mc/non_deterministic.tesh [new file with mode: 0644]
examples/smpi/mc/send_deterministic.c
examples/smpi/mc/send_deterministic.tesh [new file with mode: 0644]

index f57e826..304dc05 100644 (file)
@@ -445,6 +445,10 @@ IF(NOT enable_memcheck)
       ADD_TESH(smpi-tracing-ptp                  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/tracing/smpi_traced.tesh)
       ADD_TESH(smpi-replay                       --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/smpi_replay.tesh)
     ENDIF()
+    IF(HAVE_MC)
+      ADD_TESH(smpi-mc-non-determinism                  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/mc --cd ${CMAKE_BINARY_DIR}/examples/smpi/mc ${CMAKE_HOME_DIRECTORY}/examples/smpi/mc/non_deterministic.tesh)
+      ADD_TESH(smpi-mc-send-determinism                  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/mc --cd ${CMAKE_BINARY_DIR}/examples/smpi/mc ${CMAKE_HOME_DIRECTORY}/examples/smpi/mc/send_deterministic.tesh)
+    ENDIF()
     # END TESH TESTS
   ENDIF()
 
index 4a0c7dc..9df64c0 100644 (file)
@@ -32,20 +32,20 @@ int main(int argc, char **argv)
   }
 
   if (rank == 0) {
-    printf("MPI_ISend / MPI_IRecv Test \n");
+    //printf("MPI_ISend / MPI_IRecv Test \n");
 
     for(i=0; i < size - 1; i++){
       MPI_Recv(&recv_buff, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
-      printf("Message received from %d\n", recv_buff);
+      //printf("Message received from %d\n", recv_buff);
       MPI_Send(&recv_buff, 1, MPI_INT, status.MPI_SOURCE, 42, MPI_COMM_WORLD);
       // printf("Sent %d to rank %d\n", status.MPI_SOURCE);
     }
 
   }else{
     MPI_Send(&rank, 1, MPI_INT, 0, 42, MPI_COMM_WORLD);
-    printf("Sent %d to rank 0\n", rank);
+    //printf("Sent %d to rank 0\n", rank);
     MPI_Recv(&recv_buff, 1, MPI_INT, 0, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
-    printf("Message received from %d\n", recv_buff);
+    //printf("Message received from %d\n", recv_buff);
   }
 
   MPI_Finalize();
diff --git a/examples/smpi/mc/non_deterministic.tesh b/examples/smpi/mc/non_deterministic.tesh
new file mode 100644 (file)
index 0000000..f17c79f
--- /dev/null
@@ -0,0 +1,42 @@
+#! ./tesh
+
+! timeout 60
+$ ../../../smpi_script/bin/smpirun -hostfile ${srcdir:=.}/hostfile_non_deterministic  -platform ${srcdir:=.}/../../platforms/cluster.xml --cfg=model-check:1 --cfg=model-check/reduction:none --cfg=model-check/communications_determinism:1 --cfg=smpi/send_is_detached_thres:0 --cfg=smpi/running_power:1e9 ./non_deterministic
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-3'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'none'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/communications_determinism' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/send_is_detached_thres' to '0'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check communication determinism
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> [0.000000] [mc_comm_determinism/INFO] ****************************************************
+> [0.000000] [mc_comm_determinism/INFO] ***** Non-deterministic communications pattern *****
+> [0.000000] [mc_comm_determinism/INFO] ****************************************************
+> [0.000000] [mc_comm_determinism/INFO] Initial communications pattern:
+> [0.000000] [mc_comm_determinism/INFO] [(1) c-1.me <- (2) c-2.me] iRecv 
+> [0.000000] [mc_comm_determinism/INFO] [(2) c-2.me -> (1) c-1.me] iSend 
+> [0.000000] [mc_comm_determinism/INFO] [(1) c-1.me -> (2) c-2.me] iSend 
+> [0.000000] [mc_comm_determinism/INFO] [(2) c-2.me <- (1) c-1.me] iRecv 
+> [0.000000] [mc_comm_determinism/INFO] [(1) c-1.me <- (3) c-3.me] iRecv 
+> [0.000000] [mc_comm_determinism/INFO] [(3) c-3.me -> (1) c-1.me] iSend 
+> [0.000000] [mc_comm_determinism/INFO] [(1) c-1.me -> (3) c-3.me] iSend 
+> [0.000000] [mc_comm_determinism/INFO] [(3) c-3.me <- (1) c-1.me] iRecv 
+> [0.000000] [mc_comm_determinism/INFO] Communications pattern counter-example:
+> [0.000000] [mc_comm_determinism/INFO] [(1) c-1.me <- (3) c-3.me] iRecv 
+> [0.000000] [mc_comm_determinism/INFO] [(3) c-3.me -> (1) c-1.me] iSend 
+> [0.000000] [mc_comm_determinism/INFO] [(1) c-1.me -> (3) c-3.me] iSend 
+> [0.000000] [mc_comm_determinism/INFO] [(2) c-2.me -> (1) c-1.me] iSend 
+> [0.000000] [mc_comm_determinism/INFO] [(3) c-3.me <- (1) c-1.me] iRecv 
+> [0.000000] [mc_comm_determinism/INFO] [(1) c-1.me <- (2) c-2.me] iRecv 
+> [0.000000] [mc_comm_determinism/INFO] [(1) c-1.me -> (2) c-2.me] iSend 
+> [0.000000] [mc_comm_determinism/INFO] [(2) c-2.me <- (1) c-1.me] iRecv 
+> [0.000000] [mc_global/INFO] Expanded states = 16037
+> [0.000000] [mc_global/INFO] Visited states = 80801
+> [0.000000] [mc_global/INFO] Executed transitions = 76048
+> [0.000000] [mc_global/INFO] Communication-deterministic : No
index 048d75c..6406ce8 100644 (file)
@@ -32,16 +32,16 @@ int main(int argc, char **argv)
   }
 
   if (rank == 0) {
-    printf("MPI_ISend / MPI_IRecv Test \n");
+    //printf("MPI_ISend / MPI_IRecv Test \n");
 
     for(i=0; i < size - 1; i++){
       MPI_Recv(&recv_buff, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
-      printf("Message received from %d\n", recv_buff);
+      //printf("Message received from %d\n", recv_buff);
     }
 
   }else{
     MPI_Send(&rank, 1, MPI_INT, 0, 42, MPI_COMM_WORLD);
-    printf("Sent %d to rank 0\n", rank);
+    //printf("Sent %d to rank 0\n", rank);
   }
 
   MPI_Finalize();
diff --git a/examples/smpi/mc/send_deterministic.tesh b/examples/smpi/mc/send_deterministic.tesh
new file mode 100644 (file)
index 0000000..8531c03
--- /dev/null
@@ -0,0 +1,21 @@
+#! ./tesh
+
+! timeout 60
+$ ../../../smpi_script/bin/smpirun -hostfile ${srcdir:=.}/hostfile_send_deterministic  -platform ${srcdir:=.}/../../platforms/cluster.xml --cfg=model-check:1 --cfg=model-check/reduction:none --cfg=model-check/send_determinism:1 --cfg=smpi/send_is_detached_thres:0 --cfg=smpi/running_power:1e9 ./send_deterministic
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-3'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'none'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/send_determinism' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/send_is_detached_thres' to '0'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running_power' to '1e9'
+> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [mc_global/INFO] Check communication determinism
+> [0.000000] [mc_global/INFO] Get debug information ...
+> [0.000000] [mc_global/INFO] Get debug information done !
+> [0.000000] [mc_global/INFO] Expanded states = 520
+> [0.000000] [mc_global/INFO] Visited states = 1476
+> [0.000000] [mc_global/INFO] Executed transitions = 1312
+> [0.000000] [mc_global/INFO] Send-deterministic : Yes