Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove global maxmin system. Every model should use its own. It's cleaner and faster!!!
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 12 Sep 2007 15:15:17 +0000 (15:15 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 12 Sep 2007 15:15:17 +0000 (15:15 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4599 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/surf_private.h
src/surf/workstation_KCCFLN05.c

index 0b66302..809e6ae 100644 (file)
@@ -65,7 +65,6 @@ void surf_action_set_data(surf_action_t action,
                          void *data);
 FILE * surf_fopen(const char *name, const char *mode);
 
-extern lmm_system_t maxmin_system;
 extern tmgr_history_t history;
 extern xbt_dynar_t surf_path;
 
index 3313042..b1ec2ec 100644 (file)
@@ -100,7 +100,7 @@ static network_link_KCCFLN05_t loopback = NULL;
 static xbt_dict_t parallel_task_network_link_set = NULL;
 //added to work with GTNETS
 static xbt_dict_t router_set = NULL;
-
+static lmm_system_t maxmin_system = NULL;
 /*xbt_dict_t network_link_set = NULL;*/
 
 
@@ -765,7 +765,7 @@ static surf_action_t execute_parallel_task(int workstation_nb,
   action->generic_action.cost = amount;
   action->generic_action.remains = amount;
   action->generic_action.max_duration = NO_MAX_DURATION;
-  action->generic_action.start = -1.0;
+  action->generic_action.start = surf_get_clock();
   action->generic_action.finish = -1.0;
   action->generic_action.model_type =
       (surf_model_t) surf_workstation_model;
@@ -1302,9 +1302,9 @@ static void model_init_internal(void)
 
   workstation_set = xbt_dict_new();
   router_set = xbt_dict_new();
-  network_link_set = xbt_dict_new();
-
-  xbt_assert0(maxmin_system, "surf_init has to be called first!");
+  network_link_set = xbt_dict_new(); 
+  if (!maxmin_system)
+    maxmin_system = lmm_system_new();
 }
 
 /**************************************/