Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
getting rid of workstation_KCCFLN05_private.h
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 12 Sep 2007 12:31:53 +0000 (12:31 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 12 Sep 2007 12:31:53 +0000 (12:31 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4587 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/Makefile.am
src/Makefile.in
src/cunit_unit.c
src/simgrid_units_main.c
src/surf/workstation_KCCFLN05.c
src/surf/workstation_KCCFLN05_private.h [deleted file]

index 2d6a211..18e4b3f 100644 (file)
@@ -39,7 +39,6 @@ EXTRA_DIST= \
        surf/surfxml.dtd \
        surf/network_private.h \
        network_gtnets_private.h \
        surf/surfxml.dtd \
        surf/network_private.h \
        network_gtnets_private.h \
-       surf/workstation_KCCFLN05_private.h \
        \
        include/surf/maxmin.h \
        include/surf/trace_mgr.h \
        \
        include/surf/maxmin.h \
        include/surf/trace_mgr.h \
index 8a0dbf2..7beacbd 100644 (file)
@@ -446,12 +446,12 @@ EXTRA_DIST = portable.h xbt/mallocator_private.h xbt/dynar_private.h \
        surf/cpu_private.h surf/workstation_private.h \
        surf/surf_timer_private.h surf/surfxml_parse.c surf/surfxml.l \
        surf/surfxml.c surf/surfxml.dtd surf/network_private.h \
        surf/cpu_private.h surf/workstation_private.h \
        surf/surf_timer_private.h surf/surfxml_parse.c surf/surfxml.l \
        surf/surfxml.c surf/surfxml.dtd surf/network_private.h \
-       network_gtnets_private.h surf/workstation_KCCFLN05_private.h \
-       include/surf/maxmin.h include/surf/trace_mgr.h \
-       include/surf/surf.h include/surf/surfxml_parse_private.h \
-       include/xbt/xbt_os_time.h include/xbt/xbt_os_thread.h \
-       include/xbt/context.h msg/private.h simdag/private.h \
-       gras/DataDesc/ddt_parse.yy.l gras/Virtu/virtu_interface.h \
+       network_gtnets_private.h include/surf/maxmin.h \
+       include/surf/trace_mgr.h include/surf/surf.h \
+       include/surf/surfxml_parse_private.h include/xbt/xbt_os_time.h \
+       include/xbt/xbt_os_thread.h include/xbt/context.h \
+       msg/private.h simdag/private.h gras/DataDesc/ddt_parse.yy.l \
+       gras/Virtu/virtu_interface.h \
        amok/Bandwidth/bandwidth_private.h amok/amok_modinter.h \
        $(am__append_3) $(am__append_4) $(am__append_9) \
        $(am__append_10)
        amok/Bandwidth/bandwidth_private.h amok/amok_modinter.h \
        $(am__append_3) $(am__append_4) $(am__append_9) \
        $(am__append_10)
index a38d38c..9048572 100644 (file)
@@ -8,7 +8,7 @@
 /* GENERATED FILE, DO NOT EDIT */
 /*******************************/
 
 /* GENERATED FILE, DO NOT EDIT */
 /*******************************/
 
-# 729 "xbt/cunit.c" 
+# 729 "./xbt/cunit.c" 
 
 
 XBT_TEST_UNIT("expect",test_expected_failure,"expected failures") {
 
 
 XBT_TEST_UNIT("expect",test_expected_failure,"expected failures") {
index 2812919..5c8198b 100644 (file)
@@ -9,53 +9,11 @@
 extern xbt_test_unit_t _xbt_current_unit;
 
 /* SGU: BEGIN PROTOTYPES */
 extern xbt_test_unit_t _xbt_current_unit;
 
 /* SGU: BEGIN PROTOTYPES */
-  /* SGU: BEGIN FILE xbt/cunit.c */
+  /* SGU: BEGIN FILE ./xbt/cunit.c */
     void test_expected_failure(void);
   /* SGU: END FILE */
 
     void test_expected_failure(void);
   /* SGU: END FILE */
 
-  /* SGU: BEGIN FILE xbt/ex.c */
-    void test_controlflow(void);
-    void test_value(void);
-    void test_variables(void);
-    void test_cleanup(void);
-  /* SGU: END FILE */
-
-  /* SGU: BEGIN FILE xbt/dynar.c */
-    void test_dynar_int(void);
-    void test_dynar_double(void);
-    void test_dynar_string(void);
-    void test_dynar_sync_int(void);
-  /* SGU: END FILE */
-
-  /* SGU: BEGIN FILE xbt/dict.c */
-    void test_dict_basic(void);
-    void test_dict_remove(void);
-    void test_dict_nulldata(void);
-    void test_dict_crash(void);
-    void test_dict_multicrash(void);
-  /* SGU: END FILE */
-
-  /* SGU: BEGIN FILE xbt/set.c */
-    void test_set_basic(void);
-    void test_set_change(void);
-    void test_set_retrieve(void);
-    void test_set_remove(void);
-  /* SGU: END FILE */
-
-  /* SGU: BEGIN FILE xbt/swag.c */
-    void test_swag_basic(void);
-  /* SGU: END FILE */
-
-  /* SGU: BEGIN FILE xbt/xbt_str.c */
-    void test_split_quoted(void);
-  /* SGU: END FILE */
-
-  /* SGU: BEGIN FILE xbt/config.c */
-    void test_config_memuse(void);
-    void test_config_validation(void);
-    void test_config_use(void);
-  /* SGU: END FILE */
-
+/* SGU: END PROTOTYPES */
 
 /*******************************/
 /* GENERATED FILE, DO NOT EDIT */
 
 /*******************************/
 /* GENERATED FILE, DO NOT EDIT */
@@ -67,61 +25,11 @@ int main(int argc, char *argv[]) {
   int i;
 
   /* SGU: BEGIN SUITES DECLARATION */
   int i;
 
   /* SGU: BEGIN SUITES DECLARATION */
-    /* SGU: BEGIN FILE xbt/cunit.c */
+    /* SGU: BEGIN FILE ./xbt/cunit.c */
       suite = xbt_test_suite_by_name("cunit","Testsuite mechanism autotest");
       xbt_test_suite_push(suite, "expect", test_expected_failure, "expected failures");
     /* SGU: END FILE */
 
       suite = xbt_test_suite_by_name("cunit","Testsuite mechanism autotest");
       xbt_test_suite_push(suite, "expect", test_expected_failure, "expected failures");
     /* SGU: END FILE */
 
-    /* SGU: BEGIN FILE xbt/ex.c */
-      suite = xbt_test_suite_by_name("xbt_ex","Exception Handling");
-      xbt_test_suite_push(suite, "controlflow", test_controlflow,  "basic nested control flow");
-      xbt_test_suite_push(suite, "value", test_value, "exception value passing");
-      xbt_test_suite_push(suite, "variables", test_variables, "variable value preservation");
-      xbt_test_suite_push(suite, "cleanup", test_cleanup, "cleanup handling");
-    /* SGU: END FILE */
-
-    /* SGU: BEGIN FILE xbt/dynar.c */
-      suite = xbt_test_suite_by_name("dynar","Dynar data container");
-      xbt_test_suite_push(suite, "int", test_dynar_int, "Dynars of integers");
-      xbt_test_suite_push(suite, "double", test_dynar_double, "Dynars of doubles");
-      xbt_test_suite_push(suite, "string", test_dynar_string, "Dyars of strings");
-      xbt_test_suite_push(suite, "synchronized int", test_dynar_sync_int, "Synchronized dynars of integers");
-    /* SGU: END FILE */
-
-    /* SGU: BEGIN FILE xbt/dict.c */
-      suite = xbt_test_suite_by_name("dict","Dict data container");
-      xbt_test_suite_push(suite, "basic", test_dict_basic, "Basic usage: change, retrieve, traverse");
-      xbt_test_suite_push(suite, "remove", test_dict_remove, "Removing some values");
-      xbt_test_suite_push(suite, "nulldata", test_dict_nulldata, "NULL data management");
-      xbt_test_suite_push(suite, "crash", test_dict_crash, "Crash test");
-      xbt_test_suite_push(suite, "multicrash", test_dict_multicrash, "Multi-dict crash test");
-    /* SGU: END FILE */
-
-    /* SGU: BEGIN FILE xbt/set.c */
-      suite = xbt_test_suite_by_name("set","Set data container");
-      xbt_test_suite_push(suite, "basic", test_set_basic, "Basic usage");
-      xbt_test_suite_push(suite, "change", test_set_change, "Changing some values");
-      xbt_test_suite_push(suite, "retrieve", test_set_retrieve, "Retrieving some values");
-      xbt_test_suite_push(suite, "remove", test_set_remove, "Removing some values");
-    /* SGU: END FILE */
-
-    /* SGU: BEGIN FILE xbt/swag.c */
-      suite = xbt_test_suite_by_name("swag","Swag data container");
-      xbt_test_suite_push(suite, "basic", test_swag_basic, "Basic usage");
-    /* SGU: END FILE */
-
-    /* SGU: BEGIN FILE xbt/xbt_str.c */
-      suite = xbt_test_suite_by_name("xbt_str","String Handling");
-      xbt_test_suite_push(suite, "xbt_str_split_quoted", test_split_quoted,  "test the function xbt_str_split_quoted");
-    /* SGU: END FILE */
-
-    /* SGU: BEGIN FILE xbt/config.c */
-      suite = xbt_test_suite_by_name("config","Configuration support");
-      xbt_test_suite_push(suite, "memuse", test_config_memuse, "Alloc and free a config set");
-      xbt_test_suite_push(suite, "validation", test_config_validation, "Validation tests");
-      xbt_test_suite_push(suite, "use", test_config_use, "Data retrieving tests");
-    /* SGU: END FILE */
-
   /* SGU: END SUITES DECLARATION */
       
   xbt_init(&argc,argv);
   /* SGU: END SUITES DECLARATION */
       
   xbt_init(&argc,argv);
index 1108e11..7f4f822 100644 (file)
@@ -7,11 +7,92 @@
 
 #include "xbt/ex.h"
 #include "xbt/dict.h"
 
 #include "xbt/ex.h"
 #include "xbt/dict.h"
-#include "workstation_KCCFLN05_private.h"
+#include "surf_private.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf,
                                "Logging specific to the SURF workstation module (KCCFLN05)");
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf,
                                "Logging specific to the SURF workstation module (KCCFLN05)");
 
+typedef enum {
+  SURF_WORKSTATION_RESOURCE_CPU,
+  SURF_WORKSTATION_RESOURCE_LINK,
+} e_surf_workstation_model_type_t;
+
+
+/**************************************/
+/********* router object **************/
+/**************************************/
+typedef struct router_KCCFLN05 {
+  char *name;          
+  unsigned int id;
+} s_router_KCCFLN05_t, *router_KCCFLN05_t;
+
+
+/**************************************/
+/********* cpu object *****************/
+/**************************************/
+typedef struct cpu_KCCFLN05 {
+  surf_model_t model;
+  e_surf_workstation_model_type_t type;        /* Do not move this field */
+  char *name;                                  /* Do not move this field */
+  lmm_constraint_t constraint;
+  lmm_constraint_t bus;
+  double power_scale;
+  double power_current;
+  double interference_send;
+  double interference_recv;
+  double interference_send_recv;
+  tmgr_trace_event_t power_event;
+  e_surf_cpu_state_t state_current;
+  tmgr_trace_event_t state_event;
+  int id;                      /* cpu and network card are a single object... */
+  xbt_dynar_t incomming_communications;
+  xbt_dynar_t outgoing_communications;
+} s_cpu_KCCFLN05_t, *cpu_KCCFLN05_t;
+
+/**************************************/
+/*********** network object ***********/
+/**************************************/
+
+typedef struct network_link_KCCFLN05 {
+  surf_model_t model;
+  e_surf_workstation_model_type_t type;        /* Do not move this field */
+  char *name;                                  /* Do not move this field */
+  lmm_constraint_t constraint;
+  double lat_current;
+  tmgr_trace_event_t lat_event;
+  double bw_current;
+  tmgr_trace_event_t bw_event;
+  e_surf_network_link_state_t state_current;
+  tmgr_trace_event_t state_event;
+} s_network_link_KCCFLN05_t, *network_link_KCCFLN05_t;
+
+
+typedef struct s_route_KCCFLN05 {
+  double impact_on_src;
+  double impact_on_dst;
+  double impact_on_src_with_other_recv;
+  double impact_on_dst_with_other_send;
+  network_link_KCCFLN05_t *links;
+  int size;
+} s_route_KCCFLN05_t, *route_KCCFLN05_t;
+
+/**************************************/
+/*************** actions **************/
+/**************************************/
+typedef struct surf_action_workstation_KCCFLN05 {
+  s_surf_action_t generic_action;
+  double latency;
+  double lat_current;
+  lmm_variable_t variable;
+  double rate;
+  int suspended;
+  cpu_KCCFLN05_t src;          /* could be avoided */
+  cpu_KCCFLN05_t dst;          /* could be avoided */
+} s_surf_action_workstation_KCCFLN05_t,
+  *surf_action_workstation_KCCFLN05_t;
+
+
+
 static int nb_workstation = 0;
 static s_route_KCCFLN05_t *routing_table = NULL;
 #define ROUTE(i,j) routing_table[(i)+(j)*nb_workstation]
 static int nb_workstation = 0;
 static s_route_KCCFLN05_t *routing_table = NULL;
 #define ROUTE(i,j) routing_table[(i)+(j)*nb_workstation]
@@ -621,7 +702,7 @@ static surf_action_t communicate(void *src, void *dst, double size,
   }
 
   lmm_update_variable_latency(maxmin_system, action->variable,
   }
 
   lmm_update_variable_latency(maxmin_system, action->variable,
-                             action->latency);
+                             action->latency); /* Should be useless */
 
   for (i = 0; i < route_size; i++)
     lmm_expand(maxmin_system, route->links[i]->constraint,
 
   for (i = 0; i < route_size; i++)
     lmm_expand(maxmin_system, route->links[i]->constraint,
@@ -653,7 +734,7 @@ static surf_action_t execute_parallel_task(int workstation_nb,
        xbt_dict_new_ext(workstation_nb * workstation_nb * 10);
   }
 
        xbt_dict_new_ext(workstation_nb * workstation_nb * 10);
   }
 
-  /* Compute the number of affected models... */
+  /* Compute the number of affected resources... */
   for (i = 0; i < workstation_nb; i++) {
     for (j = 0; j < workstation_nb; j++) {
       cpu_KCCFLN05_t card_src = workstation_list[i];
   for (i = 0; i < workstation_nb; i++) {
     for (j = 0; j < workstation_nb; j++) {
       cpu_KCCFLN05_t card_src = workstation_list[i];
diff --git a/src/surf/workstation_KCCFLN05_private.h b/src/surf/workstation_KCCFLN05_private.h
deleted file mode 100644 (file)
index df0d10f..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*     $Id$     */
-
-/* Copyright (c) 2005 Arnaud Legrand. 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. */
-
-#ifndef _SURF_WORKSTATION_KCCFLN05_PRIVATE_H
-#define _SURF_WORKSTATION_KCCFLN05_PRIVATE_H
-
-#include "surf_private.h"
-
-typedef enum {
-  SURF_WORKSTATION_RESOURCE_CPU,
-  SURF_WORKSTATION_RESOURCE_LINK,
-} e_surf_workstation_model_type_t;
-
-
-/**************************************/
-/********* router object **************/
-/**************************************/
-typedef struct router_KCCFLN05 {
-  char *name;          
-  unsigned int id;
-} s_router_KCCFLN05_t, *router_KCCFLN05_t;
-
-
-/**************************************/
-/********* cpu object *****************/
-/**************************************/
-typedef struct cpu_KCCFLN05 {
-  surf_model_t model;
-  e_surf_workstation_model_type_t type;        /* Do not move this field */
-  char *name;                                  /* Do not move this field */
-  lmm_constraint_t constraint;
-  lmm_constraint_t bus;
-  double power_scale;
-  double power_current;
-  double interference_send;
-  double interference_recv;
-  double interference_send_recv;
-  tmgr_trace_event_t power_event;
-  e_surf_cpu_state_t state_current;
-  tmgr_trace_event_t state_event;
-  int id;                      /* cpu and network card are a single object... */
-  xbt_dynar_t incomming_communications;
-  xbt_dynar_t outgoing_communications;
-} s_cpu_KCCFLN05_t, *cpu_KCCFLN05_t;
-
-/**************************************/
-/*********** network object ***********/
-/**************************************/
-
-typedef struct network_link_KCCFLN05 {
-  surf_model_t model;
-  e_surf_workstation_model_type_t type;        /* Do not move this field */
-  char *name;                                  /* Do not move this field */
-  lmm_constraint_t constraint;
-  double lat_current;
-  tmgr_trace_event_t lat_event;
-  double bw_current;
-  tmgr_trace_event_t bw_event;
-  e_surf_network_link_state_t state_current;
-  tmgr_trace_event_t state_event;
-} s_network_link_KCCFLN05_t, *network_link_KCCFLN05_t;
-
-
-typedef struct s_route_KCCFLN05 {
-  double impact_on_src;
-  double impact_on_dst;
-  double impact_on_src_with_other_recv;
-  double impact_on_dst_with_other_send;
-  network_link_KCCFLN05_t *links;
-  int size;
-} s_route_KCCFLN05_t, *route_KCCFLN05_t;
-
-/**************************************/
-/*************** actions **************/
-/**************************************/
-typedef struct surf_action_workstation_KCCFLN05 {
-  s_surf_action_t generic_action;
-  double latency;
-  double lat_current;
-  lmm_variable_t variable;
-  double rate;
-  int suspended;
-  cpu_KCCFLN05_t src;          /* could be avoided */
-  cpu_KCCFLN05_t dst;          /* could be avoided */
-} s_surf_action_workstation_KCCFLN05_t,
-  *surf_action_workstation_KCCFLN05_t;
-
-
-
-
-#endif                         /* _SURF_WORKSTATION_KCCFLN05_PRIVATE_H */