3 // FIXME: could cause trouble with multithreaded procs on same host...
4 // FIXME: add benchmarking flag?
6 void smpi_bench_begin()
8 SIMIX_mutex_lock(smpi_global->timer_mutex);
9 xbt_os_timer_start(smpi_global->timer);
19 xbt_os_timer_stop(smpi_global->timer);
20 duration = xbt_os_timer_elapsed(smpi_global->timer);
21 host = SIMIX_host_self();
22 action = SIMIX_action_execute(host, "computation", duration * SMPI_DEFAULT_SPEED);
24 SIMIX_register_action_to_condition(action, smpi_global->timer_cond);
25 SIMIX_cond_wait(smpi_global->timer_cond, smpi_global->timer_mutex);
26 SIMIX_unregister_action_to_condition(action, smpi_global->timer_cond);
28 SIMIX_mutex_unlock(smpi_global->timer_mutex);