Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
teshsuite: drop a test that is superseeded by a public example
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 12 Nov 2019 14:27:47 +0000 (15:27 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 12 Nov 2019 14:27:47 +0000 (15:27 +0100)
teshsuite/s4u/CMakeLists.txt
teshsuite/s4u/actor-migration/actor-migration.cpp [deleted file]
teshsuite/s4u/actor-migration/actor-migration.tesh [deleted file]

index 2109376..464fb57 100644 (file)
@@ -1,4 +1,4 @@
-foreach(x actor actor-autorestart actor-migration
+foreach(x actor actor-autorestart
         activity-lifecycle
         comm-pt2pt wait-any-for
         cloud-interrupt-migration cloud-sharing
@@ -13,7 +13,7 @@ endforeach()
 
 ## Add the tests.
 ## Some need to be run with all factories, some need not tesh to run
-foreach(x actor actor-autorestart actor-migration 
+foreach(x actor actor-autorestart
         activity-lifecycle wait-any-for
        cloud-interrupt-migration concurrent_rw) # TODO: actor-autorestart is disabled for now
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
diff --git a/teshsuite/s4u/actor-migration/actor-migration.cpp b/teshsuite/s4u/actor-migration/actor-migration.cpp
deleted file mode 100644 (file)
index 28e1a3e..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (c) 2018-2019. 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"
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_migration, "Messages specific for this s4u example");
-
-simgrid::s4u::Barrier* barrier;
-static simgrid::s4u::ActorPtr controlled_process;
-
-/* The Emigrant process will be moved from host to host. */
-static void emigrant()
-{
-  XBT_INFO("I'll look for a new job on another machine ('Boivin') where the grass is greener.");
-  simgrid::s4u::this_actor::set_host(
-      simgrid::s4u::Host::by_name("Boivin")); /* - First, move to another host by myself */
-
-  XBT_INFO("Yeah, found something to do");
-  simgrid::s4u::this_actor::execute(98095000); /* - Execute some work there */
-  simgrid::s4u::this_actor::sleep_for(2);
-  XBT_INFO("Moving back home after work");
-  simgrid::s4u::this_actor::set_host(simgrid::s4u::Host::by_name("Jacquelin")); /* - Move back to original location */
-  simgrid::s4u::this_actor::set_host(simgrid::s4u::Host::by_name("Boivin")); /* - Go back to the other host to sleep*/
-  simgrid::s4u::this_actor::sleep_for(4);
-  controlled_process = simgrid::s4u::Actor::self(); /* - Get controlled at checkpoint */
-  barrier->wait();
-  simgrid::s4u::this_actor::suspend();
-  simgrid::s4u::Host* h = simgrid::s4u::this_actor::get_host();
-  XBT_INFO("I've been moved on this new host: %s", h->get_cname());
-  XBT_INFO("Uh, nothing to do here. Stopping now");
-}
-
-/* The policeman check for emigrants and move them back to 'Jacquelin' */
-static void policeman()
-{
-  XBT_INFO("Wait at the checkpoint."); /* - block on the mutex+condition */
-  barrier->wait();
-  controlled_process->set_host(simgrid::s4u::Host::by_name("Jacquelin")); /* - Move an emigrant to Jacquelin */
-  XBT_INFO("I moved the emigrant");
-  controlled_process->resume();
-}
-
-int main(int argc, char* argv[])
-{
-  simgrid::s4u::Engine e(&argc, argv);
-  e.load_platform(argv[1]);
-
-  simgrid::s4u::Actor::create("emigrant", simgrid::s4u::Host::by_name("Jacquelin"), emigrant);
-  simgrid::s4u::Actor::create("policeman", simgrid::s4u::Host::by_name("Boivin"), policeman);
-
-  barrier = new simgrid::s4u::Barrier(2);
-  e.run();
-  XBT_INFO("Simulation time %g", e.get_clock());
-  delete barrier;
-
-  return 0;
-}
diff --git a/teshsuite/s4u/actor-migration/actor-migration.tesh b/teshsuite/s4u/actor-migration/actor-migration.tesh
deleted file mode 100644 (file)
index 2dcf6e5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env tesh
-
-p Testing the migration feature of S4U
-
-! output sort 19
-$ ${bindir:=.}/actor-migration ${platfdir:=.}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (1:emigrant@Jacquelin) I'll look for a new job on another machine ('Boivin') where the grass is greener.
-> [  0.000000] (1:emigrant@Boivin) Yeah, found something to do
-> [  0.000000] (2:policeman@Boivin) Wait at the checkpoint.
-> [  3.000000] (1:emigrant@Boivin) Moving back home after work
-> [  7.000000] (0:maestro@) Simulation time 7
-> [  7.000000] (1:emigrant@Jacquelin) I've been moved on this new host: Jacquelin
-> [  7.000000] (1:emigrant@Jacquelin) Uh, nothing to do here. Stopping now
-> [  7.000000] (2:policeman@Boivin) I moved the emigrant