Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sort examples, improve doc
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 9 Dec 2017 17:05:14 +0000 (18:05 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 9 Dec 2017 17:05:14 +0000 (18:05 +0100)
examples/msg/CMakeLists.txt
examples/s4u/CMakeLists.txt
examples/s4u/README.doc
examples/s4u/exec-basic/s4u-exec-basic.cpp [moved from examples/s4u/actor-execute/s4u-actor-execute.cpp with 98% similarity]
examples/s4u/exec-basic/s4u-exec-basic.tesh [moved from examples/s4u/actor-execute/s4u-actor-execute.tesh with 63% similarity]
teshsuite/msg/CMakeLists.txt
teshsuite/msg/task-priority/task-priority.c [moved from examples/msg/task-priority/task-priority.c with 79% similarity]
teshsuite/msg/task-priority/task-priority.tesh [moved from examples/msg/task-priority/task-priority.tesh with 100% similarity]
teshsuite/msg/task-priority/task-priority_d.xml [moved from examples/msg/task-priority/task-priority_d.xml with 100% similarity]

index d630d38..e5af2d8 100644 (file)
@@ -2,7 +2,6 @@
 foreach(x app-masterworker app-pingpong app-token-ring 
           cloud-capping cloud-masterworker cloud-migration cloud-simple cloud-two-tasks
           dht-pastry energy-consumption energy-onoff energy-vm platform-failures 
-          task-priority 
           plugin-hostload
           process-create process-join
           synchro-semaphore trace-categories 
@@ -44,7 +43,7 @@ foreach (file answer dht-kademlia node routing_table task)
   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.h)
 endforeach()
 
-foreach (file app-chainsend app-masterworker app-pingpong dht-kademlia dht-pastry task-priority)
+foreach (file app-chainsend app-masterworker app-pingpong dht-kademlia dht-pastry)
   set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/${file}/${file}_d.xml)
 endforeach()
 
@@ -73,7 +72,7 @@ set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/a
 
 foreach(x app-chainsend app-masterworker app-pingpong app-token-ring
           cloud-capping cloud-masterworker cloud-migration cloud-simple 
-          cloud-two-tasks dht-pastry dht-kademlia platform-failures task-priority
+          cloud-two-tasks dht-pastry dht-kademlia platform-failures
           energy-consumption energy-onoff energy-vm
           plugin-hostload
           process-create process-join
index eda4aa1..30c2570 100644 (file)
@@ -1,9 +1,10 @@
 foreach (example actions-comm actions-storage 
-                 actor-create actor-daemon actor-execute actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
+                 actor-create actor-daemon actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
                  app-masterworker app-pingpong app-token-ring
                  async-wait async-waitany async-waitall
                  cloud-progress-monitor
                  energy-link energy-pstate energy-ptask energy-vm
+                exec-basic
                  execute-priority
                  io-file-system io-file-remote io-storage-raw
                  platform-properties plugin-hostload mutex)
@@ -42,7 +43,7 @@ set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u
                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/s4u-async-waitany.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall.tesh
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actor-execute/s4u-actor-execute.tesh       
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/exec-basic/s4u-exec-basic.tesh
                   PARENT_SCOPE)
 set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-actions-comm-split_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-actions-comm_d.xml
@@ -66,13 +67,13 @@ set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-a
                                   ${CMAKE_CURRENT_SOURCE_DIR}/README.doc                                   PARENT_SCOPE)
 
 foreach(example actions-comm actions-storage 
-                actor-create actor-daemon actor-execute actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
+                actor-create actor-daemon actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
                 app-bittorrent app-masterworker app-pingpong app-token-ring 
                 async-wait async-waitall async-waitany
                 cloud-progress-monitor
                 dht-chord 
                 energy-link energy-pstate energy-ptask energy-vm
-                execute-priority
+                exec-basic execute-priority
                 platform-properties plugin-hostload mutex
                 io-file-system io-file-remote io-storage-raw)
   ADD_TESH_FACTORIES(s4u-${example} "thread;ucontext;raw;boost" 
index 8828fe5..7b80891 100644 (file)
@@ -69,7 +69,7 @@ TODO: document here the examples about plugins
 @subsection s4u_ex_activity_exec Executions (using the CPU)
 
   - <b>Basic execution</b>.
-    @ref examples/s4u/actor-execute/s4u-actor-execute.cpp \n
+    @ref examples/s4u/exec-basic/s4u-exec-basic.cpp \n
     The computations done in your program are not reported to the
     simulated world, unless you explicitely request the simulator to pause
     the actor until a given amount of flops gets computed on its simulated
@@ -212,7 +212,6 @@ respective advantages, depending on what you want to model.
 @example examples/s4u/actor-create/s4u-actor-create.cpp
 @example examples/s4u/actor-create/s4u-actor-create_d.xml
 @example examples/s4u/actor-daemon/s4u-actor-daemon.cpp
-@example examples/s4u/actor-execute/s4u-actor-execute.cpp
 @example examples/s4u/actor-join/s4u-actor-join.cpp
 @example examples/s4u/actor-kill/s4u-actor-kill.cpp
 @example examples/s4u/actor-lifetime/s4u-actor-lifetime.cpp 
@@ -220,12 +219,13 @@ respective advantages, depending on what you want to model.
 @example examples/s4u/actor-migration/s4u-actor-migration.cpp
 @example examples/s4u/actor-suspend/s4u-actor-suspend.cpp
 @example examples/s4u/actor-yield/s4u-actor-yield.cpp
-@example examples/s4u/app-token-ring/s4u-app-token-ring.cpp
-@example examples/s4u/app-masterworker/s4u-app-masterworker.cpp
-@example examples/s4u/app-pingpong/s4u-app-pingpong.cpp
 @example examples/s4u/async-wait/s4u-async-wait.cpp
 @example examples/s4u/async-waitall/s4u-async-waitall.cpp
 @example examples/s4u/async-waitany/s4u-async-waitany.cpp
+@example examples/s4u/exec-basic/s4u-exec-basic.cpp
+@example examples/s4u/app-token-ring/s4u-app-token-ring.cpp
+@example examples/s4u/app-masterworker/s4u-app-masterworker.cpp
+@example examples/s4u/app-pingpong/s4u-app-pingpong.cpp
 @example examples/s4u/energy-pstate/s4u-energy-pstate.cpp
 @example examples/s4u/io-file-system/s4u-io-file-system.cpp
 @example examples/s4u/io-file-remote/s4u-io-file-remote.cpp
@@ -37,7 +37,7 @@ static int privileged(std::vector<std::string> /*args*/)
   return 0;
 }
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
   std::vector<std::string> args;
@@ -1,6 +1,6 @@
 #! ./tesh
 
 p Start remote processes 
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-actor-execute$EXEEXT ${platfdir}/small_platform.xml 
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-exec-basic$EXEEXT ${platfdir}/small_platform.xml 
 > [Tremblay:privileged:(2) 0.001500] [s4u_test/INFO] Done.
 > [Tremblay:executor:(1) 0.002000] [s4u_test/INFO] Done.
index 513493d..6d11ad4 100644 (file)
@@ -5,6 +5,7 @@ foreach(x actions-comm actions-storage
           process-daemon process-kill process-lifetime process-migration process-suspend process-yield
           energy-ptask energy-pstate platform-properties
           io-file io-raw-storage io-file-remote
+         task-priority
           trace_integration)
   add_executable       (${x}  ${x}/${x}.c)
   target_link_libraries(${x}  simgrid)
@@ -56,6 +57,7 @@ set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/acti
                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/start_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/start_kill_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-yield/process-yield_d.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/task-priority/task-priority_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp1.0-hbp1.0.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp3.0-hbp4.0.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.5-hbp1.5.xml
similarity index 79%
rename from examples/msg/task-priority/task-priority.c
rename to teshsuite/msg/task-priority/task-priority.c
index a162ffe..d8abdb6 100644 (file)
@@ -6,10 +6,10 @@
 #include "simgrid/msg.h"
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
-static int test(int argc, char *argv[])
+static int test(int argc, charargv[])
 {
   double computation_amount = xbt_str_parse_double(argv[1], "Invalid argument: %s");
-  double priority = xbt_str_parse_double(argv[2], "Invalid argument: %s");
+  double priority           = xbt_str_parse_double(argv[2], "Invalid argument: %s");
 
   XBT_INFO("Hello! Running a task of size %g with priority %g", computation_amount, priority);
   msg_task_t task = MSG_task_create("Task", computation_amount, 0.0, NULL);
@@ -22,11 +22,12 @@ static int test(int argc, char *argv[])
   return 0;
 }
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   MSG_init(&argc, argv);
   xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-             "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
+                       "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+             argv[0], argv[0]);
 
   MSG_create_environment(argv[1]);
   MSG_function_register("test", test);