We cannot call surf_solve if there are no actions running and trace files with periodicity > 0.
Surf always answer with the next event to finish that will be a trace event.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6664
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
action->model_type->action_unref(action);
}
action->model_type->action_unref(action);
}
- } while (surf_solve() >= 0.0);
+ } while ((xbt_swag_size(surf_network_model->states.running_action_set) ||
+ xbt_swag_size(surf_cpu_model->states.running_action_set)) &&
+ surf_solve() >= 0.0);
DEBUG0("Simulation Terminated");
}
DEBUG0("Simulation Terminated");
}
surf_action_t actionC = NULL;
surf_action_t commAB = NULL;
double now = -1.0;
surf_action_t actionC = NULL;
surf_action_t commAB = NULL;
double now = -1.0;
int workstation_id =
find_model_description(surf_workstation_model_description, "CLM03");
int workstation_id =
find_model_description(surf_workstation_model_description, "CLM03");
surf_action_t action = NULL;
unsigned int iter;
surf_model_t model = NULL;
surf_action_t action = NULL;
unsigned int iter;
surf_model_t model = NULL;
now = surf_get_clock();
DEBUG1("Next Event : %g", now);
now = surf_get_clock();
DEBUG1("Next Event : %g", now);
DEBUG1("\t * Done : %p", action);
model->action_unref(action);
}
DEBUG1("\t * Done : %p", action);
model->action_unref(action);
}
+ if (xbt_swag_size(model->states.running_action_set)) {
+ DEBUG1("running %s", model->name);
+ running = 1;
+ }
- } while (surf_solve() >= 0.0);
+ } while (running && surf_solve() >= 0.0);
DEBUG0("Simulation Terminated");
DEBUG0("Simulation Terminated");