sprintf(to, "%s_%s", MSG_process_get_name(MSG_process_self()), action[2]);
- ACT_DEBUG("Entering Send: %s (size: %lg)", NAME, size);
+ ACT_DEBUG("Entering Send: %s (size: %g)", NAME, size);
if (size < 65536) {
action_Isend(action);
} else {
done=SD_simulate(-1);
} while(!xbt_dynar_is_empty(done));
xbt_os_cputimer_stop(timer);
- printf("exec_time:%lf\n", xbt_os_timer_elapsed(timer) );
+ printf("exec_time:%f\n", xbt_os_timer_elapsed(timer) );
xbt_dynar_free(&done);
xbt_dynar_free(&reclaimed);
end_time = MPI_Wtime();
time = end_time - start_time;
double reduce_time = end_time_reduce - start_time_reduce;
- printf("communication time: %le reduce time: %le seconds, "
- "total time: %le seconds\n",communication_time,reduce_time,time);
+ printf("communication time: %e reduce time: %e seconds, "
+ "total time: %e seconds\n",communication_time,reduce_time,time);
MPI_Barrier(my_world);
#if CHECK_25D
end_time = MPI_Wtime();
time = end_time - start_time ;
- printf("communication time: %le seconds, "
- "computation time: %le seconds\n",
+ printf("communication time: %e seconds, "
+ "computation time: %e seconds\n",
communication_time, computation_time);
fprintf(stdout,"CPU Time=%d\n",tm);
fprintf(stdout,"N = 2^%d\n",m);
fprintf(stdout,"No. Gaussain Pairs =%d\n",gc);
- fprintf(stdout,"Sum = %lf %ld\n",sx,sy);
+ fprintf(stdout,"Sum = %f %ld\n",sx,sy);
fprintf(stdout,"Count:");
for(i = 0; i < nq; i++) {
fprintf(stdout,"%d\t %ld\n",i,q[i]);
fprintf(stdout,"Class = %s\n", _class);
fprintf(stdout,"Size = %s\n", size);
fprintf(stdout,"Iteration = %d\n", nit);
- fprintf(stdout,"Time in seconds = %lf\n",(tm/1000));
+ fprintf(stdout,"Time in seconds = %f\n",(tm/1000));
fprintf(stdout,"Total processes = %d\n",no_nodes);
- fprintf(stdout,"Mops/s total = %lf\n",Mops);
- fprintf(stdout,"Mops/s/process = %lf\n", Mops/no_nodes);
+ fprintf(stdout,"Mops/s total = %f\n",Mops);
+ fprintf(stdout,"Mops/s/process = %f\n", Mops/no_nodes);
fprintf(stdout,"Operation type = Random number generated\n");
if(verified) {
fprintf(stdout,"Verification = SUCCESSFUL\n");
} else {
fprintf(stdout,"Verification = UNSUCCESSFUL\n");
}
- fprintf(stdout,"Total time: %lf\n",(timer_read(1,elapsed)/1000));
- fprintf(stdout,"Gaussian pairs: %lf\n",(timer_read(2,elapsed)/1000));
- fprintf(stdout,"Random numbers: %lf\n",(timer_read(3,elapsed)/1000));
+ fprintf(stdout,"Total time: %f\n",(timer_read(1,elapsed)/1000));
+ fprintf(stdout,"Gaussian pairs: %f\n",(timer_read(2,elapsed)/1000));
+ fprintf(stdout,"Random numbers: %f\n",(timer_read(3,elapsed)/1000));
}
#ifdef USE_MPE
MPE_Finish_log(argv[0]);
fprintf(stdout,"CPU Time=%d\n",tm);
fprintf(stdout,"N = 2^%d\n",m);
fprintf(stdout,"No. Gaussain Pairs =%d\n",gc);
- fprintf(stdout,"Sum = %lf %ld\n",sx,sy);
+ fprintf(stdout,"Sum = %f %ld\n",sx,sy);
fprintf(stdout,"Count:");
for(i = 0; i < nq; i++) {
fprintf(stdout,"%d\t %ld\n",i,q[i]);
fprintf(stdout,"Class = %s\n", _class);
fprintf(stdout,"Size = %s\n", size);
fprintf(stdout,"Iteration = %d\n", nit);
- fprintf(stdout,"Time in seconds = %lf\n",(tm/1000));
+ fprintf(stdout,"Time in seconds = %f\n",(tm/1000));
fprintf(stdout,"Total processes = %d\n",no_nodes);
- fprintf(stdout,"Mops/s total = %lf\n",Mops);
- fprintf(stdout,"Mops/s/process = %lf\n", Mops/no_nodes);
+ fprintf(stdout,"Mops/s total = %f\n",Mops);
+ fprintf(stdout,"Mops/s/process = %f\n", Mops/no_nodes);
fprintf(stdout,"Operation type = Random number generated\n");
if(verified) {
fprintf(stdout,"Verification = SUCCESSFUL\n");
} else {
fprintf(stdout,"Verification = UNSUCCESSFUL\n");
}
- fprintf(stdout,"Total time: %lf\n",(timer_read(1,elapsed)/1000));
- fprintf(stdout,"Gaussian pairs: %lf\n",(timer_read(2,elapsed)/1000));
- fprintf(stdout,"Random numbers: %lf\n",(timer_read(3,elapsed)/1000));
+ fprintf(stdout,"Total time: %f\n",(timer_read(1,elapsed)/1000));
+ fprintf(stdout,"Gaussian pairs: %f\n",(timer_read(2,elapsed)/1000));
+ fprintf(stdout,"Random numbers: %f\n",(timer_read(3,elapsed)/1000));
}
#ifdef USE_MPE
MPE_Finish_log(argv[0]);
fprintf(stdout,"CPU Time=%d\n",tm);
fprintf(stdout,"N = 2^%d\n",m);
fprintf(stdout,"No. Gaussain Pairs =%d\n",gc);
- fprintf(stdout,"Sum = %lf %ld\n",sx,sy);
+ fprintf(stdout,"Sum = %f %ld\n",sx,sy);
fprintf(stdout,"Count:");
for(i = 0; i < nq; i++) {
fprintf(stdout,"%d\t %ld\n",i,q[i]);
fprintf(stdout,"Class = %s\n", _class);
fprintf(stdout,"Size = %s\n", size);
fprintf(stdout,"Iteration = %d\n", nit);
- fprintf(stdout,"Time in seconds = %lf\n",(tm/1000));
+ fprintf(stdout,"Time in seconds = %f\n",(tm/1000));
fprintf(stdout,"Total processes = %d\n",no_nodes);
- fprintf(stdout,"Mops/s total = %lf\n",Mops);
- fprintf(stdout,"Mops/s/process = %lf\n", Mops/no_nodes);
+ fprintf(stdout,"Mops/s total = %f\n",Mops);
+ fprintf(stdout,"Mops/s/process = %f\n", Mops/no_nodes);
fprintf(stdout,"Operation type = Random number generated\n");
if(verified) {
fprintf(stdout,"Verification = SUCCESSFUL\n");
} else {
fprintf(stdout,"Verification = UNSUCCESSFUL\n");
}
- fprintf(stdout,"Total time: %lf\n",(timer_read(1,elapsed)/1000));
- fprintf(stdout,"Gaussian pairs: %lf\n",(timer_read(2,elapsed)/1000));
- fprintf(stdout,"Random numbers: %lf\n",(timer_read(3,elapsed)/1000));
+ fprintf(stdout,"Total time: %f\n",(timer_read(1,elapsed)/1000));
+ fprintf(stdout,"Gaussian pairs: %f\n",(timer_read(2,elapsed)/1000));
+ fprintf(stdout,"Random numbers: %f\n",(timer_read(3,elapsed)/1000));
}
#ifdef USE_MPE
MPE_Finish_log(argv[0]);
static int smx_ctx_raw_factory_finalize(smx_context_factory_t *factory)
{
#ifdef TIME_BENCH_PER_SR
- XBT_CRITICAL("Total wasted time in %u SR: %lf", sr_count, time_wasted_sr);
- XBT_CRITICAL("Total wasted time in %u SSR: %lf", ssr_count, time_wasted_ssr);
+ XBT_CRITICAL("Total wasted time in %u SR: %f", sr_count, time_wasted_sr);
+ XBT_CRITICAL("Total wasted time in %u SSR: %f", ssr_count, time_wasted_ssr);
#endif
#ifdef CONTEXT_THREADS
tmax = time_thread_ssr[t];
for(cursor=0; cursor <= t; cursor++){
- XBT_VERB("Time SSR thread %u = %lf (max %lf)", cursor, time_thread_ssr[cursor], tmax);
+ XBT_VERB("Time SSR thread %u = %f (max %f)", cursor, time_thread_ssr[cursor], tmax);
time_wasted_ssr += tmax - time_thread_ssr[cursor];
}
}
}
for(i=0; i < NUM_THREADS; i++){
- XBT_VERB("Time SR thread %u = %lf (max %lf)", i, time_thread_sr[i], tmax);
+ XBT_VERB("Time SR thread %u = %f (max %f)", i, time_thread_sr[i], tmax);
time_wasted_sr += tmax - time_thread_sr[i];
}
start = xbt_os_time();
parse_platform_file(file);
end = xbt_os_time();
- XBT_DEBUG("PARSE TIME: %lg", (end - start));
+ XBT_DEBUG("PARSE TIME: %g", (end - start));
}
#ifdef TIME_BENCH_AMDAHL
xbt_os_cputimer_stop(simix_global->timer_seq);
- XBT_INFO("Amdahl timing informations. Sequential time: %lf; Parallel time: %lf",
+ XBT_INFO("Amdahl timing informations. Sequential time: %f; Parallel time: %f",
xbt_os_timer_elapsed(simix_global->timer_seq),
xbt_os_timer_elapsed(simix_global->timer_par));
xbt_os_timer_free(simix_global->timer_seq);
}\
}\
if(smpi_comm_rank(comm)==0){\
- XBT_WARN("For rank 0, the quickest was %s : %lf , but global was %s : %lf at max",mpi_coll_##cat##_description[min_coll].name, time_min,mpi_coll_##cat##_description[global_coll].name, max_min);\
+ XBT_WARN("For rank 0, the quickest was %s : %f , but global was %s : %f at max",mpi_coll_##cat##_description[min_coll].name, time_min,mpi_coll_##cat##_description[global_coll].name, max_min);\
}else\
- XBT_WARN("The quickest %s was %s on rank %d and took %lf",#cat,mpi_coll_##cat##_description[min_coll].name, smpi_comm_rank(comm), time_min);\
+ XBT_WARN("The quickest %s was %s on rank %d and took %f",#cat,mpi_coll_##cat##_description[min_coll].name, smpi_comm_rank(comm), time_min);\
return (min_coll!=-1)?MPI_SUCCESS:MPI_ERR_INTERN;\
}\
double current=0.0;
xbt_dynar_foreach(smpi_os_values, iter, fact) {
if (size <= fact.factor) {
- XBT_DEBUG("os : %lf <= %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("os : %f <= %ld return %f", size, fact.factor, current);
return current;
}else{
current=fact.values[0]+fact.values[1]*size;
}
}
- XBT_DEBUG("os : %lf > %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("os : %f > %ld return %f", size, fact.factor, current);
return current;
}
double current=0.0;
xbt_dynar_foreach(smpi_ois_values, iter, fact) {
if (size <= fact.factor) {
- XBT_DEBUG("ois : %lf <= %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("ois : %f <= %ld return %f", size, fact.factor, current);
return current;
}else{
current=fact.values[0]+fact.values[1]*size;
}
}
- XBT_DEBUG("ois : %lf > %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("ois : %f > %ld return %f", size, fact.factor, current);
return current;
}
double current=0.0;
xbt_dynar_foreach(smpi_or_values, iter, fact) {
if (size <= fact.factor) {
- XBT_DEBUG("or : %lf <= %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("or : %f <= %ld return %f", size, fact.factor, current);
return current;
}else
current=fact.values[0]+fact.values[1]*size;
}
- XBT_DEBUG("or : %lf > %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("or : %f > %ld return %f", size, fact.factor, current);
return current;
}
double sleeptime = request->detached ? smpi_or(request->size) : 0.0;
if(sleeptime!=0.0){
simcall_process_sleep(sleeptime);
- XBT_DEBUG("receiving size of %zu : sleep %lf ", request->size, smpi_or(request->size));
+ XBT_DEBUG("receiving size of %zu : sleep %f ", request->size, smpi_or(request->size));
}
} else {
if(sleeptime!=0.0){
simcall_process_sleep(sleeptime);
- XBT_DEBUG("sending size of %zu : sleep %lf ", request->size, smpi_os(request->size));
+ XBT_DEBUG("sending size of %zu : sleep %f ", request->size, smpi_os(request->size));
}
request->action =
cpu->energy->power_range_watts_list = cpu_get_watts_range_list(cpu);
cpu->energy->last_updated = surf_get_clock();
- XBT_DEBUG("CPU create: peak=%lf, pstate=%d",cpu->power_peak, cpu->pstate);
+ XBT_DEBUG("CPU create: peak=%f, pstate=%d",cpu->power_peak, cpu->pstate);
xbt_assert(cpu->power_peak > 0, "Power has to be >0");
cpu->power_scale = power_scale;
double current_power = min_power + cpu_load * power_slope;
- XBT_DEBUG("[get_current_watts] min_power=%lf, max_power=%lf, slope=%lf", min_power, max_power, power_slope);
- XBT_DEBUG("[get_current_watts] Current power (watts) = %lf, load = %lf", current_power, cpu_load);
+ XBT_DEBUG("[get_current_watts] min_power=%f, max_power=%f, slope=%f", min_power, max_power, power_slope);
+ XBT_DEBUG("[get_current_watts] Current power (watts) = %f, load = %f", current_power, cpu_load);
return current_power;
double start_time = cpu_model->energy->last_updated;
double finish_time = surf_get_clock();
- XBT_DEBUG("[cpu_update_energy] action time interval=(%lf-%lf), current power peak=%lf, current pstate=%d",
+ XBT_DEBUG("[cpu_update_energy] action time interval=(%f-%f), current power peak=%f, current pstate=%d",
start_time, finish_time, cpu_model->power_peak, cpu_model->pstate);
double current_energy = cpu_model->energy->total_energy;
double action_energy = cpu_get_current_watts_value(cpu_model, cpu_load)*(finish_time-start_time);
cpu_model->energy->total_energy = current_energy + action_energy;
cpu_model->energy->last_updated = finish_time;
- XBT_DEBUG("[cpu_update_energy] old_energy_value=%lf, action_energy_value=%lf", current_energy, action_energy);
+ XBT_DEBUG("[cpu_update_energy] old_energy_value=%f, action_energy_value=%f", current_energy, action_energy);
}
if (!power_trace) {
trace->type = TRACE_FIXED;
trace->value = value;
- XBT_DEBUG("No availability trace. Constant value = %lf", value);
+ XBT_DEBUG("No availability trace. Constant value = %f", value);
return trace;
}
trace->total =
surf_cpu_ti_integrate_trace_simple(trace->trace, 0, total_time);
- XBT_DEBUG("Total integral %lf, last_time %lf ",
+ XBT_DEBUG("Total integral %f, last_time %f ",
trace->total, trace->last_time);
return trace;
xbt_dynar_free(&power_peak); /* kill memory leak */
//cpu->power_peak = power_peak;
cpu->pstate = pstate;
- XBT_DEBUG("CPU create: peak=%lf, pstate=%d",cpu->power_peak, cpu->pstate);
+ XBT_DEBUG("CPU create: peak=%f, pstate=%d",cpu->power_peak, cpu->pstate);
xbt_assert(cpu->power_peak > 0, "Power has to be >0");
- XBT_DEBUG("power scale %lf", power_scale);
+ XBT_DEBUG("power scale %f", power_scale);
cpu->power_scale = power_scale;
cpu->avail_trace = cpu_ti_parse_trace(power_trace, power_scale);
cpu->state_current = state_initial;
area_total =
surf_cpu_ti_integrate_trace(cpu->avail_trace, cpu->last_update,
now) * cpu->power_peak;
- XBT_DEBUG("Flops total: %lf, Last update %lf", area_total,
+ XBT_DEBUG("Flops total: %f, Last update %f", area_total,
cpu->last_update);
xbt_swag_foreach(action, cpu->action_set) {
double_update(&(generic->remains),
area_total / (cpu->sum_priority *
generic->priority));
- XBT_DEBUG("Update remaining action(%p) remaining %lf", action,
+ XBT_DEBUG("Update remaining action(%p) remaining %f", action,
generic->remains);
}
cpu->last_update = now;
xbt_heap_push(cpu_ti_action_heap, action, min_finish);
XBT_DEBUG
- ("Update finish time: Cpu(%s) Action: %p, Start Time: %lf Finish Time: %lf Max duration %lf",
+ ("Update finish time: Cpu(%s) Action: %p, Start Time: %f Finish Time: %f Max duration %f",
cpu->generic_resource.name, action, GENERIC_ACTION(action).start,
GENERIC_ACTION(action).finish,
GENERIC_ACTION(action).max_duration);
if (xbt_heap_size(cpu_ti_action_heap) > 0)
min_action_duration = xbt_heap_maxkey(cpu_ti_action_heap) - now;
- XBT_DEBUG("Share resources, min next event date: %lf", min_action_duration);
+ XBT_DEBUG("Share resources, min next event date: %f", min_action_duration);
return min_action_duration;
}
surf_cpu_ti_tgmr_t trace;
s_tmgr_event_t val;
- XBT_DEBUG("Finish trace date: %lf value %lf date %lf", surf_get_clock(),
+ XBT_DEBUG("Finish trace date: %f value %f date %f", surf_get_clock(),
value, date);
/* update remaining of actions and put in modified cpu swag */
cpu_ti_update_remaining_amount(cpu, date);
trace = xbt_new0(s_surf_cpu_ti_tgmr_t, 1);
trace->type = TRACE_FIXED;
trace->value = val.value;
- XBT_DEBUG("value %lf", val.value);
+ XBT_DEBUG("value %f", val.value);
cpu->avail_trace = trace;
trace->nb_points - 1);
integral += trace->integral[ind];
XBT_DEBUG
- ("a %lf ind %d integral %lf ind + 1 %lf ind %lf time +1 %lf time %lf",
+ ("a %f ind %d integral %f ind + 1 %f ind %f time +1 %f time %f",
a, ind, integral, trace->integral[ind + 1], trace->integral[ind],
trace->time_points[ind + 1], trace->time_points[ind]);
double_update(&a_aux, trace->time_points[ind]);
trace->
time_points
[ind]);
- XBT_DEBUG("Integral a %lf = %lf", a, integral);
+ XBT_DEBUG("Integral a %f = %f", a, integral);
return integral;
}
return (a + (amount / trace->value));
}
- XBT_DEBUG("amount %lf total %lf", amount, trace->total);
+ XBT_DEBUG("amount %f total %f", amount, trace->total);
/* Reduce the problem to one where amount <= trace_total */
quotient = (int) (floor(amount / trace->total));
reduced_amount = (trace->total) * ((amount / trace->total) -
floor(amount / trace->total));
reduced_a = a - (trace->last_time) * (int) (floor(a / trace->last_time));
- XBT_DEBUG("Quotient: %d reduced_amount: %lf reduced_a: %lf", quotient,
+ XBT_DEBUG("Quotient: %d reduced_amount: %f reduced_a: %f", quotient,
reduced_amount, reduced_a);
/* Now solve for new_amount which is <= trace_total */
int mid;
do {
mid = low + (high - low) / 2;
- XBT_DEBUG("a %lf low %d high %d mid %d value %lf", a, low, high, mid,
+ XBT_DEBUG("a %f low %d high %d mid %d value %f", a, low, high, mid,
array[mid]);
if (array[mid] > a)
double current=1.0;
xbt_dynar_foreach(smpi_bw_factor, iter, fact) {
if (size <= fact.factor) {
- XBT_DEBUG("%lf <= %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("%f <= %ld return %f", size, fact.factor, current);
return current;
}else
current=fact.value;
}
- XBT_DEBUG("%lf > %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("%f > %ld return %f", size, fact.factor, current);
return current;
}
double current=1.0;
xbt_dynar_foreach(smpi_lat_factor, iter, fact) {
if (size <= fact.factor) {
- XBT_DEBUG("%lf <= %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("%f <= %ld return %f", size, fact.factor, current);
return current;
}else
current=fact.value;
}
- XBT_DEBUG("%lf > %ld return %f", size, fact.factor, current);
+ XBT_DEBUG("%f > %ld return %f", size, fact.factor, current);
return current;
}
double value, double date)
{
link_CM02_t nw_link = id;
- /* printf("[" "%lg" "] Asking to update network card \"%s\" with value " */
- /* "%lg" " for event %p\n", surf_get_clock(), nw_link->name, */
+ /* printf("[" "%g" "] Asking to update network card \"%s\" with value " */
+ /* "%g" " for event %p\n", surf_get_clock(), nw_link->name, */
/* value, event_type); */
if (event_type == nw_link->lmm_resource.power.event) {
-/* Copyright (c) 2007-2012. The SimGrid Team.
+/* Copyright (c) 2007-2013. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
XBT_DEBUG("Calling gtnets_get_time_to_next_flow_completion");
time_to_next_flow_completion = gtnets_get_time_to_next_flow_completion();
- XBT_DEBUG("gtnets_get_time_to_next_flow_completion received %lg",
+ XBT_DEBUG("gtnets_get_time_to_next_flow_completion received %g",
time_to_next_flow_completion);
return time_to_next_flow_completion;
max_dur_flag = 1;
}
- XBT_DEBUG("Action(%p) Start %lf Finish %lf Max_duration %lf", action,
+ XBT_DEBUG("Action(%p) Start %f Finish %f Max_duration %f", action,
action->generic_action.start, now + value,
action->generic_action.max_duration);
if (min != -1) {
surf_action_lmm_heap_remove(model->model_private->action_heap,action);
surf_action_lmm_heap_insert(model->model_private->action_heap,action, min, max_dur_flag ? MAX_DURATION : NORMAL);
- XBT_DEBUG("Insert at heap action(%p) min %lf now %lf", action, min,
+ XBT_DEBUG("Insert at heap action(%p) min %f now %f", action, min,
now);
} else DIE_IMPOSSIBLE;
}
else
min = -1;
- XBT_DEBUG("The minimum with the HEAP %lf", min);
+ XBT_DEBUG("The minimum with the HEAP %f", min);
return min;
}
}
/* update state of model_obj according to new value. Does not touch lmm.
It will be modified if needed when updating actions */
- XBT_DEBUG("Calling update_resource_state for resource %s with min %lf",
+ XBT_DEBUG("Calling update_resource_state for resource %s with min %f",
resource->name, min);
resource->model->model_private->update_resource_state(resource,
delta = now - action->last_update;
if (action->generic_action.remains > 0) {
- XBT_DEBUG("Updating action(%p): remains was %lf, last_update was: %lf", action, action->generic_action.remains, action->last_update);
+ XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", action, action->generic_action.remains, action->last_update);
double_update(&(action->generic_action.remains),
action->last_value * delta);
now - action->last_update);
}
#endif
- XBT_DEBUG("Updating action(%p): remains is now %lf", action,
+ XBT_DEBUG("Updating action(%p): remains is now %f", action,
action->generic_action.remains);
}
int ret = sscanf(string, "%lg", &res);
if (ret != 1)
surf_parse_error("%s is not a double", string);
- //printf("Parsed double [%lg] %s\n", res, string);
+ //printf("Parsed double [%g] %s\n", res, string);
return res;
}
xbt_str_trim(power_value_str, NULL);
power_value = get_cpu_power(power_value_str);
xbt_dynar_push_as(host.power_peak, double, power_value);
- XBT_DEBUG("Power value: %lf", power_value);
+ XBT_DEBUG("Power value: %f", power_value);
}
xbt_dynar_free(&pstate_list);
}
link.id = A_surfxml_link_id;
link.bandwidth = surf_parse_get_bandwidth(A_surfxml_link_bandwidth);
- //printf("Link bandwidth [%lg]\n", link.bandwidth);
+ //printf("Link bandwidth [%g]\n", link.bandwidth);
link.bandwidth_trace = tmgr_trace_new_from_file(A_surfxml_link_bandwidth___file);
link.latency = surf_parse_get_time(A_surfxml_link_latency);
- //printf("Link latency [%lg]\n", link.latency);
+ //printf("Link latency [%g]\n", link.latency);
link.latency_trace = tmgr_trace_new_from_file(A_surfxml_link_latency___file);
switch (A_surfxml_link_state) {
}
xbt_assert(periodicity >= 0,
- "Invalid periodicity %lg (must be positive)", periodicity);
+ "Invalid periodicity %g (must be positive)", periodicity);
trace = xbt_new0(s_tmgr_trace_t, 1);
trace->type = e_trace_list;
if (last_event) {
if (last_event->delta > event.delta) {
xbt_die("%s:%d: Invalid trace: Events must be sorted, "
- "but time %lg > time %lg.\n%s",
+ "but time %g > time %g.\n%s",
id, linecount, last_event->delta, event.delta, input);
}
last_event->delta = event.delta - last_event->delta;
}
else
XBT_DEBUG
- ("Do not override configuration variable '%s' with value '%lf' because it was already set.",
+ ("Do not override configuration variable '%s' with value '%f' because it was already set.",
name, val);
}
task_prio = atof(argv[2]);
XBT_INFO("Testing the trace integration cpu model: CpuTI");
- XBT_INFO("Task size: %lf", task_comp_size);
- XBT_INFO("Task prio: %lf", task_prio);
+ XBT_INFO("Task size: %f", task_comp_size);
+ XBT_INFO("Task prio: %f", task_prio);
/* Create and execute a single task. */
task = MSG_task_create("proc 0", task_comp_size, 0, NULL);
SD_route_get_list(w1, w2);
xbt_os_cputimer_stop(timer);
- printf("%lf\n", xbt_os_timer_elapsed(timer) );
+ printf("%f\n", xbt_os_timer_elapsed(timer) );
SD_exit();
xbt_os_cputimer_stop(timer);
/* Display the result and exit after cleanup */
- printf( "%lf\n", xbt_os_timer_elapsed(timer) );
+ printf( "%f\n", xbt_os_timer_elapsed(timer) );
printf("Workstation number: %d, link number: %d\n",
SD_workstation_get_number(), SD_link_get_number());
if(argv[2]){
MPI_Barrier(MPI_COMM_WORLD);
if (0 == rank) {
printf("... Barrier ....\n");
- //printf("Elapsed=%lf s\n", MPI_Wtime() - start_timer);
+ //printf("Elapsed=%f s\n", MPI_Wtime() - start_timer);
}
MPI_Finalize();
-/* Copyright (c) 2009, 2012. The SimGrid Team.
+/* Copyright (c) 2009, 2012-2013. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
MPI_Barrier(MPI_COMM_WORLD);
if (0 == rank && !quiet)
- printf("Elapsed time on rank %d: %lf s\n", rank,
+ printf("Elapsed time on rank %d: %f s\n", rank,
MPI_Wtime() - start_timer);
MPI_Finalize();
return 0;
}
if (coutbuf[1].val != 0) {
errs++;
- fprintf( stderr, "double-int MAXLOC(0) test failed, value = %lf, should be zero\n", coutbuf[1].val );
+ fprintf( stderr, "double-int MAXLOC(0) test failed, value = %f, should be zero\n", coutbuf[1].val );
}
if (coutbuf[1].loc != 0) {
errs++;
}
if (coutbuf[1].val != 0) {
errs++;
- fprintf( stderr, "long double-int MAXLOC(0) test failed, value = %lf, should be zero\n", (double)coutbuf[1].val );
+ fprintf( stderr, "long double-int MAXLOC(0) test failed, value = %f, should be zero\n", (double)coutbuf[1].val );
}
if (coutbuf[1].loc != 0) {
errs++;
}
if (coutbuf[2].val != size-1) {
errs++;
- fprintf( stderr, "long double-int MAXLOC(>) test failed, value = %lf, should be %d\n", (double)coutbuf[2].val, size-1 );
+ fprintf( stderr, "long double-int MAXLOC(>) test failed, value = %f, should be %d\n", (double)coutbuf[2].val, size-1 );
}
if (coutbuf[2].loc != size-1) {
errs++;
else
printf("failed.\n");
if (!quiet)
- printf("Elapsed time=%lf s\n", MPI_Wtime() - start_timer);
+ printf("Elapsed time=%f s\n", MPI_Wtime() - start_timer);
}
MPI_Barrier(MPI_COMM_WORLD);
}
// verification
if ((double) rank != rcvd) {
- fprintf(stderr, "[%d] has %lf instead of %d\n", rank, rcvd, rank);
+ fprintf(stderr, "[%d] has %f instead of %d\n", rank, rcvd, rank);
success = 0;
}
return (success);
MPI_Bcast( &value, 1, mystruct, 0, MPI_COMM_WORLD );
- printf( "Process %d got %d (-2?) and %lf (8.0?), tab (should be all 0): ", rank, value.a, value.b );
+ printf( "Process %d got %d (-2?) and %f (8.0?), tab (should be all 0): ", rank, value.a, value.b );
for(j=0; j<2;j++ )
for(i=0; i<3;i++ )
/* A few basic tests for the graphxml library */
-/* Copyright (c) 2006-2012. The SimGrid Team.
+/* Copyright (c) 2006-2013. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
buf = xbt_new0(char, n * 20);
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++) {
- sprintf(buf + strlen(buf), "%le\t", adj[i * n + j]);
+ sprintf(buf + strlen(buf), "%e\t", adj[i * n + j]);
}
XBT_INFO("%s", buf);
buf[0] = '\000';
/* A few tests for the xbt_heap module */
-/* Copyright (c) 2004-2010, 2012. The SimGrid Team.
+/* Copyright (c) 2004-2010, 2012, 2013. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
qsort(tab, size, sizeof(double), compare_double);
for (i = 0; i < size; i++) {
- /* printf("%lg" " ", xbt_heap_maxkey(heap)); */
+ /* printf("%g" " ", xbt_heap_maxkey(heap)); */
if (xbt_heap_maxkey(heap) != tab[i]) {
fprintf(stderr, "Problem !\n");
exit(1);