Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add the capacity the update the priority of an I/O during its execution
[simgrid.git] / examples / cpp / CMakeLists.txt
index 15af769..a09d9cf 100644 (file)
@@ -20,7 +20,8 @@ if(WIN32)
   set(_maestro-set_disable 1)
 endif()
 
-foreach (example mc-bugged1 mc-bugged2 mc-failing-assert mc-electric-fence)
+set(MC_regular_tests mc-bugged1 mc-bugged2 mc-failing-assert mc-electric-fence)
+foreach (example ${MC_regular_tests})
   if(NOT SIMGRID_HAVE_MC)
     set(_${example}_disable 1)
   endif()
@@ -31,18 +32,18 @@ if(SIMGRID_HAVE_MC)
    add_executable       (s4u-mc-bugged1-liveness  EXCLUDE_FROM_ALL mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp)
    target_link_libraries(s4u-mc-bugged1-liveness  simgrid)
    set_target_properties(s4u-mc-bugged1-liveness PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness)
-   add_dependencies(tests s4u-mc-bugged1-liveness)
+   add_dependencies(tests-mc s4u-mc-bugged1-liveness)
+
   if(HAVE_C_STACK_CLEANER)
     add_executable       (s4u-mc-bugged1-liveness-cleaner-on  EXCLUDE_FROM_ALL s4u-mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp)
     target_link_libraries(s4u-mc-bugged1-liveness-cleaner-on  simgrid)
     set_target_properties(s4u-mc-bugged1-liveness-cleaner-on  PROPERTIES COMPILE_FLAGS "-DGARBAGE_STACK -fstack-cleaner")
-    add_dependencies(tests s4u-mc-bugged1-liveness-cleaner-on)
+    add_dependencies(tests-mc s4u-mc-bugged1-liveness-cleaner-on)
 
     add_executable       (s4u-mc-bugged1-liveness-cleaner-off EXCLUDE_FROM_ALL s4u-mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp)
     target_link_libraries(s4u-mc-bugged1-liveness-cleaner-off simgrid)
     set_target_properties(s4u-mc-bugged1-liveness-cleaner-off PROPERTIES COMPILE_FLAGS "-DGARBAGE_STACK -fno-stack-cleaner")
-    add_dependencies(tests s4u-mc-bugged1-liveness-cleaner-off)
+    add_dependencies(tests-mc s4u-mc-bugged1-liveness-cleaner-off)
   endif()
 endif()
 
@@ -62,23 +63,24 @@ endif()
 foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill
                  actor-lifetime actor-migrate actor-suspend actor-yield actor-stacksize
                  app-bittorrent app-chainsend app-token-ring
-                 comm-pingpong comm-ready comm-suspend comm-wait comm-waitany comm-waitall comm-waituntil
-                 comm-dependent comm-host2host
+                 comm-pingpong comm-ready comm-serialize comm-suspend comm-wait comm-waitany comm-waitall comm-waituntil
+                 comm-dependent comm-host2host comm-failure
                  cloud-capping cloud-migration cloud-simple
                  dht-chord dht-kademlia
                  energy-exec energy-boot energy-link energy-vm energy-exec-ptask energy-wifi
                  engine-filtering
                  exec-async exec-basic exec-dvfs exec-remote exec-waitany exec-waitfor exec-dependent exec-unassigned
-                 exec-ptask exec-ptask-multicore
+                 exec-ptask-multicore exec-cpu-nonlinear exec-cpu-factors exec-failure
                  maestro-set
                  mc-bugged1 mc-bugged2 mc-electric-fence mc-failing-assert
                                 network-wifi
-                 io-async io-file-system io-file-remote io-disk-raw io-dependent
+                 io-async io-priority io-degradation io-file-system io-file-remote io-disk-raw io-dependent
                  platform-failures platform-profile platform-properties
-                 plugin-host-load plugin-link-load
+                 plugin-host-load plugin-link-load plugin-prodcons
                  replay-comm replay-io
                  routing-get-clusters
-                 synchro-barrier synchro-condition-variable synchro-condition-variable-waituntil synchro-mutex synchro-semaphore)
+                 synchro-barrier synchro-condition-variable synchro-condition-variable-waituntil synchro-mutex synchro-semaphore
+                 clusters-multicpu network-factors network-nonlinear)
 
   # Use default source file unless specified otherwise
   if(NOT DEFINED _${example}_sources)
@@ -88,6 +90,7 @@ foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill
   if(NOT DEFINED _${example}_disable)
     add_executable       (s4u-${example} EXCLUDE_FROM_ALL ${_${example}_sources})
     add_dependencies     (tests s4u-${example})
+    add_dependencies     (s4u-${example} platf_cpp)
     target_link_libraries(s4u-${example} simgrid)
     set_target_properties(s4u-${example} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${example})
 
@@ -99,6 +102,7 @@ foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill
 
     ADD_TESH_FACTORIES(s4u-${example} "${_${example}_factories}"
                                       --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example}
+                                      --setenv libdir=${CMAKE_BINARY_DIR}/lib
                                       --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
                                       --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example}
                                       ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh)
@@ -121,7 +125,7 @@ endforeach()
 ###################
 
 # MASTERWORKERS EXAMPLE
-foreach(variant fun class) 
+foreach(variant fun class)
   add_executable       (s4u-app-masterworkers-${variant} EXCLUDE_FROM_ALL app-masterworkers/s4u-app-masterworkers-${variant}.cpp)
   target_link_libraries(s4u-app-masterworkers-${variant} simgrid)
   set_target_properties(s4u-app-masterworkers-${variant} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-masterworkers)
@@ -131,23 +135,32 @@ foreach(variant fun class)
 endforeach()
 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworkers/s4u-app-masterworkers.tesh)
 
-# Model-checking liveness
+# Model-checking
 if(SIMGRID_HAVE_MC)
+  foreach (example ${MC_regular_tests})
+    if(NOT DEFINED _${example}_disable)
+      add_dependencies(tests-mc s4u-${example})
+    endif()
+  endforeach()
+
+  # Model-checking liveness
   IF(HAVE_UCONTEXT_CONTEXTS AND SIMGRID_PROCESSOR_x86_64) # liveness model-checking works only on 64bits (for now ...)
-    ADD_TESH(s4u-mc-bugged1-liveness-ucontext     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness 
-                                                  --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
+    add_dependencies(tests-mc s4u-mc-bugged1-liveness)
+    ADD_TESH(s4u-mc-bugged1-liveness-ucontext     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness
+                                                  --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
                                                   --cd ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness
                                                   ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness.tesh)
 
 # This example hit the 5' timeout on CI, disable it for now
-#    ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness 
-#                                                      --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
+#    ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness
+#                                                      --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
 #                                                      --cd ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness
 #                                                       ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh)
     IF(HAVE_C_STACK_CLEANER)
+      add_dependencies(tests-mc s4u-mc-bugged1-liveness-stack-cleaner)
       # This test checks if the stack cleaner is making a difference:
       ADD_TEST(s4u-mc-bugged1-liveness-stack-cleaner ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness-stack-cleaner
-                                                     ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/ 
+                                                     ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/
                                                      ${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness/)
     ENDIF()
   ENDIF()
@@ -167,13 +180,13 @@ else()
   set(parallel-factories "*")
 endif()
 
-foreach(example app-bittorrent app-masterworkers 
+foreach(example app-bittorrent app-masterworkers
                 dht-chord dht-kademlia
                 )
   ADD_TESH_FACTORIES(s4u-${example}-parallel "${parallel-factories}" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO}
-                                             --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} 
-                                             --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
-                                             --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} 
+                                             --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example}
+                                             --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
+                                             --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example}
                                              ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh)
 endforeach()
 
@@ -193,7 +206,7 @@ endif()
 # Examples not accepting factories
 ##################################
 
-foreach (example trace-categories trace-masterworkers trace-platform trace-process-migration
+foreach (example exec-ptask trace-categories trace-masterworkers trace-platform trace-process-migration
                  trace-host-user-variables trace-link-user-variables trace-route-user-variables)
   add_executable       (s4u-${example} EXCLUDE_FROM_ALL ${example}/s4u-${example}.cpp)
   target_link_libraries(s4u-${example} simgrid)
@@ -202,10 +215,10 @@ foreach (example trace-categories trace-masterworkers trace-platform trace-proce
 
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.tesh)
   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.cpp)
-  
+
   ADD_TESH(s4u-${example} --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example}
                           --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}/${example}
-                          --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
+                          --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
                           --cd ${CMAKE_CURRENT_BINARY_DIR}/${example}
                           ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh)
 endforeach()
@@ -226,7 +239,7 @@ endif()
 # Add all extra files to the archive
 ####################################
 set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/s4u-network-ns3.cpp              
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/s4u-network-ns3.cpp
                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3-wifi/s4u-network-ns3-wifi.cpp              PARENT_SCOPE)
 set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/simix-breakpoint.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness.tesh