From eda37e3b5c0c8ce2f78d8fabf9680c5892d26cd7 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 4 Oct 2011 17:37:05 +0200 Subject: [PATCH] Do not call surf_solve() when there is nothing to run. --- src/simix/smx_global.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index abc2281e7b..ebd3dea594 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -209,7 +209,9 @@ void SIMIX_run(void) } } - time = surf_solve(SIMIX_timer_next()); + time = SIMIX_timer_next(); + if (time != -1.0 || xbt_swag_size(simix_global->process_list) != 0) + time = surf_solve(time); /* Notify all the hosts that have failed */ /* FIXME: iterate through the list of failed host and mark each of them */ -- 2.20.1