Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove that example: now a dupplicate of actor-execute
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 4 Dec 2017 23:28:13 +0000 (00:28 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 4 Dec 2017 23:41:51 +0000 (00:41 +0100)
.gitignore
examples/s4u/CMakeLists.txt
examples/s4u/README.doc
examples/s4u/actor-priority/s4u-actor-priority.cpp [deleted file]
examples/s4u/actor-priority/s4u-actor-priority.tesh [deleted file]
examples/s4u/actor-priority/s4u-actor-priority_d.xml [deleted file]

index 38cb127..d348d05 100644 (file)
@@ -188,7 +188,6 @@ examples/s4u/actor-execute/s4u-actor-execute
 examples/s4u/actor-kill/s4u-actor-kill
 examples/s4u/actor-lifetime/s4u-actor-lifetime
 examples/s4u/actor-migration/s4u-actor-migration
-examples/s4u/actor-priority/s4u-actor-priority
 examples/s4u/actor-suspend/s4u-actor-suspend
 examples/s4u/actor-yield/s4u-actor-yield
 examples/s4u/app-bittorrent/s4u-bittorrent
index 602bdf2..7a1b5f5 100644 (file)
@@ -1,5 +1,5 @@
 foreach (example actions-comm actions-storage 
-                 actor-create actor-daemon actor-execute actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-priority actor-yield
+                 actor-create actor-daemon actor-execute 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
                  energy-link energy-pstate energy-ptask
@@ -35,9 +35,7 @@ set(examples_src  ${examples_src}
 set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/energy-pstate/s4u-energy-pstate.tesh
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actor-priority/s4u-actor-priority.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime.tesh
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actor-priority/s4u-actor-priority.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/s4u-async-waitany.tesh
@@ -49,7 +47,6 @@ set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-a
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-storage/s4u-actions-storage_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-actor-create_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actor-priority/s4u-actor-priority_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/s4u-app-masterworker_d.xml
@@ -67,7 +64,7 @@ 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-priority actor-yield
+                actor-create actor-daemon actor-execute 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
                 dht-chord 
index 24feb51..62113f7 100644 (file)
@@ -89,11 +89,6 @@ TODO: document here the examples about plugins
     Actors can be suspended and resumed during their executions
     thanks to the @ref simgrid::s4u::Actor::suspend and @ref simgrid::s4u::Actor::resume methods.
 
-  - <b>Priority actors</b>.
-    @ref examples/s4u/actor-priority/s4u-actor-priority.cpp \n
-    Actors can be launched according their priorities thanks to the @ref
-    simgrid::s4u::this_actor::execute() method.
-
   - <b>Kill actors</b>.
     @ref examples/s4u/actor-kill/s4u-actor-kill.cpp \n
     Actors can forcefully stop other actors with the @ref
@@ -201,7 +196,6 @@ simulated storages.
 @example examples/s4u/actor-lifetime/s4u-actor-lifetime.cpp 
 @example examples/s4u/actor-lifetime/s4u-actor-lifetime_d.xml 
 @example examples/s4u/actor-migration/s4u-actor-migration.cpp
-@example examples/s4u/actor-priority/s4u-actor-priority.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
diff --git a/examples/s4u/actor-priority/s4u-actor-priority.cpp b/examples/s4u/actor-priority/s4u-actor-priority.cpp
deleted file mode 100644 (file)
index 1564f7e..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "simgrid/s4u.hpp"
-#include <cstdlib>
-#include <iostream>
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
-
-class test {
-  double computation_amount;
-  double priority;
-
-public:
-  explicit test(std::vector<std::string> args)
-{
-  computation_amount = std::stod(args[1]);
-  priority = std::stod(args[2]);
-}
-void operator()()
-{
-  XBT_INFO("Hello! Running an actor of size %g with priority %g", computation_amount, priority);
-  simgrid::s4u::this_actor::execute(computation_amount, priority);
-
-  XBT_INFO("Goodbye now!");
-}
-};
-
-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", argv[0], argv[0]);
-  
-  e.registerFunction<test>("test");
-
-  e.loadPlatform(argv[1]);
-  e.loadDeployment(argv[2]);
-
-  e.run();
-
-  return 0;
-}
diff --git a/examples/s4u/actor-priority/s4u-actor-priority.tesh b/examples/s4u/actor-priority/s4u-actor-priority.tesh
deleted file mode 100644 (file)
index 0ceab56..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#! ./tesh
-
-! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-actor-priority$EXEEXT ${platfdir}/small_platform.xml  s4u-actor-priority_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (1:test@Fafard) Hello! Running an actor of size 7.6296e+07 with priority 1
-> [  0.000000] (2:test@Fafard) Hello! Running an actor of size 7.6296e+07 with priority 2
-> [  1.500000] (2:test@Fafard) Goodbye now!
-> [  2.000000] (1:test@Fafard) Goodbye now!
diff --git a/examples/s4u/actor-priority/s4u-actor-priority_d.xml b/examples/s4u/actor-priority/s4u-actor-priority_d.xml
deleted file mode 100644 (file)
index 5d15f2b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4.1">
-  <actor host="Fafard" function="test">
-    <argument value="76296000"/>
-    <argument value="1.0"/>
-  </actor>
-  <actor host="Fafard" function="test">
-    <argument value="76296000"/>
-    <argument value="2.0"/>
-  </actor>
-</platform>