From: alegrand Date: Tue, 5 Jul 2005 16:03:45 +0000 (+0000) Subject: %lg -> %g ... X-Git-Tag: v3.3~3806 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fb5ab7a1b6fc59ea80553579f897faa7c97733b0?hp=de97a76069beee66a68e0070cc650e8ea49b60d2 %lg -> %g ... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1550 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/gras/chrono/chrono.c b/examples/gras/chrono/chrono.c index 74c3c341e9..db0301b6bc 100644 --- a/examples/gras/chrono/chrono.c +++ b/examples/gras/chrono/chrono.c @@ -32,7 +32,7 @@ int multiplier (int argc,char *argv[]) start=now=gras_os_time(); - INFO1("Begin matrix multiplication loop (time: %lg)", start); + INFO1("Begin matrix multiplication loop (time: %g)", start); for(l=0; l<4; l++) { now=gras_os_time(); @@ -51,14 +51,14 @@ int multiplier (int argc,char *argv[]) GRAS_BENCH_ONCE_RUN_ONCE_END(); now=gras_os_time()-now; - INFO2("Iteration %d : %lg ", l, now); + INFO2("Iteration %d : %g ", l, now); } now=gras_os_time()-start; - INFO2("End matrix multiplication loop (time: %lg; Duration: %lg)", gras_os_time(), now); + INFO2("End matrix multiplication loop (time: %g; Duration: %g)", gras_os_time(), now); start=now=gras_os_time(); - INFO1("Begin malloc loop (time: %lg)", start); + INFO1("Begin malloc loop (time: %g)", start); for(l=0; l<4; l++) { now=gras_os_time(); GRAS_BENCH_ONCE_RUN_ONCE_BEGIN(); @@ -66,11 +66,11 @@ int multiplier (int argc,char *argv[]) A = malloc(n*n*sizeof(double)); GRAS_BENCH_ONCE_RUN_ONCE_END(); now=gras_os_time()-now; - INFO2("Iteration %d : %lg ", l, now); + INFO2("Iteration %d : %g ", l, now); } start=now=gras_os_time(); - INFO1("Begin integer incrementation loop (time: %lg)", start); + INFO1("Begin integer incrementation loop (time: %g)", start); for(l=0; l<4; l++) { GRAS_BENCH_ONCE_RUN_ONCE_BEGIN(); j++; diff --git a/src/msg/global.c b/src/msg/global.c index a85b6c53f2..2848f7880e 100644 --- a/src/msg/global.c +++ b/src/msg/global.c @@ -342,16 +342,16 @@ MSG_error_t MSG_main(void) xbt_context_schedule(process->simdata->context); msg_global->current_process = NULL; } - DEBUG1("%lg : Calling surf_solve",MSG_getClock()); + DEBUG1("%g : Calling surf_solve",MSG_getClock()); elapsed_time = surf_solve(); - DEBUG1("Elapsed_time %lg",elapsed_time); + DEBUG1("Elapsed_time %g",elapsed_time); -/* fprintf(stderr, "====== %lg =====\n",Now); */ +/* fprintf(stderr, "====== %g =====\n",Now); */ /* if (elapsed_time==0.0) { */ /* fprintf(stderr, "No change in time\n"); */ /* } */ if (elapsed_time<0.0) { -/* fprintf(stderr, "We're done %lg\n",elapsed_time); */ +/* fprintf(stderr, "We're done %g\n",elapsed_time); */ break; } diff --git a/src/msg/gos.c b/src/msg/gos.c index a7b20a8f50..0e0acdf9b2 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -307,7 +307,7 @@ MSG_error_t MSG_task_put(m_task_t task, local_host = ((simdata_process_t) process->simdata)->host; remote_host = dest; - DEBUG4("Trying to send a task (%lg Mb) from %s to %s on channel %d", + DEBUG4("Trying to send a task (%g Mb) from %s to %s on channel %d", task->simdata->message_size,local_host->name, remote_host->name, channel); xbt_fifo_push(((simdata_host_t) remote_host->simdata)-> diff --git a/src/msg/private.h b/src/msg/private.h index 29d30a0d6a..fba859dea2 100644 --- a/src/msg/private.h +++ b/src/msg/private.h @@ -116,17 +116,17 @@ int __MSG_process_isBlocked(m_process_t process); #ifdef ALVIN_SPECIAL_LOGING #define PAJE_PROCESS_STATE(process,state)\ if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"10 %lg S_t P%d %s\n",\ + fprintf(msg_global->paje_output,"10 %g S_t P%d %s\n",\ surf_get_clock(), (process)->simdata->PID,(state)) #define PAJE_PROCESS_PUSH_STATE(process,state)\ if(msg_global->paje_output) { \ - fprintf(msg_global->paje_output,"11 %lg S_t P%d %s\n",\ + fprintf(msg_global->paje_output,"11 %g S_t P%d %s\n",\ surf_get_clock(), (process)->simdata->PID,(state));\ (process)->simdata->paje_state++; \ } #define PAJE_PROCESS_POP_STATE(process)\ if(msg_global->paje_output) { \ - fprintf(msg_global->paje_output,"12 %lg S_t P%d\n",\ + fprintf(msg_global->paje_output,"12 %g S_t P%d\n",\ surf_get_clock(), (process)->simdata->PID); \ (process)->simdata->paje_state--; \ } @@ -134,7 +134,7 @@ int __MSG_process_isBlocked(m_process_t process); #define PAJE_PROCESS_NEW(process)\ if((msg_global->paje_output)) {\ if((msg_global->session==0) || ((msg_global->session>0) && ((process)->simdata->PID > msg_global->paje_maxPID))) \ - fprintf(msg_global->paje_output,"7 %lg P%d P_t %p \"%s %d (%d)\"\n", \ + fprintf(msg_global->paje_output,"7 %g P%d P_t %p \"%s %d (%d)\"\n", \ surf_get_clock(), (process)->simdata->PID, (process)->simdata->host, \ (process)->name, (process)->simdata->PID, msg_global->session);\ if(msg_global->paje_maxPID<(process)->simdata->PID) msg_global->paje_maxPID=(process)->simdata->PID;\ @@ -142,62 +142,62 @@ int __MSG_process_isBlocked(m_process_t process); #define PAJE_COMM_START(process,task,channel)\ if(msg_global->paje_output) \ fprintf(msg_global->paje_output,\ - "16 %lg Comm CUR COMM_%d P%d %p\n", \ + "16 %g Comm CUR COMM_%d P%d %p\n", \ surf_get_clock(), channel, (process)->simdata->PID, task) #define PAJE_COMM_STOP(process,task,channel)\ if(msg_global->paje_output) \ fprintf(msg_global->paje_output,\ - "17 %lg Comm CUR COMM_%d P%d %p\n", \ + "17 %g Comm CUR COMM_%d P%d %p\n", \ surf_get_clock(), channel, (process)->simdata->PID, task) #define PAJE_HOST_NEW(host)\ if(msg_global->paje_output)\ - fprintf(msg_global->paje_output,"7 %lg %p H_t CUR \"%s\"\n",surf_get_clock(), \ + fprintf(msg_global->paje_output,"7 %g %p H_t CUR \"%s\"\n",surf_get_clock(), \ host, host->name) #define PAJE_HOST_FREE(host)\ if(msg_global->paje_output)\ - fprintf(msg_global->paje_output,"8 %lg %p H_t\n",surf_get_clock(), host) + fprintf(msg_global->paje_output,"8 %g %p H_t\n",surf_get_clock(), host) #else #define PAJE_PROCESS_STATE(process,state)\ if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"10 %lg S_t %p %s\n",\ + fprintf(msg_global->paje_output,"10 %g S_t %p %s\n",\ surf_get_clock(), (process),(state)) #define PAJE_PROCESS_PUSH_STATE(process,state)\ if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"11 %lg S_t %p %s\n",\ + fprintf(msg_global->paje_output,"11 %g S_t %p %s\n",\ surf_get_clock(), (process),(state)) #define PAJE_PROCESS_POP_STATE(process)\ if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"12 %lg S_t %p\n",\ + fprintf(msg_global->paje_output,"12 %g S_t %p\n",\ surf_get_clock(), (process)) #define PAJE_PROCESS_FREE(process)\ if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"8 %lg %p P_t\n", \ + fprintf(msg_global->paje_output,"8 %g %p P_t\n", \ surf_get_clock(), (process)) #define PAJE_PROCESS_NEW(process)\ if(msg_global->paje_output) \ - fprintf(msg_global->paje_output,"7 %lg %p P_t %p \"%s %d (%d)\"\n", \ + fprintf(msg_global->paje_output,"7 %g %p P_t %p \"%s %d (%d)\"\n", \ surf_get_clock(), (process), (process)->simdata->host, \ (process)->name, (process)->simdata->PID, msg_global->session) #define PAJE_COMM_START(process,task,channel)\ if(msg_global->paje_output) \ fprintf(msg_global->paje_output,\ - "16 %lg Comm CUR COMM_%d %p %p\n", \ + "16 %g Comm CUR COMM_%d %p %p\n", \ surf_get_clock(), channel, (process), task) #define PAJE_COMM_STOP(process,task,channel)\ if(msg_global->paje_output) \ fprintf(msg_global->paje_output,\ - "17 %lg Comm CUR COMM_%d %p %p\n", \ + "17 %g Comm CUR COMM_%d %p %p\n", \ surf_get_clock(), channel, (process), task) #define PAJE_HOST_NEW(host)\ if(msg_global->paje_output)\ - fprintf(msg_global->paje_output,"7 %lg %p H_t CUR \"%s\"\n",surf_get_clock(), \ + fprintf(msg_global->paje_output,"7 %g %p H_t CUR \"%s\"\n",surf_get_clock(), \ host, host->name) #define PAJE_HOST_FREE(host)\ if(msg_global->paje_output)\ - fprintf(msg_global->paje_output,"8 %lg %p H_t\n",surf_get_clock(), host); + fprintf(msg_global->paje_output,"8 %g %p H_t\n",surf_get_clock(), host); #endif /* Alvin_Special_Loging */ #endif diff --git a/testsuite/surf/maxmin_bench.c b/testsuite/surf/maxmin_bench.c index fc5f0e7d4e..0002161543 100644 --- a/testsuite/surf/maxmin_bench.c +++ b/testsuite/surf/maxmin_bench.c @@ -78,7 +78,7 @@ int main(int argc, char **argv) date = xbt_os_time() * 1000000; test(nb_cnst, nb_var, nb_elem); printf("One shot execution time for a total of %d constraints, " - "%d variables with %d active constraint each : %lg microsecondes \n", + "%d variables with %d active constraint each : %g microsecondes \n", nb_cnst, nb_var, nb_elem, date); return 0; } diff --git a/testsuite/surf/maxmin_usage.c b/testsuite/surf/maxmin_usage.c index b206ff505c..96f2703f5f 100644 --- a/testsuite/surf/maxmin_usage.c +++ b/testsuite/surf/maxmin_usage.c @@ -14,7 +14,7 @@ #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test,"Messages specific for surf example"); -#define PRINT_VAR(var) DEBUG1(#var " = %lg\n",lmm_variable_getvalue(var)); +#define PRINT_VAR(var) DEBUG1(#var " = %g\n",lmm_variable_getvalue(var)); /* */ /* ______ */ diff --git a/testsuite/surf/surf_usage.c b/testsuite/surf/surf_usage.c index d7a2749852..e613e7f2af 100644 --- a/testsuite/surf/surf_usage.c +++ b/testsuite/surf/surf_usage.c @@ -100,7 +100,7 @@ void test(char *platform) do { surf_action_t action = NULL; now = surf_get_clock(); - DEBUG1("Next Event : " "%lg" "\n", now); + DEBUG1("Next Event : " "%g" "\n", now); DEBUG0("\t CPU actions\n"); while ((action = xbt_swag_extract(surf_cpu_resource->common_public->states. diff --git a/testsuite/surf/surf_usage2.c b/testsuite/surf/surf_usage2.c index 36da616329..7ca1c67c76 100644 --- a/testsuite/surf/surf_usage2.c +++ b/testsuite/surf/surf_usage2.c @@ -85,7 +85,7 @@ void test(char *platform) surf_resource_t resource = NULL; now = surf_get_clock(); - DEBUG1("Next Event : " "%lg" "\n", now); + DEBUG1("Next Event : " "%g" "\n", now); xbt_dynar_foreach(resource_list, i, resource) { DEBUG1("\t %s actions\n", resource->common_public->name); diff --git a/testsuite/surf/trace_usage.c b/testsuite/surf/trace_usage.c index 2253e4dfc4..153605a109 100644 --- a/testsuite/surf/trace_usage.c +++ b/testsuite/surf/trace_usage.c @@ -32,10 +32,10 @@ void test(void) tmgr_history_add_trace(history, trace_B, 0.0, 0, host_B); while ((next_event_date = tmgr_history_next_date(history)) != -1.0) { - DEBUG1("%lg" " : \n", next_event_date); + DEBUG1("%g" " : \n", next_event_date); while (tmgr_history_get_next_event_leq(history, next_event_date, &value, (void **) &resource)) { - DEBUG2("\t %s : " "%lg" "\n", resource, value); + DEBUG2("\t %s : " "%g" "\n", resource, value); } if (next_event_date > 1000) break; diff --git a/testsuite/xbt/heap_bench.c b/testsuite/xbt/heap_bench.c index ea737a9478..5f3e1c40cc 100644 --- a/testsuite/xbt/heap_bench.c +++ b/testsuite/xbt/heap_bench.c @@ -70,7 +70,7 @@ void test_heap_mean_operation(int size) for (i = 0; i < size; i++) xbt_heap_push(heap, NULL, (10.0 * rand() / (RAND_MAX + 1.0))); date = gras_os_time() * 1000000 - date; - printf("Creation time %d size heap : %lg\n", size, date); + printf("Creation time %d size heap : %g\n", size, date); date = gras_os_time() * 1000000; for (j = 0; j < MAX_TEST; j++) { @@ -79,7 +79,7 @@ void test_heap_mean_operation(int size) xbt_heap_push(heap, NULL, 3.0 * val); } date = gras_os_time() * 1000000 - date; - printf("Mean access time for a %d size heap : %lg\n", size, + printf("Mean access time for a %d size heap : %g\n", size, date * 1.0 / (MAX_TEST + 0.0)); xbt_heap_free(heap);