X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/da7ddf47cca7f83884a15a05778d3909fd0e4cfd..9932a0c0d2c44e34633c97a827b2b04d615cb4e9:/src/smpi/smpi_bench.c diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index 9f58470608..35971e220e 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -156,9 +156,7 @@ void smpi_execute_flops(double flops) { host = SIMIX_host_self(); XBT_DEBUG("Handle real computation time: %f flops", flops); action = simcall_host_execute("computation", host, flops, 1, 0, 0); -#ifdef HAVE_TRACING simcall_set_category (action, TRACE_internal_smpi_get_category()); -#endif simcall_host_execution_wait(action); smpi_switch_data_segment(smpi_process_index()); } @@ -168,18 +166,14 @@ void smpi_execute(double duration) if (duration >= smpi_cpu_threshold) { XBT_DEBUG("Sleep for %g to handle real computation time", duration); double flops = duration * smpi_running_power; -#ifdef HAVE_TRACING int rank = smpi_process_index(); instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1); extra->type=TRACING_COMPUTING; extra->comp_size=flops; TRACE_smpi_computing_in(rank, extra); -#endif smpi_execute_flops(flops); -#ifdef HAVE_TRACING TRACE_smpi_computing_out(rank); -#endif } else { XBT_DEBUG("Real computation took %g while option smpi/cpu_threshold is set to %g => ignore it", @@ -228,17 +222,15 @@ static unsigned int private_sleep(double secs) smpi_bench_end(); XBT_DEBUG("Sleep for: %lf secs", secs); - #ifdef HAVE_TRACING int rank = smpi_comm_rank(MPI_COMM_WORLD); instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1); extra->type=TRACING_SLEEPING; extra->sleep_duration=secs; TRACE_smpi_sleeping_in(rank, extra); -#endif + simcall_process_sleep(secs); -#ifdef HAVE_TRACING + TRACE_smpi_sleeping_out(rank); -#endif smpi_bench_begin(); return 0;