-xbt_dynar_t model_list = NULL;
+/* model_list_invoke contains only surf_workstation and surf_vm_workstation.
+ * The callback functions of cpu_model and network_model will be called from
+ * those of these workstation models. */
+xbt_dynar_t model_list = NULL; /* for destroying all models correctly */
+xbt_dynar_t model_list_invoke = NULL; /* for invoking callbacks */
tmgr_history_t history = NULL;
lmm_system_t maxmin_system = NULL;
xbt_dynar_t surf_path = NULL;
tmgr_history_t history = NULL;
lmm_system_t maxmin_system = NULL;
xbt_dynar_t surf_path = NULL;
action->generic_action.start, now + value,
action->generic_action.max_duration);
if (min != -1) {
surf_action_lmm_heap_remove(model->model_private->action_heap,action);
surf_action_lmm_heap_insert(model->model_private->action_heap,action, min, max_dur_flag ? MAX_DURATION : NORMAL);
action->generic_action.start, now + value,
action->generic_action.max_duration);
if (min != -1) {
surf_action_lmm_heap_remove(model->model_private->action_heap,action);
surf_action_lmm_heap_insert(model->model_private->action_heap,action, min, max_dur_flag ? MAX_DURATION : NORMAL);
- XBT_DEBUG("Insert at heap action(%p) min %lf now %lf", action, min,
+ XBT_DEBUG("Insert at heap action(%p) min %f now %f", action, min,
as_router_lib = xbt_lib_new();
storage_lib = xbt_lib_new();
storage_type_lib = xbt_lib_new();
as_router_lib = xbt_lib_new();
storage_lib = xbt_lib_new();
storage_type_lib = xbt_lib_new();
XBT_DEBUG("Add routing levels");
ROUTING_HOST_LEVEL = xbt_lib_add_level(host_lib,routing_asr_host_free);
XBT_DEBUG("Add routing levels");
ROUTING_HOST_LEVEL = xbt_lib_add_level(host_lib,routing_asr_host_free);
min = -1.0; /* duration */
double next_event_date = -1.0;
double model_next_action_end = -1.0;
min = -1.0; /* duration */
double next_event_date = -1.0;
double model_next_action_end = -1.0;
XBT_DEBUG("Run for network at most %f", min);
// run until min or next flow
XBT_DEBUG("Run for network at most %f", min);
// run until min or next flow
XBT_DEBUG("Min for network : %f", model_next_action_end);
if(model_next_action_end>=0.0)
XBT_DEBUG("Min for network : %f", model_next_action_end);
if(model_next_action_end>=0.0)
}
/* update state of model_obj according to new value. Does not touch lmm.
It will be modified if needed when updating actions */
}
/* update state of model_obj according to new value. Does not touch lmm.
It will be modified if needed when updating actions */
/* sequential version */
xbt_dynar_foreach(model_list, iter, model) {
surf_update_actions_state(model);
/* sequential version */
xbt_dynar_foreach(model_list, iter, model) {
surf_update_actions_state(model);
int i = __sync_fetch_and_add(&surf_min_index, 1);
if (strcmp(model->name,"network NS3")) {
XBT_DEBUG("Running for Resource [%s]", model->name);
int i = __sync_fetch_and_add(&surf_min_index, 1);
if (strcmp(model->name,"network NS3")) {
XBT_DEBUG("Running for Resource [%s]", model->name);
XBT_DEBUG("Resource [%s] : next action end = %f",
model->name, next_action_end);
}
XBT_DEBUG("Resource [%s] : next action end = %f",
model->name, next_action_end);
}