From 90a099c9ef74e8e687a4c93de7a166a6726fdf42 Mon Sep 17 00:00:00 2001 From: alegrand Date: Wed, 12 Sep 2007 15:15:17 +0000 Subject: [PATCH] remove global maxmin system. Every model should use its own. It's cleaner and faster!!! git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4599 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/surf/surf_private.h | 1 - src/surf/workstation_KCCFLN05.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/surf/surf_private.h b/src/surf/surf_private.h index 0b663029c3..809e6aedd6 100644 --- a/src/surf/surf_private.h +++ b/src/surf/surf_private.h @@ -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; diff --git a/src/surf/workstation_KCCFLN05.c b/src/surf/workstation_KCCFLN05.c index 3313042cb9..b1ec2ec606 100644 --- a/src/surf/workstation_KCCFLN05.c +++ b/src/surf/workstation_KCCFLN05.c @@ -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(); } /**************************************/ -- 2.20.1