Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill an useless example
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 10 Jun 2015 16:34:35 +0000 (18:34 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 10 Jun 2015 16:34:35 +0000 (18:34 +0200)
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/MakeExe.cmake
examples/msg/energy/e3/CMakeLists.txt [deleted file]
examples/msg/energy/e3/concurrent_tasks.tesh [deleted file]
examples/msg/energy/e3/deployment_e3.xml [deleted file]
examples/msg/energy/e3/e3.c [deleted file]

index ec39e2a..ed72672 100644 (file)
@@ -236,7 +236,6 @@ IF(NOT enable_memcheck)
   ADD_TESH_FACTORIES(msg-energy-pstates          "thread;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy/pstate/pstate.tesh)
   ADD_TESH_FACTORIES(msg-energy-consumption      "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy/consumption/energy_consumption.tesh)
   ADD_TESH_FACTORIES(msg-energy-onoff "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy/onoff/onoff.tesh)
-  ADD_TESH_FACTORIES(msg-energy-concurrent-tasks "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy/e3/concurrent_tasks.tesh)
   ADD_TESH_FACTORIES(msg-token-ring              "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_BINARY_DIR}/examples/msg/token_ring ${CMAKE_HOME_DIRECTORY}/examples/msg/token_ring/token_ring.tesh)
   ADD_TESH_FACTORIES(msg-migration               "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/migration/migration.tesh)
   ADD_TESH_FACTORIES(msg-ptask                   "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/parallel_task/parallel_task.tesh)
index 289aadb..15f9676 100644 (file)
@@ -1028,10 +1028,9 @@ set(EXAMPLES_CMAKEFILES_TXT
   examples/msg/chainsend/CMakeLists.txt
   examples/msg/chord/CMakeLists.txt
   examples/msg/cloud/CMakeLists.txt
-  examples/msg/energy/pstate/CMakeLists.txt
   examples/msg/energy/consumption/CMakeLists.txt
-  examples/msg/energy/e3/CMakeLists.txt
   examples/msg/energy/onoff/CMakeLists.txt
+  examples/msg/energy/pstate/CMakeLists.txt
   examples/msg/exception/CMakeLists.txt
   examples/msg/gpu/CMakeLists.txt
   examples/msg/gtnets/CMakeLists.txt
index 673c354..c04c5bc 100644 (file)
@@ -34,9 +34,8 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/chainsend)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/chord)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/cloud)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/energy/consumption)
-add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/energy/pstate)
-add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/energy/e3)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/energy/onoff)
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/energy/pstate)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/exception)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/gpu)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets)
diff --git a/examples/msg/energy/e3/CMakeLists.txt b/examples/msg/energy/e3/CMakeLists.txt
deleted file mode 100644 (file)
index caef0fd..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-cmake_minimum_required(VERSION 2.6)
-
-set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-
-add_executable(e3 e3.c)
-
-### Add definitions for compile
-target_link_libraries(e3 simgrid )
-
-set(tesh_files
-  ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/concurrent_tasks.tesh
-  PARENT_SCOPE
-  )
-
-set(xml_files
-  ${xml_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_e3.xml
-  PARENT_SCOPE
-  )
-
-set(examples_src
-  ${examples_src}
-  ${CMAKE_CURRENT_SOURCE_DIR}/e3.c
-  PARENT_SCOPE
-  )
-
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE
-  )
diff --git a/examples/msg/energy/e3/concurrent_tasks.tesh b/examples/msg/energy/e3/concurrent_tasks.tesh
deleted file mode 100644 (file)
index 3dcfbf5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#! ./tesh
-
-p Testing the mechanism for computing host energy consumption for concurrent tasks
-
-! output sort
-$ $SG_TEST_EXENV energy/e3/e3$EXEEXT ${srcdir:=.}/../platforms/energy_platform.xml ${srcdir:=.}/energy/e3/deployment_e3.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (1:dvfs_test@MyHost1) Current power peak=100000000.000000
-> [  0.000000] (1:dvfs_test@MyHost1) Total energy (Joules): 0.000000
-> [  2.000000] (4:proc3@MyHost1) Process proc3 executed task sleep cpu=0.000000, duration = 2.000000
-> [  2.000000] (4:proc3@MyHost1) ==================================================
-> [  2.000000] (3:proc2@MyHost1) Process proc2 executed task sleep cpu=0.000000, duration = 2.000000
-> [  2.000000] (3:proc2@MyHost1) ==================================================
-> [  5.000000] (4:proc3@MyHost1) Process proc3 executed task cpu=100000000.000000, duration = 3.000000
-> [  5.000000] (4:proc3@MyHost1) ==================================================
-> [  5.000000] (3:proc2@MyHost1) Process proc2 executed task cpu=100000000.000000, duration = 3.000000
-> [  5.000000] (3:proc2@MyHost1) ==================================================
-> [  6.000000] (2:proc1@MyHost1) Process proc1 executed task cpu=400000000.000000, duration = 6.000000
-> [  6.000000] (2:proc1@MyHost1) ==================================================
-> [  8.000000] (1:dvfs_test@MyHost1) Task simulation time: 8.000000e+00
-> [  8.000000] (1:dvfs_test@MyHost1) Total energy (Joules): 1390.000000
-> [  8.000000] (0:@) Total simulation time: 8.000000e+00
-> [  8.000000] (0:@) Total energy of host MyHost1: 1390.000000 Joules
-> [  8.000000] (0:@) Total energy of host MyHost2: 800.000000 Joules
diff --git a/examples/msg/energy/e3/deployment_e3.xml b/examples/msg/energy/e3/deployment_e3.xml
deleted file mode 100644 (file)
index b9c8941..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
-<platform version="3">
-
-  <process host="MyHost1" function="dvfs_test" />
-
-</platform>
diff --git a/examples/msg/energy/e3/e3.c b/examples/msg/energy/e3/e3.c
deleted file mode 100644 (file)
index 5f31fb1..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Copyright (c) 2007-2010, 2013-2014. 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<stdio.h>
-
-#include "simgrid/msg.h"
-#include "xbt/sysdep.h"         /* calloc */
-#include "simgrid/plugins.h"
-
-/* Create a log channel to have nice outputs. */
-#include "xbt/log.h"
-#include "xbt/asserts.h"
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
-                             "Messages specific for this msg example");
-
-static int dvfs(int argc, char *argv[]);
-static int process_code(int argc, char *argv[]);
-
-static int process_code(int argc, char *argv[])
-{
-  msg_task_t task1 = NULL;
-  double cpu_task = 0;
-  double task_time = MSG_get_clock();
-
-  if (argc == 2)
-  {
-         /* Run a sleep task */
-         double sleep_task = atof(argv[1]);
-
-         MSG_process_sleep(sleep_task);
-         task_time = MSG_get_clock() - task_time;
-         XBT_INFO("Process %s executed task sleep cpu=%f, duration = %f",
-                         MSG_process_get_name(MSG_process_self()), 0.0, task_time);
-         XBT_INFO("==================================================");
- }
-
-
-  // Run a task
-  cpu_task = atof(argv[0]);
-  task1 = MSG_task_create ("task", cpu_task, 0, NULL);
-  MSG_task_execute (task1);
-  MSG_task_destroy(task1);
-
-  task_time = MSG_get_clock() - task_time;
-  XBT_INFO("Process %s executed task cpu=%f, duration = %f",
-                 MSG_process_get_name(MSG_process_self()), cpu_task, task_time);
-  XBT_INFO("==================================================");
-  return 0;
-}
-
-
-static int dvfs(int argc, char *argv[])
-{
-  msg_host_t host = NULL;
-  double task_time = 0;
-  host = MSG_host_self();
-
-  double current_peak = MSG_host_get_current_power_peak(host);
-
-  XBT_INFO("Current power peak=%f", current_peak);
-  double consumed_energy = MSG_host_get_consumed_energy(host);
-  XBT_INFO("Total energy (Joules): %f", consumed_energy);
-
-  // Process 1 - long CPU task
-  int argc1 = 1;
-  char** params1 = xbt_malloc0(sizeof(char *) * argc1);
-  params1[0] = xbt_strdup("400.0E6");
-  MSG_process_create_with_arguments("proc1", process_code, NULL, host, argc1, params1);
-
-  // Process 2 - sleep 2 sec + CPU task
-  int argc2 = 2;
-  char** params2 = xbt_malloc0(sizeof(char *) * argc2);
-  params2[0] = xbt_strdup("100.0E6");
-  params2[1] = xbt_strdup("2");
-  MSG_process_create_with_arguments("proc2", process_code, NULL, host, argc2, params2);
-
-  // Process 3 - sleep 2 sec + CPU task
-  int argc3 = 2;
-  char** params3 = xbt_malloc0(sizeof(char *) * argc3);
-  params3[0] = xbt_strdup("100.0E6");
-  params3[1] = xbt_strdup("2");
-  MSG_process_create_with_arguments("proc3", process_code, NULL, host, argc3, params3);
-
-
-  // Main process
-  MSG_process_sleep(8);
-
-  task_time = MSG_get_clock() - task_time;
-  XBT_INFO("Task simulation time: %e", task_time);
-  consumed_energy = MSG_host_get_consumed_energy(host);
-  XBT_INFO("Total energy (Joules): %f", consumed_energy);
-
-  return 0;
-}
-
-int main(int argc, char *argv[])
-{
-  msg_error_t res = MSG_OK;
-  sg_energy_plugin_init();
-  MSG_init(&argc, argv);
-
-  if (argc != 3) {
-    XBT_CRITICAL("Usage: %s platform_file deployment_file\n",
-              argv[0]);
-    XBT_CRITICAL
-        ("example: %s msg_platform.xml msg_deployment.xml\n",
-         argv[0]);
-    exit(1);
-  }
-
-  MSG_create_environment(argv[1]);
-
-  /*   Application deployment */
-  MSG_function_register("dvfs_test", dvfs);
-
-  MSG_launch_application(argv[2]);
-
-  res = MSG_main();
-
-  XBT_INFO("Total simulation time: %e", MSG_get_clock());
-
-  if (res == MSG_OK)
-    return 0;
-  else
-    return 1;
-}
-