Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not call surf_solve() when there is nothing to run.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 4 Oct 2011 15:37:05 +0000 (17:37 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 5 Oct 2011 09:41:19 +0000 (11:41 +0200)
src/simix/smx_global.c

index abc2281..ebd3dea 100644 (file)
@@ -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 */
 
     /* Notify all the hosts that have failed */
     /* FIXME: iterate through the list of failed host and mark each of them */