Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 19 May 2019 15:10:07 +0000 (17:10 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 19 May 2019 15:10:07 +0000 (17:10 +0200)
20 files changed:
examples/s4u/actor-exiting/s4u-actor-exiting.cpp
examples/s4u/actor-join/s4u-actor-join.cpp
examples/s4u/actor-kill/s4u-actor-kill.cpp
examples/s4u/actor-lifetime/s4u-actor-lifetime.cpp
examples/s4u/actor-migrate/s4u-actor-migrate.cpp
examples/s4u/actor-suspend/s4u-actor-suspend.cpp
examples/s4u/async-ready/s4u-async-ready.cpp
examples/s4u/async-wait/s4u-async-wait.cpp
examples/s4u/async-waitall/s4u-async-waitall.cpp
examples/s4u/async-waitany/s4u-async-waitany.cpp
examples/s4u/async-waituntil/s4u-async-waituntil.cpp
examples/s4u/dht-chord/s4u-dht-chord.cpp
examples/s4u/energy-exec/s4u-energy-exec.cpp
examples/s4u/energy-vm/s4u-energy-vm.cpp
examples/s4u/exec-basic/s4u-exec-basic.cpp
examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp
examples/s4u/maestro-set/s4u-maestro-set.cpp
examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp
examples/s4u/replay-comm/s4u-replay-comm.cpp
src/kernel/activity/ExecImpl.cpp

index 9895d9f..64cd981 100644 (file)
@@ -45,7 +45,7 @@ static void actor_b()
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]); /* - Load the platform description */
 
index d39512b..2be0244 100644 (file)
@@ -50,7 +50,7 @@ static void master()
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]);
 
index 3226e94..34ec395 100644 (file)
@@ -65,7 +65,7 @@ static void killer()
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]); /* - Load the platform description */
   /* - Create and deploy killer process, that will create the victim actors  */
index fb2990f..d73b509 100644 (file)
@@ -33,8 +33,9 @@ int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
 
-  xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
-                       "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+  xbt_assert(argc > 2,
+             "Usage: %s platform_file deployment_file\n"
+             "\tExample: %s ../platforms/cluster_backbone.xml ./s4u_actor_lifetime_d.xml\n",
              argv[0], argv[0]);
 
   e.load_platform(argv[1]); /* Load the platform description */
index 4faa4d6..c1b3608 100644 (file)
@@ -61,7 +61,7 @@ static void monitor()
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);
   e.load_platform(argv[1]);
 
   simgrid::s4u::Actor::create("monitor", simgrid::s4u::Host::by_name("Boivin"), monitor);
index 3a29577..3e1a93e 100644 (file)
@@ -70,7 +70,7 @@ static void dream_master()
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]); /* - Load the platform description */
   std::vector<simgrid::s4u::Host*> list = e.get_all_hosts();
index 1736753..d73f2ce 100644 (file)
@@ -23,7 +23,7 @@
 #include <iostream>
 #include <string>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_ready, "Messages specific for this s4u example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_async_ready, "Messages specific for this s4u example");
 
 static int peer(int argc, char** argv)
 {
index 2898edb..009c9fa 100644 (file)
@@ -16,7 +16,7 @@
 #include <iostream>
 #include <string>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_wait, "Messages specific for this s4u example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_async_wait, "Messages specific for this s4u example");
 
 static int sender(int argc, char** argv)
 {
index 0b6f83f..f23e55c 100644 (file)
@@ -17,7 +17,7 @@
 #include <iostream>
 #include <string>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_waitall, "Messages specific for this s4u example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_async_waitall, "Messages specific for this s4u example");
 
 class Sender {
   long messages_count;  /* - number of tasks */
index ca5c085..407b4e5 100644 (file)
@@ -22,7 +22,7 @@
 #include <iostream>
 #include <string>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_waitall, "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_async_waitall, "Messages specific for this s4u example");
 
 class Sender {
   long messages_count;  /* - number of tasks */
index f741f5a..3397408 100644 (file)
@@ -15,7 +15,7 @@
 #include <iostream>
 #include <string>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_wait, "Messages specific for this s4u example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_async_waituntil, "Messages specific for this s4u example");
 
 static int sender(int argc, char** argv)
 {
index 0b01f29..ca06eb4 100644 (file)
@@ -15,8 +15,9 @@ int timeout  = 50;
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc > 2, "Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n"
-                       "\tExample: %s ../msg_platform.xml chord.xml\n",
+  xbt_assert(argc > 2,
+             "Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n"
+             "\tExample: %s ../platforms/cluster_backbone.xml ./s4u-dht-chord_d.xml\n",
              argv[0], argv[0]);
   char** options = &argv[1];
   while (not strncmp(options[0], "-", 1)) {
index aae8e41..7e90219 100644 (file)
@@ -68,7 +68,7 @@ int main(int argc, char* argv[])
   sg_host_energy_plugin_init();
   simgrid::s4u::Engine e(&argc, argv);
 
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/energy_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]);
   simgrid::s4u::Actor::create("dvfs_test", simgrid::s4u::Host::by_name("MyHost1"), dvfs);
index 580a88b..81a8c19 100644 (file)
@@ -55,7 +55,7 @@ int main(int argc, char* argv[])
   sg_host_energy_plugin_init();
   simgrid::s4u::Engine e(&argc, argv);
 
-  xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s ../platforms/energy_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]);
 
index caee370..ba018ef 100644 (file)
@@ -38,7 +38,7 @@ static void privileged()
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]);
 
index 5fde1fd..8ae88ea 100644 (file)
@@ -50,7 +50,7 @@ int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
 
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/energy_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]);
 
index 3a9f24e..1088559 100644 (file)
@@ -70,7 +70,7 @@ int main(int argc, char* argv[])
 
   if (argc != 2) {
     XBT_CRITICAL("Usage: %s platform_file\n", argv[0]);
-    xbt_die("example: %s msg_platform.xml\n", argv[0]);
+    xbt_die("example: %s ../platforms/small_platform.xml\n", argv[0]);
   }
 
   e.load_platform(argv[1]);
index b78cfbf..a1e5f86 100644 (file)
@@ -88,7 +88,7 @@ int main(int argc, char* argv[])
   sg_host_load_plugin_init();
   simgrid::s4u::Engine e(&argc, argv);
 
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/energy_platform.xml\n", argv[0], argv[0]);
   e.load_platform(argv[1]);
 
   simgrid::s4u::Actor::create("load_test", simgrid::s4u::Host::by_name("MyHost1"), execute_load_test);
index 2b73587..95affd0 100644 (file)
@@ -81,11 +81,12 @@ int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
 
-  xbt_assert(argc > 2, "Usage: %s platform_file deployment_file [action_files]\n"
-                       "\t# if all actions are in the same file\n"
-                       "\tExample: %s msg_platform.xml msg_deployment.xml actions\n"
-                       "\t# if actions are in separate files, specified in deployment\n"
-                       "\tExample: %s msg_platform.xml msg_deployment.xml ",
+  xbt_assert(argc > 2,
+             "Usage: %s platform_file deployment_file [action_files]\n"
+             "\t# if all actions are in the same file\n"
+             "\tExample: %s platform.xml deployment.xml actions\n"
+             "\t# if actions are in separate files, specified in deployment\n"
+             "\tExample: %s platform.xml deployment.xml ",
              argv[0], argv[0], argv[0]);
 
   e.load_platform(argv[1]);
index e7d8a2c..5b60a57 100644 (file)
@@ -54,10 +54,7 @@ void simcall_HANDLER_execution_waitany_for(smx_simcall_t simcall, simgrid::kerne
   if (timeout < 0.0) {
     simcall->timer = nullptr;
   } else {
-    simcall->timer = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall]() {
-      simgrid::kernel::activity::ExecImpl** execs = simcall_execution_waitany_for__get__execs(simcall);
-      size_t count                                = simcall_execution_waitany_for__get__count(simcall);
-
+    simcall->timer = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall, execs, count]() {
       for (size_t i = 0; i < count; i++) {
         // Remove the first occurence of simcall:
         auto* exec = execs[i];