X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ab7832b0c07c62e8337dde2b452ab79f94ecf63f..5fb26c655edc451b9d500be9a443128dc8e5e732:/examples/msg/actions/actions.c diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index 0edf514bab..b8eb96aa0c 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -112,7 +112,7 @@ static void action_recv(xbt_dynar_t action) DEBUG1("Receiving: %s", name); MSG_task_receive(&task, mailbox_name); // MSG_task_receive(&task, MSG_process_get_name(MSG_process_self())); - DEBUG2("%s %f", name, MSG_get_clock() - clock); + VERB2("%s %f", name, MSG_get_clock() - clock); MSG_task_destroy(task); if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) @@ -190,9 +190,9 @@ static void barrier(xbt_dynar_t action) if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) name = xbt_str_join(action, " "); - DEBUG1("Entering barrier: %s", name); if (barrier_semaphore == NULL) // first arriving on the barrier barrier_semaphore = SIMIX_sem_init(0); + DEBUG2("Entering barrier: %s (capacity: %d)", name,SIMIX_sem_get_capacity(barrier_semaphore)); if (SIMIX_sem_get_capacity(barrier_semaphore) == -communicator_size + 1) { // last arriving SIMIX_sem_release_forever(barrier_semaphore); @@ -469,8 +469,16 @@ static void allReduce(xbt_dynar_t action) static void comm_size(xbt_dynar_t action) { + char *name = NULL; char *size = xbt_dynar_get_as(action, 2, char *); + double clock = MSG_get_clock(); + + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) + name = xbt_str_join(action, " "); communicator_size = parse_double(size); + VERB2("%s %f", name, MSG_get_clock() - clock); + if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) + free(name); } static void compute(xbt_dynar_t action)