Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[MSG/Replay] Delete old msg/replay code
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Tue, 20 Mar 2018 09:48:36 +0000 (10:48 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 28 Mar 2018 15:33:50 +0000 (17:33 +0200)
16 files changed:
.gitignore
doc/doxygen/inside_cmake.doc
src/msg/msg_actions.cpp [deleted file]
teshsuite/msg/CMakeLists.txt
teshsuite/msg/actions-comm/actions-comm.c [deleted file]
teshsuite/msg/actions-comm/actions-comm.tesh [deleted file]
teshsuite/msg/actions-comm/actions-comm.txt [deleted file]
teshsuite/msg/actions-comm/actions-comm_d.xml [deleted file]
teshsuite/msg/actions-comm/actions-comm_split_d.xml [deleted file]
teshsuite/msg/actions-comm/actions-comm_split_p0.txt [deleted file]
teshsuite/msg/actions-comm/actions-comm_split_p1.txt [deleted file]
teshsuite/msg/actions-storage/actions-storage.c [deleted file]
teshsuite/msg/actions-storage/actions-storage.tesh [deleted file]
teshsuite/msg/actions-storage/actions-storage.txt [deleted file]
teshsuite/msg/actions-storage/actions-storage_d.xml [deleted file]
tools/cmake/DefinePackages.cmake

index 9e66b05..39e7b55 100644 (file)
@@ -221,8 +221,6 @@ teshsuite/mc/dwarf-expression/dwarf-expression
 teshsuite/mc/mutex-handling/mutex-handling
 teshsuite/mc/mutex-handling/without-mutex-handling
 teshsuite/mc/random-bug/random-bug
 teshsuite/mc/mutex-handling/mutex-handling
 teshsuite/mc/mutex-handling/without-mutex-handling
 teshsuite/mc/random-bug/random-bug
-teshsuite/msg/actions-comm/actions-comm
-teshsuite/msg/actions-storage/actions-storage
 teshsuite/msg/app-bittorrent/bittorrent
 teshsuite/msg/app-chainsend/chainsend
 teshsuite/msg/app-pingpong/app-pingpong
 teshsuite/msg/app-bittorrent/bittorrent
 teshsuite/msg/app-chainsend/chainsend
 teshsuite/msg/app-pingpong/app-pingpong
index 3124c78..f1e570f 100644 (file)
@@ -77,7 +77,7 @@ instance, examples/msg/CMakeLists.txt starts with a loop over all the (currently
  - add the source and tesh files to the distribution.
 
 \verbatim
  - add the source and tesh files to the distribution.
 
 \verbatim
-foreach(x actions-comm actions-storage app-masterworker app-pingpong app-pmm app-token-ring async-wait async-waitall 
+foreach(x app-masterworker app-pingpong app-pmm app-token-ring async-wait async-waitall 
           async-waitany cloud-capping cloud-masterworker cloud-migration cloud-multicore cloud-simple 
           cloud-two-tasks dht-chord dht-pastry energy-consumption energy-onoff energy-pstate energy-ptask energy-vm
           platform-failures io-file io-remote io-storage task-priority process-create process-kill process-migration 
           async-waitany cloud-capping cloud-masterworker cloud-migration cloud-multicore cloud-simple 
           cloud-two-tasks dht-chord dht-pastry energy-consumption energy-onoff energy-pstate energy-ptask energy-vm
           platform-failures io-file io-remote io-storage task-priority process-create process-kill process-migration 
@@ -108,7 +108,7 @@ If your example require a deployment file (see @ref deployment for details), nam
 Then add the name of your example to this foreach loop.
 
 \verbatim
 Then add the name of your example to this foreach loop.
 
 \verbatim
-foreach (file actions-comm actions-storage app-bittorrent app-chainsend app-masterworker app-pingpong async-wait
+foreach (file app-bittorrent app-chainsend app-masterworker app-pingpong async-wait
          async-waitall async-waitany dht-chord dht-kademlia dht-pastry io-remote platform-properties maestro-set 
          task-priority)
   set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/${file}/${file}_d.xml)
          async-waitall async-waitany dht-chord dht-kademlia dht-pastry io-remote platform-properties maestro-set 
          task-priority)
   set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/${file}/${file}_d.xml)
@@ -119,7 +119,7 @@ If your example includes extra source, text, XML, or tesh files, add them to the
 example to the testing infrastructure. See \ref inside_tests_add_integration for more details.
 
 \verbatim
 example to the testing infrastructure. See \ref inside_tests_add_integration for more details.
 
 \verbatim
-foreach(x actions-comm actions-storage app-bittorrent app-chainsend app-masterworker app-pingpong app-token-ring
+foreach(x app-bittorrent app-chainsend app-masterworker app-pingpong app-token-ring
           async-wait async-waitall async-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple 
           cloud-two-tasks dht-chord dht-kademlia platform-failures io-file io-remote io-storage task-priority 
           process-kill process-migration process-suspend platform-properties synchro-semaphore process-startkilltime)
           async-wait async-waitall async-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple 
           cloud-two-tasks dht-chord dht-kademlia platform-failures io-file io-remote io-storage task-priority 
           process-kill process-migration process-suspend platform-properties synchro-semaphore process-startkilltime)
diff --git a/src/msg/msg_actions.cpp b/src/msg/msg_actions.cpp
deleted file mode 100644 (file)
index 7377183..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (c) 2009-2018. 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 "src/msg/msg_private.hpp"
-#include "xbt/replay.hpp"
-
-#include <cerrno>
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_action, msg, "MSG actions for trace driven simulation");
-
-void MSG_action_init()
-{
-  MSG_function_register_default(simgrid::xbt::replay_runner);
-}
-
-void MSG_action_exit()
-{
-  // Nothing to do anymore here
-}
-
-/** \ingroup msg_trace_driven
- * \brief A trace loader
- *
- *  If path!=nullptr, load a trace file containing actions, and execute them.
- *  Else, assume that each process gets the path in its deployment file
- */
-msg_error_t MSG_action_trace_run(char *path)
-{
-  if (path) {
-    simgrid::xbt::action_fs = new std::ifstream(path, std::ifstream::in);
-  }
-
-  msg_error_t res = MSG_main();
-
-  if (not simgrid::xbt::action_queues.empty()) {
-    XBT_WARN("Not all actions got consumed. If the simulation ended successfully (without deadlock),"
-             " you may want to add new processes to your deployment file.");
-
-    for (auto const& actions_of : simgrid::xbt::action_queues) {
-      XBT_WARN("Still %zu actions for %s", actions_of.second->size(), actions_of.first.c_str());
-    }
-  }
-
-  if (path) {
-    delete simgrid::xbt::action_fs;
-    simgrid::xbt::action_fs = nullptr;
-  }
-
-  return res;
-}
index 49155a3..1cc6511 100644 (file)
@@ -1,6 +1,5 @@
 # C examples
 # C examples
-foreach(x actions-comm actions-storage
-          app-pingpong app-token-ring
+foreach(x app-pingpong app-token-ring
           async-wait async-waitall async-waitany
           cloud-capping cloud-migration cloud-sharing cloud-two-tasks cloud-simple
           get_sender host_on_off host_on_off_recv host_on_off_processes          
           async-wait async-waitall async-waitany
           cloud-capping cloud-migration cloud-sharing cloud-two-tasks cloud-simple
           get_sender host_on_off host_on_off_recv host_on_off_processes          
@@ -48,14 +47,7 @@ set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/ap
                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend.tesh
                                    PARENT_SCOPE)
 set(bin_files    ${bin_files}      ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/generate.py                  PARENT_SCOPE)
                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend.tesh
                                    PARENT_SCOPE)
 set(bin_files    ${bin_files}      ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/generate.py                  PARENT_SCOPE)
-set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm.txt
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm_split_p0.txt
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm_split_p1.txt
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-storage/actions-storage.txt         PARENT_SCOPE)
-set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm_d.xml
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm_split_d.xml
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-storage/actions-storage_d.xml
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent_d.xml
+set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/app-pingpong_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/app-pingpong_d.xml
                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait_d.xml
@@ -86,7 +78,6 @@ set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/acti
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp2.5-hbp1.5.xml    PARENT_SCOPE)
 
 foreach(x 
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp2.5-hbp1.5.xml    PARENT_SCOPE)
 
 foreach(x 
-    actions-comm actions-storage
     async-wait async-waitall async-waitany
     app-bittorrent app-chainsend app-pingpong app-token-ring
     cloud-capping cloud-migration cloud-two-tasks cloud-simple
     async-wait async-waitall async-waitany
     app-bittorrent app-chainsend app-pingpong app-token-ring
     cloud-capping cloud-migration cloud-two-tasks cloud-simple
diff --git a/teshsuite/msg/actions-comm/actions-comm.c b/teshsuite/msg/actions-comm/actions-comm.c
deleted file mode 100644 (file)
index a19af38..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-/* Copyright (c) 2009-2018. 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/msg.h>
-#include <xbt/replay.hpp>
-
-#include <stdio.h> /* snprintf */
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(actions, "Messages specific for this msg example");
-int communicator_size = 0;
-
-static void action_Isend(const char* const* action);
-
-typedef struct {
-  int last_Irecv_sender_id;
-  int bcast_counter;
-  xbt_dynar_t isends; /* of msg_comm_t */
-  /* Used to implement irecv+wait */
-  xbt_dynar_t irecvs; /* of msg_comm_t */
-  xbt_dynar_t tasks;  /* of msg_task_t */
-} s_process_globals_t;
-
-typedef s_process_globals_t* process_globals_t;
-
-/* Helper function */
-static double parse_double(const char* string)
-{
-  double value;
-  char* endptr;
-
-  value = strtod(string, &endptr);
-  if (*endptr != '\0')
-    THROWF(unknown_error, 0, "%s is not a double", string);
-  return value;
-}
-
-#define ACT_DEBUG(...)                                                                                                 \
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) {                                                          \
-    char* NAME = xbt_str_join_array(action, " ");                                                                      \
-    XBT_DEBUG(__VA_ARGS__);                                                                                            \
-    xbt_free(NAME);                                                                                                    \
-  } else                                                                                                               \
-  ((void)0)
-
-static void log_action(const char* const* action, double date)
-{
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) {
-    char* name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, date);
-    xbt_free(name);
-  }
-}
-
-static void asynchronous_cleanup(void)
-{
-  process_globals_t globals = (process_globals_t)MSG_process_get_data(MSG_process_self());
-
-  /* Destroy any isend which correspond to completed communications */
-  msg_comm_t comm;
-  while (1 /*true*/) {
-    int pos_found = MSG_comm_testany(globals->isends);
-    if (pos_found == -1) /* none remaining */
-      break;
-    xbt_dynar_remove_at(globals->isends, pos_found, &comm);
-    MSG_comm_destroy(comm);
-  }
-}
-
-/* My actions */
-static void action_send(const char* const* action)
-{
-  char to[250];
-  const char* size_str = action[3];
-  double size          = parse_double(size_str);
-  double clock         = MSG_get_clock();
-
-  snprintf(to, 249, "%s_%s", MSG_process_get_name(MSG_process_self()), action[2]);
-
-  ACT_DEBUG("Entering Send: %s (size: %g)", NAME, size);
-  if (size < 65536) {
-    action_Isend(action);
-  } else {
-    MSG_task_send(MSG_task_create(to, 0, size, NULL), to);
-  }
-
-  log_action(action, MSG_get_clock() - clock);
-  asynchronous_cleanup();
-}
-
-static void action_Isend(const char* const* action)
-{
-  char to[250];
-  const char* size          = action[3];
-  double clock              = MSG_get_clock();
-  process_globals_t globals = (process_globals_t)MSG_process_get_data(MSG_process_self());
-
-  snprintf(to, 249, "%s_%s", MSG_process_get_name(MSG_process_self()), action[2]);
-  msg_comm_t comm = MSG_task_isend(MSG_task_create(to, 0, parse_double(size), NULL), to);
-  xbt_dynar_push(globals->isends, &comm);
-
-  XBT_DEBUG("Isend on %s", MSG_process_get_name(MSG_process_self()));
-  log_action(action, MSG_get_clock() - clock);
-  asynchronous_cleanup();
-}
-
-static void action_recv(const char* const* action)
-{
-  char mailbox_name[250];
-  msg_task_t task = NULL;
-  double clock    = MSG_get_clock();
-
-  snprintf(mailbox_name, 249, "%s_%s", action[2], MSG_process_get_name(MSG_process_self()));
-
-  ACT_DEBUG("Receiving: %s", NAME);
-  msg_error_t res = MSG_task_receive(&task, mailbox_name);
-  log_action(action, MSG_get_clock() - clock);
-
-  if (res == MSG_OK) {
-    MSG_task_destroy(task);
-  }
-  asynchronous_cleanup();
-}
-
-static void action_Irecv(const char* const* action)
-{
-  char mailbox[250];
-  double clock              = MSG_get_clock();
-  process_globals_t globals = (process_globals_t)MSG_process_get_data(MSG_process_self());
-
-  XBT_DEBUG("Irecv on %s", MSG_process_get_name(MSG_process_self()));
-
-  snprintf(mailbox, 249, "%s_%s", action[2], MSG_process_get_name(MSG_process_self()));
-  msg_task_t t = NULL;
-  xbt_dynar_push(globals->tasks, &t);
-  msg_comm_t c = MSG_task_irecv(xbt_dynar_get_ptr(globals->tasks, xbt_dynar_length(globals->tasks) - 1), mailbox);
-  xbt_dynar_push(globals->irecvs, &c);
-
-  log_action(action, MSG_get_clock() - clock);
-  asynchronous_cleanup();
-}
-
-static void action_wait(const char* const* action)
-{
-  msg_task_t task = NULL;
-  msg_comm_t comm;
-  double clock              = MSG_get_clock();
-  process_globals_t globals = (process_globals_t)MSG_process_get_data(MSG_process_self());
-
-  xbt_assert(xbt_dynar_length(globals->irecvs), "action wait not preceded by any irecv: %s",
-             xbt_str_join_array(action, " "));
-
-  ACT_DEBUG("Entering %s", NAME);
-  comm = xbt_dynar_pop_as(globals->irecvs, msg_comm_t);
-  MSG_comm_wait(comm, -1);
-  task = xbt_dynar_pop_as(globals->tasks, msg_task_t);
-  MSG_comm_destroy(comm);
-  MSG_task_destroy(task);
-
-  log_action(action, MSG_get_clock() - clock);
-}
-
-/* FIXME: that's a poor man's implementation: we should take the message exchanges into account */
-static void action_barrier(const char* const* action)
-{
-  static msg_bar_t barrier           = NULL;
-  static int processes_arrived_sofar = 0;
-
-  if (barrier == NULL) {                                    // first arriving on the barrier
-    msg_bar_t newbar = MSG_barrier_init(communicator_size); // This is a simcall, unscheduling the current process
-    if (barrier == NULL)                                    // Still null, commit our new value
-      barrier = newbar;
-    else // some other process commited a new barrier before me, so dismiss mine
-      MSG_barrier_destroy(newbar);
-  }
-
-  processes_arrived_sofar++;
-  MSG_barrier_wait(barrier);
-
-  ACT_DEBUG("Exiting barrier: %s", NAME);
-
-  processes_arrived_sofar--;
-  if (processes_arrived_sofar <= 0) {
-    MSG_barrier_destroy(barrier);
-    barrier = NULL;
-  }
-}
-
-static void action_bcast(const char* const* action)
-{
-  char mailbox[80];
-  double comm_size = parse_double(action[2]);
-  msg_task_t task  = NULL;
-  double clock     = MSG_get_clock();
-
-  process_globals_t counters = (process_globals_t)MSG_process_get_data(MSG_process_self());
-
-  xbt_assert(communicator_size, "Size of Communicator is not defined, can't use collective operations");
-
-  const char* process_name = MSG_process_get_name(MSG_process_self());
-
-  char* bcast_identifier = bprintf("bcast_%d", counters->bcast_counter);
-  counters->bcast_counter++;
-
-  if (!strcmp(process_name, "p0")) {
-    XBT_DEBUG("%s: %s is the Root", bcast_identifier, process_name);
-
-    msg_comm_t* comms = xbt_new0(msg_comm_t, communicator_size - 1);
-
-    for (int i = 1; i < communicator_size; i++) {
-      snprintf(mailbox, 79, "%s_p0_p%d", bcast_identifier, i);
-      comms[i - 1] = MSG_task_isend(MSG_task_create(mailbox, 0, comm_size, NULL), mailbox);
-    }
-    MSG_comm_waitall(comms, communicator_size - 1, -1);
-    for (int i = 1; i < communicator_size; i++)
-      MSG_comm_destroy(comms[i - 1]);
-    xbt_free(comms);
-
-    XBT_DEBUG("%s: all messages sent by %s have been received", bcast_identifier, process_name);
-  } else {
-    snprintf(mailbox, 79, "%s_p0_%s", bcast_identifier, process_name);
-    MSG_task_receive(&task, mailbox);
-    MSG_task_destroy(task);
-    XBT_DEBUG("%s: %s has received", bcast_identifier, process_name);
-  }
-
-  log_action(action, MSG_get_clock() - clock);
-  xbt_free(bcast_identifier);
-}
-
-static void action_comm_size(const char* const* action)
-{
-  const char* size = action[2];
-  double clock     = MSG_get_clock();
-
-  communicator_size = parse_double(size);
-  log_action(action, MSG_get_clock() - clock);
-}
-
-static void action_compute(const char* const* action)
-{
-  const char* amount = action[2];
-  msg_task_t task    = MSG_task_create("task", parse_double(amount), 0, NULL);
-  double clock       = MSG_get_clock();
-
-  ACT_DEBUG("Entering %s", NAME);
-  MSG_task_execute(task);
-  MSG_task_destroy(task);
-  log_action(action, MSG_get_clock() - clock);
-}
-
-static void action_init(const char* const* action)
-{
-  XBT_DEBUG("Initialize the counters");
-  process_globals_t globals = (process_globals_t)calloc(1, sizeof(s_process_globals_t));
-  globals->isends           = xbt_dynar_new(sizeof(msg_comm_t), NULL);
-  globals->irecvs           = xbt_dynar_new(sizeof(msg_comm_t), NULL);
-  globals->tasks            = xbt_dynar_new(sizeof(msg_task_t), NULL);
-  MSG_process_set_data(MSG_process_self(), globals);
-}
-
-static void action_finalize(const char* const* action)
-{
-  process_globals_t globals = (process_globals_t)MSG_process_get_data(MSG_process_self());
-  if (globals) {
-    asynchronous_cleanup();
-    xbt_dynar_free_container(&(globals->isends));
-    xbt_dynar_free_container(&(globals->irecvs));
-    xbt_dynar_free_container(&(globals->tasks));
-    xbt_free(globals);
-  }
-}
-
-int main(int argc, char* argv[])
-{
-  /* Check the given arguments */
-  MSG_init(&argc, argv);
-  /* Explicit initialization of the action module is required now*/
-  MSG_action_init();
-
-  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 ",
-             argv[0], argv[0], argv[0]);
-
-  MSG_create_environment(argv[1]);
-  MSG_launch_application(argv[2]);
-
-  /*   Action registration */
-  xbt_replay_action_register("init", action_init);
-  xbt_replay_action_register("finalize", action_finalize);
-  xbt_replay_action_register("comm_size", action_comm_size);
-  xbt_replay_action_register("send", action_send);
-  xbt_replay_action_register("Isend", action_Isend);
-  xbt_replay_action_register("recv", action_recv);
-  xbt_replay_action_register("Irecv", action_Irecv);
-  xbt_replay_action_register("wait", action_wait);
-  xbt_replay_action_register("barrier", action_barrier);
-  xbt_replay_action_register("bcast", action_bcast);
-  xbt_replay_action_register("compute", action_compute);
-
-  /* Actually do the simulation using MSG_action_trace_run */
-  msg_error_t res = MSG_action_trace_run(argv[3]); // it's ok to pass a NULL argument here
-
-  XBT_INFO("Simulation time %g", MSG_get_clock());
-
-  MSG_action_exit(); /* Explicit finalization of the action module */
-
-  return res != MSG_OK;
-}
diff --git a/teshsuite/msg/actions-comm/actions-comm.tesh b/teshsuite/msg/actions-comm/actions-comm.tesh
deleted file mode 100644 (file)
index 22108dc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-! output sort 19
-$ ${bindir:=.}/actions-comm --log=actions.thres=verbose ${platfdir}/small_platform_fatpipe.xml actions-comm_split_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 20.703314] (1:p0@Tremblay) p0 recv p1 20.703314
-> [ 20.703314] (2:p1@Ruby) p1 send p0 1e10 20.703314
-> [ 30.897513] (0:maestro@) Simulation time 30.8975
-> [ 30.897513] (1:p0@Tremblay) p0 compute 1e9 10.194200
-> [ 30.897513] (2:p1@Ruby) p1 compute 1e9 10.194200
-
-! output sort 19
-$ ${bindir:=.}/actions-comm --log=actions.thres=verbose ${platfdir}/small_platform_fatpipe.xml actions-comm_d.xml actions-comm.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (1:p0@Tremblay) p0 comm_size 3 0.000000
-> [  1.037020] (1:p0@Tremblay) p0 bcast 5e8 1.037020
-> [  1.037020] (2:p1@Ruby) p1 bcast 5e8 1.037020
-> [  1.037020] (3:p2@Perl) p2 bcast 5e8 1.037020
-> [  1.082894] (1:p0@Tremblay) p0 compute 4.5E6 0.045874
-> [  1.123670] (1:p0@Tremblay) p0 compute 4E6 0.040777
-> [  1.149156] (1:p0@Tremblay) p0 compute 2.5E6 0.025485
-> [  1.149156] (2:p1@Ruby) p1 Irecv p0 0.000000
-> [  1.149156] (3:p2@Perl) p2 Irecv p1 0.000000
-> [  3.221244] (1:p0@Tremblay) p0 send p1 1e9 2.072088
-> [  6.246256] (3:p2@Perl) p2 compute 5e8 5.097100
-> [ 11.343355] (2:p1@Ruby) p1 compute 1e9 10.194200
-> [ 11.343355] (2:p1@Ruby) p1 wait 0.000000
-> [ 11.343355] (2:p1@Ruby) p1 Isend p2 1e9 0.000000
-> [ 13.415443] (0:maestro@) Simulation time 13.4154
-> [ 13.415443] (1:p0@Tremblay) p0 compute 1e9 10.194200
-> [ 13.415443] (3:p2@Perl) p2 wait 7.169187
diff --git a/teshsuite/msg/actions-comm/actions-comm.txt b/teshsuite/msg/actions-comm/actions-comm.txt
deleted file mode 100644 (file)
index 94054f2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# sample action file
-p0 init
-p1 init
-p2 init
-
-p0 comm_size 3
-p0 bcast 5e8
-p1 bcast 5e8
-p2 bcast 5e8
-
-p0 compute 4.5E6
-p0 compute 4E6
-p0 compute 2.5E6
-
-p0 barrier
-p1 barrier
-p2 barrier
-
-p0 send p1 1e9
-p0 compute 1e9
-
-p1 Irecv p0
-p1 compute 1e9
-p1 wait
-p1 Isend p2 1e9
-
-p2 Irecv p1
-p2 compute 5e8
-p2 wait
-
-p0 barrier
-p1 barrier
-p2 barrier
-
-p0 finalize
-p1 finalize
-p2 finalize
-
diff --git a/teshsuite/msg/actions-comm/actions-comm_d.xml b/teshsuite/msg/actions-comm/actions-comm_d.xml
deleted file mode 100644 (file)
index dbecc0b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4.1">
-  <actor host="Tremblay" function="p0"/>
-  <actor host="Ruby" function="p1"/>
-  <actor host="Perl" function="p2"/>
-</platform>
diff --git a/teshsuite/msg/actions-comm/actions-comm_split_d.xml b/teshsuite/msg/actions-comm/actions-comm_split_d.xml
deleted file mode 100644 (file)
index 831c9e0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4.1">
-<!-- Example file of how to use trace replay, with actions split in separate files, one per actor.
-     Launch it like this:
-         ./actions-comm ../../platforms/platform.xml actions-comm_split_d.xml  -->
-
-  <actor host="Tremblay" function="p0">
-    <argument value="actions-comm_split_p0.txt"/>
-  </actor>
-  <actor host="Ruby"   function="p1">
-    <argument value="actions-comm_split_p1.txt"/>
-  </actor>
-</platform>
diff --git a/teshsuite/msg/actions-comm/actions-comm_split_p0.txt b/teshsuite/msg/actions-comm/actions-comm_split_p0.txt
deleted file mode 100644 (file)
index dd16140..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# sample action file (with only the actions for p0, to be launched by deployment file)
-p0 init
-p0 recv p1
-p0 compute 1e9
-p0 finalize
-
diff --git a/teshsuite/msg/actions-comm/actions-comm_split_p1.txt b/teshsuite/msg/actions-comm/actions-comm_split_p1.txt
deleted file mode 100644 (file)
index d7e9dfe..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# sample action file (with only the actions for p1, to be launched by deployment file)
-p1 init
-p1 send p0 1e10
-p1 compute 1e9
-p1 finalize
diff --git a/teshsuite/msg/actions-storage/actions-storage.c b/teshsuite/msg/actions-storage/actions-storage.c
deleted file mode 100644 (file)
index 4c6e458..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Copyright (c) 2015-2018. 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/msg.h"
-#include "simgrid/plugins/file_system.h"
-#include <xbt/replay.hpp>
-
-#include <stdio.h> /* snprintf */
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(storage_actions, "Messages specific for this example");
-
-static xbt_dict_t opened_files = NULL;
-
-#define ACT_DEBUG(...)                                                                                                 \
-  if (XBT_LOG_ISENABLED(storage_actions, xbt_log_priority_verbose)) {                                                  \
-    char* NAME = xbt_str_join_array(action, " ");                                                                      \
-    XBT_DEBUG(__VA_ARGS__);                                                                                            \
-    xbt_free(NAME);                                                                                                    \
-  } else                                                                                                               \
-  ((void)0)
-
-static void log_action(const char* const* action, double date)
-{
-  if (XBT_LOG_ISENABLED(storage_actions, xbt_log_priority_verbose)) {
-    char* name = xbt_str_join_array(action, " ");
-    XBT_VERB("%s %f", name, date);
-    xbt_free(name);
-  }
-}
-
-static msg_file_t get_file_descriptor(const char* file_name)
-{
-  char full_name[1024];
-
-  snprintf(full_name, 1023, "%s:%s", MSG_process_get_name(MSG_process_self()), file_name);
-
-  msg_file_t file = (msg_file_t)xbt_dict_get_or_null(opened_files, full_name);
-  return file;
-}
-
-static sg_size_t parse_size(const char* string)
-{
-  sg_size_t size;
-  char* endptr;
-
-  size = strtoul(string, &endptr, 10);
-  if (*endptr != '\0')
-    THROWF(unknown_error, 0, "%s is not a long unsigned int (a.k.a. sg_size_t)", string);
-  return size;
-}
-
-static void action_open(const char* const* action)
-{
-  const char* file_name = action[2];
-  char full_name[1024];
-  msg_file_t file = NULL;
-  double clock    = MSG_get_clock();
-
-  snprintf(full_name, 1023, "%s:%s", MSG_process_get_name(MSG_process_self()), file_name);
-
-  ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
-  file = MSG_file_open(file_name, NULL);
-
-  xbt_dict_set(opened_files, full_name, file, NULL);
-
-  log_action(action, MSG_get_clock() - clock);
-}
-
-static void action_read(const char* const* action)
-{
-  const char* file_name = action[2];
-  const char* size_str  = action[3];
-  sg_size_t size        = parse_size(size_str);
-
-  double clock = MSG_get_clock();
-
-  msg_file_t file = get_file_descriptor(file_name);
-
-  ACT_DEBUG("Entering Read: %s (size: %llu)", NAME, size);
-  MSG_file_read(file, size);
-
-  log_action(action, MSG_get_clock() - clock);
-}
-
-static void action_close(const char* const* action)
-{
-  const char* file_name = action[2];
-  msg_file_t file;
-  double clock = MSG_get_clock();
-
-  file = get_file_descriptor(file_name);
-
-  ACT_DEBUG("Entering Close: %s (filename: %s)", NAME, file_name);
-  MSG_file_close(file);
-
-  log_action(action, MSG_get_clock() - clock);
-}
-
-int main(int argc, char* argv[])
-{
-  MSG_init(&argc, argv);
-  MSG_storage_file_system_init();
-  /* Explicit initialization of the action module is required */
-  MSG_action_init();
-
-  xbt_assert(argc > 3,
-             "Usage: %s platform_file deployment_file [action_files]\n"
-             "\texample: %s platform.xml deployment.xml actions # if all actions are in the same file\n"
-             "\texample: %s platform.xml deployment.xml # if actions are in separate files, specified in deployment\n",
-             argv[0], argv[0], argv[0]);
-
-  MSG_create_environment(argv[1]);
-  MSG_launch_application(argv[2]);
-
-  /*   Action registration */
-  xbt_replay_action_register("open", action_open);
-  xbt_replay_action_register("read", action_read);
-  xbt_replay_action_register("close", action_close);
-
-  if (opened_files == NULL)
-    opened_files = xbt_dict_new_homogeneous(NULL);
-  /* Actually do the simulation using MSG_action_trace_run */
-  msg_error_t res = MSG_action_trace_run(argv[3]); // it's ok to pass a NULL argument here
-
-  XBT_INFO("Simulation time %g", MSG_get_clock());
-
-  if (opened_files)
-    xbt_dict_free(&opened_files);
-
-  /* Explicit finalization of the action module is required now*/
-  MSG_action_exit();
-
-  return res != MSG_OK;
-}
diff --git a/teshsuite/msg/actions-storage/actions-storage.tesh b/teshsuite/msg/actions-storage/actions-storage.tesh
deleted file mode 100644 (file)
index d9a69ee..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-! output sort 19
-$ ${bindir:=.}/actions-storage --log=storage_actions.thres=verbose ${platfdir}/storage/storage.xml actions-storage_d.xml actions-storage.txt "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (1:p0@denise) p0 open /home/lib/libsimgrid.so.3.6.2 0.000000
-> [  0.063552] (1:p0@denise) p0 read /home/lib/libsimgrid.so.3.6.2 12710497 0.063552
-> [  0.063552] (1:p0@denise) p0 close /home/lib/libsimgrid.so.3.6.2 0.000000
-> [  0.063552] (0:maestro@) Simulation time 0.0635525
diff --git a/teshsuite/msg/actions-storage/actions-storage.txt b/teshsuite/msg/actions-storage/actions-storage.txt
deleted file mode 100644 (file)
index cc9142a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-p0 open /home/lib/libsimgrid.so.3.6.2  
-p0 read /home/lib/libsimgrid.so.3.6.2 12710497
-p0 close /home/lib/libsimgrid.so.3.6.2
diff --git a/teshsuite/msg/actions-storage/actions-storage_d.xml b/teshsuite/msg/actions-storage/actions-storage_d.xml
deleted file mode 100644 (file)
index 3f52ae6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4.1">
-  <actor host="denise" function="p0"/>
-</platform>
index fca4b9c..c592888 100644 (file)
@@ -442,7 +442,6 @@ set(SIMGRID_SRC
 set(MSG_SRC
   src/msg/instr_msg_process.cpp
   src/msg/instr_msg_task.cpp
 set(MSG_SRC
   src/msg/instr_msg_process.cpp
   src/msg/instr_msg_task.cpp
-  src/msg/msg_actions.cpp
   src/msg/msg_deployment.cpp
   src/msg/msg_environment.cpp
   src/msg/msg_global.cpp
   src/msg/msg_deployment.cpp
   src/msg/msg_environment.cpp
   src/msg/msg_global.cpp