X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ab6013dda2f80b21aff83d529738b048e508828f..606955dcf8fe80ad56c207e68de88de0b7b8b58b:/src/smpi/smpi_bench.c diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index 51731ecae1..cc81f08ebb 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -12,6 +12,9 @@ void smpi_execute(double duration) smx_action_t action; e_surf_action_state_t state; + if (duration < 0.001) + return; + DEBUG1("Sleep for %f to handle real computation time",duration); SIMIX_mutex_lock(mutex); action = @@ -35,7 +38,6 @@ void smpi_execute(double duration) void smpi_start_timer() { - SIMIX_mutex_lock(smpi_global->timer_mutex); xbt_os_timer_start(smpi_global->timer); } @@ -44,7 +46,6 @@ double smpi_stop_timer() double duration; xbt_os_timer_stop(smpi_global->timer); duration = xbt_os_timer_elapsed(smpi_global->timer); - SIMIX_mutex_unlock(smpi_global->timer_mutex); return duration; }