X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/01c70260177e586af94f9d221f9a5e616d8a504f..40bbc8645482f0b800c24b4cffd13e58d60e45fd:/src/surf/surf.c diff --git a/src/surf/surf.c b/src/surf/surf.c index 3cf22634da..335351e2fe 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -418,6 +418,11 @@ void surf_init(int *argc, char **argv) if (!history) history = tmgr_history_new(); +#ifdef HAVE_TRACING + TRACE_add_start_function(TRACE_surf_alloc); + TRACE_add_end_function(TRACE_surf_release); +#endif + sg_config_init(argc, argv); surf_action_init(); @@ -600,12 +605,12 @@ double surf_solve(double max_date) min = model_next_action_end; } - if (next_event_date == -1.0) { + if (next_event_date < 0.0) { XBT_DEBUG("no next TRACE event. Stop searching for it"); break; } - if ((min != -1.0) && (next_event_date > NOW + min)) break; + if ((min == -1.0) || (next_event_date > NOW + min)) break; XBT_DEBUG("Updating models"); while ((event =