Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reactivate an umpire test, once disabled in 56fefe1bf81ca.
[simgrid.git] / teshsuite / smpi / isp / umpire / CMakeLists.txt
index 6cb426b..1ae81f8 100644 (file)
@@ -1,10 +1,6 @@
 # See http://formalverification.cs.utah.edu/ISP_Tests/
 
 set(umpire_tests_passing
-  any_src-can-deadlock
-  any_src-can-deadlock2
-  any_src-can-deadlock3
-  any_src-deadlock
   change-send-buffer
   comm-dup-no-error
   comm-dup-no-free
@@ -32,27 +28,31 @@ set(umpire_tests_passing
   no-error-wait-any_src3
   no-error-wait-any_src4
   no-error-waitany-any_src
-  partial-recv
   sendrecv-deadlock
   send-recv-ok
-  waitall-deadlock
-  waitany-deadlock
-  wait-deadlock
+  irecv-isend-ok
+  lost-request-waitall
+  partial-recv
  ) # Passing (no deadlock) tests
-set(umpire_tests_failing
+
+set(umpire_tests_passing_broken
+  irecv-isend-ok2
+  )
+
+# These are supposed to deadlock but ISP does not find deadlock
+# and we don't either. What should be test here?
+set(umpire_tests_missed_deadlock
+  any_src-deadlock
+  any_src-can-deadlock
+  any_src-can-deadlock2
+  any_src-can-deadlock3
+  )
+
+set(umpire_tests_deadlock
   any_src-can-deadlock10
-  any_src-can-deadlock10_mod
-  any_src-can-deadlock11
   any_src-can-deadlock4
-  any_src-can-deadlock4_mod
   any_src-can-deadlock5
-  any_src-can-deadlock5_mod
   any_src-can-deadlock6
-  any_src-can-deadlock6_mod
-  any_src-can-deadlock7
-  any_src-can-deadlock8
-  any_src-can-deadlock9
   any_src-waitall-deadlock
   any_src-waitall-deadlock2
   any_src-waitall-deadlock3
@@ -66,25 +66,35 @@ set(umpire_tests_failing
   basic-deadlock-comm_split
   bcast-deadlock
   collective-misorder
-  collective-misorder2
   collective-misorder-allreduce
-  comm-bcast-deadlock
-  comm-deadlock
   complex-deadlock
-  dropped-req
   finalize-deadlock
   irecv-deadlock
-  irecv-isend-ok
-  irecv-isend-ok2
-  lost-request-waitall
-
+  waitall-deadlock
+  waitany-deadlock
+  wait-deadlock
  ) # failing (deadlocking) tests
-set(umpire_tests_problematic
-  deadlock-config # No deadlock detected by ISP unless MPI_Send blocking activated
 
+# Compile but run those tests:
+set(umpire_tests_deadlock_broken
+  any_src-can-deadlock10_mod
+  any_src-can-deadlock4_mod
+  any_src-can-deadlock5_mod
+  any_src-can-deadlock6_mod
+  any_src-can-deadlock7
+  any_src-can-deadlock8
+  any_src-can-deadlock9
+  any_src-can-deadlock11
+  collective-misorder2
+  comm-bcast-deadlock
+  dropped-req
+  comm-deadlock
+)
+
+set(umpire_tests_problematic
+  deadlock-config # No deadlock detected by ISP unless MPI_Send blocking activated
  ) # problematic tests
+
  # These files are not listed on http://formalverification.cs.utah.edu/ISP_Tests/
 set(umpire_src_other
   abort1.c
@@ -122,11 +132,11 @@ set(umpire_src_other
   intercomm_merge-deadlock.c
   lost-request2.c
   lost-request3.c
-  lost-request.c  
+  lost-request.c
   no-error4-any_src.c
   no-error4.c
   no-error-derived-comms.c
-    
+
   no-error-persistent-all-completions.c
   no-error-persistent.c
   no-error-persistent-test.c
@@ -135,14 +145,14 @@ set(umpire_src_other
   no-error-probe-any_src.c
   no-error-probe-any_tag.c
   no-error-probe.c
-  
-  no-error-wait2.c # Does not compile.
+
+  no-error-wait2.c # Does not compile.
   no-error-waitall-any_src2.c
   no-error-waitall-any_src3.c
   no-error-waitall-any_src.c
   no-error-waitall.c
   no-error-waitany2.c
-  
+
   op-no-error.c
   op-no-free.c
   partial-recv-exhaustive.c
@@ -169,62 +179,61 @@ set(umpire_src_other
   type-no-free-exhaustive.c
   )
 
-# Add every file to the archive
-###############################
-
-set(sources "")
-foreach(s ${umpire_src_other})
-  set(sources ${sources} ${CMAKE_CURRENT_SOURCE_DIR}/${s})
-endforeach()
+# Add these files to the archive
+#################
 
-foreach(file ${umpire_tests_passing} ${umpire_tests_failing} ${umpire_tests_problematic}  ) 
+set(sources "${CMAKE_CURRENT_SOURCE_DIR}/README")
+foreach(file ${umpire_src_other})
   set(sources ${sources} ${CMAKE_CURRENT_SOURCE_DIR}/${file})
 endforeach()
 
+foreach(file
+    ${umpire_tests_passing}  ${umpire_tests_passing_broken}
+    ${umpire_tests_deadlock} ${umpire_tests_deadlock_broken} ${umpire_tests_missed_deadlock}
+    ${umpire_tests_problematic}
+    ${umpire_tests_ignored} )
+  set(sources ${sources} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c)
+endforeach()
+set(txt_files ${txt_files} ${sources} PARENT_SCOPE)
 
 # Build the tests
 #################
 
-set(umpire_tesh "")
-# set(examples_src ${examples_src} ${sources} PARENT_SCOPE)
-set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/README PARENT_SCOPE)
-# set(EXTRA_DIST ${EXTRA_DIST} ${CMAKE_CURRENT_SOURCE_DIR}/no-error-wait2.c PARENT_SCOPE)
-# set(tesh_files ${tesh_files} ${umpire_tesh} PARENT_SCOPE)
-
-if(enable_smpi AND enable_smpi_ISP_testsuite)
+if(enable_smpi AND enable_model-checking AND enable_smpi_ISP_testsuite)
   set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
   set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
-  set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
-  foreach (test ${umpire_tests_passing} ${umpire_tests_failing} ${umpire_tests_problematic} )
-    add_executable(${test} ${test}.c)
+  foreach (test ${umpire_tests_passing} ${umpire_tests_deadlock} ${umpire_tests_problematic} )
+    add_executable(${test} EXCLUDE_FROM_ALL ${test}.c)
+    add_dependencies(tests ${test})
     target_link_libraries(${test} simgrid)
-    set_source_files_properties(${test}.c PROPERTIES COMPILE_FLAGS "-Wno-error")
+    set_source_files_properties(${test}.c PROPERTIES COMPILE_FLAGS "-Dlint -Wno-error -Wno-return-type")
     set(umpire_tesh ${umpire_tesh} ${test})
     set(files_to_clean ${files_to_clean} ${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh)
   endforeach(test)
-  
-  foreach (test ${umpire_tests_passing} )
+
+  # TODO, what should we do about ${umpire_tests_missed_deadlock}?
+
+  foreach (test ${umpire_tests_passing})
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! timeout 30")
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! output display" APPEND)
-    write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
+    write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../smpi_script/bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/host-speed:1e9 --cfg=smpi/coll-selector:ompi \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
   endforeach()
 
-  foreach (test ${umpire_tests_failing} ${umpire_tests_problematic} )
+  foreach (test ${umpire_tests_deadlock} ${umpire_tests_problematic} )
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! timeout 30"     )
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! expect return 3" APPEND)
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! output display"  APPEND)
-    write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
+    write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../smpi_script/bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/host-speed:1e9 --cfg=smpi/coll-selector:ompi \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
   endforeach()
 endif()
 
 # Erase all tesh files on cleanup: they are generated anyway
 set_directory_properties ( PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${files_to_clean}" )
 
-if(enable_smpi AND enable_smpi_ISP_testsuite)
+if(enable_smpi AND enable_model-checking AND enable_smpi_ISP_testsuite)
   foreach (tesh ${umpire_tesh})
     ADD_TESH(mc-umpire-${tesh}
       --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}